mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 23:25:25 +03:00
Handle case when user switches to element missing the previously selected tab
This commit is contained in:
parent
425323e6c8
commit
a09cc787fb
@ -35,7 +35,6 @@ import { cn } from "@/lib/utils";
|
||||
import ActivityIndicator from "@/components/indicators/activity-indicator";
|
||||
import { ASPECT_VERTICAL_LAYOUT, ASPECT_WIDE_LAYOUT } from "@/types/record";
|
||||
import { FaImage, FaRegListAlt, FaVideo } from "react-icons/fa";
|
||||
import FrigatePlusIcon from "@/components/icons/FrigatePlusIcon";
|
||||
import { FaRotate } from "react-icons/fa6";
|
||||
import ObjectLifecycle from "./ObjectLifecycle";
|
||||
|
||||
@ -87,6 +86,14 @@ export default function SearchDetailDialog({
|
||||
return views;
|
||||
}, [config, search]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!searchTabs.includes(page)) {
|
||||
setPage("details");
|
||||
}
|
||||
// we know that these deps are correct
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [searchTabs]);
|
||||
|
||||
if (!search) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ export function FrigatePlusDialog({
|
||||
|
||||
const content = (
|
||||
<TransformWrapper minScale={1.0} wheel={{ smoothStep: 0.005 }}>
|
||||
<DialogHeader>
|
||||
<DialogHeader className={state == "submitted" ? "sr-only" : ""}>
|
||||
<DialogTitle>Submit To Frigate+</DialogTitle>
|
||||
<DialogDescription>
|
||||
Objects in locations you want to avoid are not false positives.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user