mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-17 16:44:29 +03:00
frontend
This commit is contained in:
parent
227eec49a3
commit
cfc4a5367e
@ -316,6 +316,18 @@ function ObjectDetailsTab({
|
|||||||
}
|
}
|
||||||
}, [search]);
|
}, [search]);
|
||||||
|
|
||||||
|
const maxEstimatedSpeed = useMemo(() => {
|
||||||
|
if (!search || !search.data?.max_estimated_speed) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (search.data?.max_estimated_speed != 0) {
|
||||||
|
return search.data?.max_estimated_speed.toFixed(1);
|
||||||
|
} else {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
}, [search]);
|
||||||
|
|
||||||
const updateDescription = useCallback(() => {
|
const updateDescription = useCallback(() => {
|
||||||
if (!search) {
|
if (!search) {
|
||||||
return;
|
return;
|
||||||
@ -427,6 +439,15 @@ function ObjectDetailsTab({
|
|||||||
{score}%{subLabelScore && ` (${subLabelScore}%)`}
|
{score}%{subLabelScore && ` (${subLabelScore}%)`}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{maxEstimatedSpeed && (
|
||||||
|
<div className="flex flex-col gap-1.5">
|
||||||
|
<div className="text-sm text-primary/40">Max Estimated Speed</div>
|
||||||
|
<div className="text-sm">
|
||||||
|
{maxEstimatedSpeed}{" "}
|
||||||
|
{config?.ui.unit_system == "imperial" ? "mph" : "kph"}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div className="flex flex-col gap-1.5">
|
<div className="flex flex-col gap-1.5">
|
||||||
<div className="text-sm text-primary/40">Camera</div>
|
<div className="text-sm text-primary/40">Camera</div>
|
||||||
<div className="text-sm capitalize">
|
<div className="text-sm capitalize">
|
||||||
|
|||||||
@ -55,6 +55,7 @@ export type SearchResult = {
|
|||||||
ratio: number;
|
ratio: number;
|
||||||
type: "object" | "audio" | "manual";
|
type: "object" | "audio" | "manual";
|
||||||
description?: string;
|
description?: string;
|
||||||
|
max_estimated_speed: number;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user