mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-18 00:54:27 +03:00
frontend renaming
This commit is contained in:
parent
36391c844e
commit
a7cde5cb06
@ -407,9 +407,9 @@ export function useImproveContrast(camera: string): {
|
|||||||
return { payload: payload as ToggleableSetting, send };
|
return { payload: payload as ToggleableSetting, send };
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useEventUpdate(): { payload: string } {
|
export function useTrackedObjectUpdate(): { payload: string } {
|
||||||
const {
|
const {
|
||||||
value: { payload },
|
value: { payload },
|
||||||
} = useWs("event_update", "");
|
} = useWs("tracked_object_update", "");
|
||||||
return useDeepMemo(JSON.parse(payload as string));
|
return useDeepMemo(JSON.parse(payload as string));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
useEmbeddingsReindexProgress,
|
useEmbeddingsReindexProgress,
|
||||||
useEventUpdate,
|
useTrackedObjectUpdate,
|
||||||
useModelState,
|
useModelState,
|
||||||
} from "@/api/ws";
|
} from "@/api/ws";
|
||||||
import ActivityIndicator from "@/components/indicators/activity-indicator";
|
import ActivityIndicator from "@/components/indicators/activity-indicator";
|
||||||
@ -227,15 +227,15 @@ export default function Explore() {
|
|||||||
|
|
||||||
// mutation and revalidation
|
// mutation and revalidation
|
||||||
|
|
||||||
const eventUpdate = useEventUpdate();
|
const trackedObjectUpdate = useTrackedObjectUpdate();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (eventUpdate) {
|
if (trackedObjectUpdate) {
|
||||||
mutate();
|
mutate();
|
||||||
}
|
}
|
||||||
// mutate / revalidate when event description updates come in
|
// mutate / revalidate when event description updates come in
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [eventUpdate]);
|
}, [trackedObjectUpdate]);
|
||||||
|
|
||||||
// embeddings reindex progress
|
// embeddings reindex progress
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import { SearchResult } from "@/types/search";
|
|||||||
import ImageLoadingIndicator from "@/components/indicators/ImageLoadingIndicator";
|
import ImageLoadingIndicator from "@/components/indicators/ImageLoadingIndicator";
|
||||||
import useImageLoaded from "@/hooks/use-image-loaded";
|
import useImageLoaded from "@/hooks/use-image-loaded";
|
||||||
import ActivityIndicator from "@/components/indicators/activity-indicator";
|
import ActivityIndicator from "@/components/indicators/activity-indicator";
|
||||||
import { useEventUpdate } from "@/api/ws";
|
import { useTrackedObjectUpdate } from "@/api/ws";
|
||||||
import { isEqual } from "lodash";
|
import { isEqual } from "lodash";
|
||||||
import TimeAgo from "@/components/dynamic/TimeAgo";
|
import TimeAgo from "@/components/dynamic/TimeAgo";
|
||||||
import SearchResultActions from "@/components/menu/SearchResultActions";
|
import SearchResultActions from "@/components/menu/SearchResultActions";
|
||||||
@ -72,13 +72,13 @@ export default function ExploreView({
|
|||||||
}, {});
|
}, {});
|
||||||
}, [events]);
|
}, [events]);
|
||||||
|
|
||||||
const eventUpdate = useEventUpdate();
|
const trackedObjectUpdate = useTrackedObjectUpdate();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
mutate();
|
mutate();
|
||||||
// mutate / revalidate when event description updates come in
|
// mutate / revalidate when event description updates come in
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [eventUpdate]);
|
}, [trackedObjectUpdate]);
|
||||||
|
|
||||||
// update search detail when results change
|
// update search detail when results change
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user