mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 13:45:25 +03:00
Show all is optional
This commit is contained in:
parent
f1452f8e22
commit
807cac35d9
@ -575,8 +575,8 @@ type GeneralFilterContentProps = {
|
|||||||
selectedLabels: string[] | undefined;
|
selectedLabels: string[] | undefined;
|
||||||
currentLabels: string[] | undefined;
|
currentLabels: string[] | undefined;
|
||||||
currentSeverity?: ReviewSeverity;
|
currentSeverity?: ReviewSeverity;
|
||||||
showAll: boolean;
|
showAll?: boolean;
|
||||||
setShowAll: (showAll: boolean) => void;
|
setShowAll?: (showAll: boolean) => void;
|
||||||
updateLabelFilter: (labels: string[] | undefined) => void;
|
updateLabelFilter: (labels: string[] | undefined) => void;
|
||||||
setCurrentLabels: (labels: string[] | undefined) => void;
|
setCurrentLabels: (labels: string[] | undefined) => void;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
@ -595,18 +595,20 @@ export function GeneralFilterContent({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="h-auto max-h-[80dvh] overflow-y-auto overflow-x-hidden">
|
<div className="h-auto max-h-[80dvh] overflow-y-auto overflow-x-hidden">
|
||||||
{currentSeverity && (
|
{currentSeverity && setShowAll && (
|
||||||
<div className="my-2.5 flex flex-col gap-2.5">
|
<div className="my-2.5 flex flex-col gap-2.5">
|
||||||
<FilterSwitch
|
<FilterSwitch
|
||||||
label="Alerts"
|
label="Alerts"
|
||||||
disabled={currentSeverity == "alert"}
|
disabled={currentSeverity == "alert"}
|
||||||
isChecked={currentSeverity == "alert" ? true : showAll}
|
isChecked={currentSeverity == "alert" ? true : showAll == true}
|
||||||
onCheckedChange={setShowAll}
|
onCheckedChange={setShowAll}
|
||||||
/>
|
/>
|
||||||
<FilterSwitch
|
<FilterSwitch
|
||||||
label="Detections"
|
label="Detections"
|
||||||
disabled={currentSeverity == "detection"}
|
disabled={currentSeverity == "detection"}
|
||||||
isChecked={currentSeverity == "detection" ? true : showAll}
|
isChecked={
|
||||||
|
currentSeverity == "detection" ? true : showAll == true
|
||||||
|
}
|
||||||
onCheckedChange={setShowAll}
|
onCheckedChange={setShowAll}
|
||||||
/>
|
/>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user