diff --git a/web/src/components/filter/CameraGroupSelector.tsx b/web/src/components/filter/CameraGroupSelector.tsx index 38a246c00..fe0ff2fbc 100644 --- a/web/src/components/filter/CameraGroupSelector.tsx +++ b/web/src/components/filter/CameraGroupSelector.tsx @@ -360,6 +360,65 @@ function NewGroupDialog({ ); } +type EditGroupDialogProps = { + open: boolean; + setOpen: (open: boolean) => void; + currentGroups: [string, CameraGroupConfig][]; + activeGroup?: string; +}; +export function EditGroupDialog({ + open, + setOpen, + currentGroups, + activeGroup, +}: EditGroupDialogProps) { + // editing group and state + + const editingGroup = useMemo(() => { + if (currentGroups && activeGroup) { + return currentGroups.find(([groupName]) => groupName === activeGroup); + } else { + return undefined; + } + }, [currentGroups, activeGroup]); + + const [isLoading, setIsLoading] = useState(false); + + return ( + <> + + { + setOpen(open); + }} + > + +
+
+ Edit Camera Group +
+ setOpen(false)} + onCancel={() => setOpen(false)} + /> +
+
+
+ + ); +} + type CameraGroupRowProps = { group: [string, CameraGroupConfig]; onDeleteGroup: () => void; @@ -572,7 +631,7 @@ export function CameraGroupEdit({
- + + + {isEditMode ? "Exit Editing" : "Edit Layout"} + + + {!isEditMode && ( + <> + + + + + + {isEditMode ? "Exit Editing" : "Edit Camera Group"} + + + + + + + + {fullscreen ? "Exit Fullscreen" : "Fullscreen"} + + + + )} +
)} )} @@ -365,47 +481,6 @@ export default function DraggableGridLayout({ ); } -type DesktopEditLayoutButtonProps = { - isEditMode?: boolean; - setIsEditMode: React.Dispatch>; - hasScrollbar?: boolean | 0 | null; -}; - -function DesktopEditLayoutButton({ - isEditMode, - setIsEditMode, - hasScrollbar, -}: DesktopEditLayoutButtonProps) { - return ( -
- - - - - - {isEditMode ? "Exit Editing" : "Edit Layout"} - - -
- ); -} - function CornerCircles() { return ( <> diff --git a/web/themes/theme-default.css b/web/themes/theme-default.css index 804b2f9f2..fe19f301b 100644 --- a/web/themes/theme-default.css +++ b/web/themes/theme-default.css @@ -143,11 +143,11 @@ --muted-foreground: hsl(0, 0%, 32%); --muted-foreground: 0 0% 32%; - --accent: hsl(0, 0%, 15%); - --accent: 0 0% 15%; + --accent: hsl(0, 0%, 19%); + --accent: 0 0% 19%; - --accent-foreground: hsl(210, 40%, 98%); - --accent-foreground: 210 40% 98%; + --accent-foreground: hsl(210, 40%, 95%); + --accent-foreground: 210 40% 95%; --destructive: hsl(0, 62.8%, 30.6%); --destructive: 0 62.8% 30.6%;