NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
add shortcut and query for fullscreen in live view (#12924)
Stavros Koisd3259c4782c2
diff --git a/web/src/views/live/LiveDashboardView.tsx b/web/src/views/live/LiveDashboardView.tsxindex 00c0462243..51f46d2f2a 100644--- a/web/src/views/live/LiveDashboardView.tsx+++ b/web/src/views/live/LiveDashboardView.tsx@@ -31,6 +31,9 @@ import { cn } from "@/lib/utils";import { LivePlayerError, LivePlayerMode } from "@/types/live";import { FaCompress, FaExpand } from "react-icons/fa";import { useResizeObserver } from "@/hooks/resize-observer";+import useKeyboardListener, {+ KeyModifiers,+} from "@/hooks/use-keyboard-listener";type LiveDashboardViewProps = {cameras: CameraConfig[];@@ -247,6 +250,23 @@ export default function LiveDashboardView({[setPreferredLiveModes],);+ const onKeyboardShortcut = useCallback(+ (key: string, modifiers: KeyModifiers) => {+ if (!modifiers.down) {+ return;+ }++ switch (key) {+ case "f":+ toggleFullscreen();+ break;+ }+ },+ [toggleFullscreen],+ );++ useKeyboardListener(["f"], onKeyboardShortcut);+return (<divclassName="scrollbar-container size-full overflow-y-auto px-1 pt-2 md:p-2"