diff --git a/web/src/components/overlay/dialog/SearchFilterDialog.tsx b/web/src/components/overlay/dialog/SearchFilterDialog.tsx index ef0d5bd26..fdc80eefd 100644 --- a/web/src/components/overlay/dialog/SearchFilterDialog.tsx +++ b/web/src/components/overlay/dialog/SearchFilterDialog.tsx @@ -26,7 +26,7 @@ import { cn } from "@/lib/utils"; import { DualThumbSlider } from "@/components/ui/slider"; import { Input } from "@/components/ui/input"; import { Checkbox } from "@/components/ui/checkbox"; -import ToggleButton from "@/components/ui/toggle-button"; +import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group"; type SearchFilterDialogProps = { config?: FrigateConfig; @@ -536,7 +536,7 @@ function SnapshotClipFilterContent({
Features
-
+
-
- setSnapshotClip(true, hasClip)} - disabled={!isSnapshotFilterActive} + { + if (value === "yes") setSnapshotClip(true, hasClip); + else if (value === "no") setSnapshotClip(false, hasClip); + }} + disabled={!isSnapshotFilterActive} + > + Yes - - setSnapshotClip(false, hasClip)} - disabled={!isSnapshotFilterActive} + + No - -
+ +
@@ -586,8 +597,9 @@ function SnapshotClipFilterContent({ setIsClipFilterActive(checked as boolean); if (checked) { setSnapshotClip(hasSnapshot, true); + } else { + setSnapshotClip(hasSnapshot, undefined); } - if (!checked) setSnapshotClip(hasSnapshot, undefined); }} />
-
- setSnapshotClip(hasSnapshot, true)} - disabled={!isClipFilterActive} + { + if (value === "yes") setSnapshotClip(hasSnapshot, true); + else if (value === "no") setSnapshotClip(hasSnapshot, false); + }} + disabled={!isClipFilterActive} + > + Yes - - setSnapshotClip(hasSnapshot, false)} - disabled={!isClipFilterActive} + + No - -
+ +
diff --git a/web/src/components/ui/toggle-button.tsx b/web/src/components/ui/toggle-button.tsx deleted file mode 100644 index bd1f91f26..000000000 --- a/web/src/components/ui/toggle-button.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { cn } from "@/lib/utils"; - -export default function ToggleButton({ - active, - onClick, - children, - disabled, -}: { - active: boolean; - onClick: () => void; - children: React.ReactNode; - disabled: boolean; -}) { - return ( - - ); -}