mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-10 21:25:24 +03:00
optimistic severity toggle
This commit is contained in:
parent
f91116df52
commit
9ae1021009
@ -203,6 +203,7 @@ export default function EventView({
|
|||||||
const [severityToggle, setSeverityToggle] = useOptimisticState(
|
const [severityToggle, setSeverityToggle] = useOptimisticState(
|
||||||
severity,
|
severity,
|
||||||
setSeverity,
|
setSeverity,
|
||||||
|
100,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!config) {
|
if (!config) {
|
||||||
@ -225,7 +226,7 @@ export default function EventView({
|
|||||||
} // don't allow the severity to be unselected
|
} // don't allow the severity to be unselected
|
||||||
>
|
>
|
||||||
<ToggleGroupItem
|
<ToggleGroupItem
|
||||||
className={`${severity == "alert" ? "" : "text-gray-500"}`}
|
className={`${severityToggle == "alert" ? "" : "text-gray-500"}`}
|
||||||
value="alert"
|
value="alert"
|
||||||
aria-label="Select alerts"
|
aria-label="Select alerts"
|
||||||
>
|
>
|
||||||
@ -235,7 +236,7 @@ export default function EventView({
|
|||||||
</div>
|
</div>
|
||||||
</ToggleGroupItem>
|
</ToggleGroupItem>
|
||||||
<ToggleGroupItem
|
<ToggleGroupItem
|
||||||
className={`${severity == "detection" ? "" : "text-gray-500"}`}
|
className={`${severityToggle == "detection" ? "" : "text-gray-500"}`}
|
||||||
value="detection"
|
value="detection"
|
||||||
aria-label="Select detections"
|
aria-label="Select detections"
|
||||||
>
|
>
|
||||||
@ -247,7 +248,7 @@ export default function EventView({
|
|||||||
</ToggleGroupItem>
|
</ToggleGroupItem>
|
||||||
<ToggleGroupItem
|
<ToggleGroupItem
|
||||||
className={`px-3 py-4 rounded-2xl ${
|
className={`px-3 py-4 rounded-2xl ${
|
||||||
severity == "significant_motion" ? "" : "text-gray-500"
|
severityToggle == "significant_motion" ? "" : "text-gray-500"
|
||||||
}`}
|
}`}
|
||||||
value="significant_motion"
|
value="significant_motion"
|
||||||
aria-label="Select motion"
|
aria-label="Select motion"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user