From 386ffbf5a6b02c6b900be84fb87b3090fcd4cb57 Mon Sep 17 00:00:00 2001
From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
Date: Thu, 9 May 2024 16:08:22 -0500
Subject: [PATCH] Tweak camera group layout editor buttons (#11317)
* tweak layout editor buttons
* remove bubble
* spacing
* button backgrounds
---
.../components/filter/CameraGroupSelector.tsx | 63 ++++++-
web/src/views/live/DraggableGridLayout.tsx | 177 +++++++++++++-----
web/themes/theme-default.css | 8 +-
3 files changed, 191 insertions(+), 57 deletions(-)
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 (
+ <>
+