mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 13:34:13 +03:00
Add GenAI info to detail stream (#20527)
Some checks are pending
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
Some checks are pending
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
* Add camera previews back * Add genai info
This commit is contained in:
parent
b52044aecc
commit
9599450cff
@ -1,4 +1,4 @@
|
|||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useMemo, useRef, useState } from "react";
|
||||||
import { ObjectLifecycleSequence } from "@/types/timeline";
|
import { ObjectLifecycleSequence } from "@/types/timeline";
|
||||||
import { LifecycleIcon } from "@/components/overlay/detail/ObjectLifecycle";
|
import { LifecycleIcon } from "@/components/overlay/detail/ObjectLifecycle";
|
||||||
import { getLifecycleItemDescription } from "@/utils/lifecycleUtil";
|
import { getLifecycleItemDescription } from "@/utils/lifecycleUtil";
|
||||||
@ -256,9 +256,18 @@ function ReviewGroup({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const reviewInfo = useMemo(() => {
|
||||||
|
if (review.data.metadata?.title) {
|
||||||
|
return review.data.metadata.title;
|
||||||
|
} else {
|
||||||
const objectCount = fetchedEvents
|
const objectCount = fetchedEvents
|
||||||
? fetchedEvents.length
|
? fetchedEvents.length
|
||||||
: (review.data.objects ?? []).length;
|
: (review.data.objects ?? []).length;
|
||||||
|
|
||||||
|
return `${objectCount} ${t("detail.trackedObject", { count: objectCount })}`;
|
||||||
|
}
|
||||||
|
}, [review, t, fetchedEvents]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-review-id={id}
|
data-review-id={id}
|
||||||
@ -278,9 +287,7 @@ function ReviewGroup({
|
|||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<div className="text-sm font-medium">{displayTime}</div>
|
<div className="text-sm font-medium">{displayTime}</div>
|
||||||
<div className="text-xs text-muted-foreground">
|
<div className="text-xs text-muted-foreground">{reviewInfo}</div>
|
||||||
{objectCount} {t("detail.trackedObject", { count: objectCount })}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
|
|||||||
@ -774,9 +774,7 @@ export function RecordingView({
|
|||||||
containerRef={mainLayoutRef}
|
containerRef={mainLayoutRef}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{isDesktop &&
|
{isDesktop && effectiveCameras.length > 1 && (
|
||||||
effectiveCameras.length > 1 &&
|
|
||||||
timelineType !== "detail" && (
|
|
||||||
<div
|
<div
|
||||||
ref={previewRowRef}
|
ref={previewRowRef}
|
||||||
className={cn(
|
className={cn(
|
||||||
@ -785,6 +783,7 @@ export function RecordingView({
|
|||||||
? "h-full w-72 flex-col"
|
? "h-full w-72 flex-col"
|
||||||
: `h-28 w-full`,
|
: `h-28 w-full`,
|
||||||
previewRowOverflows ? "" : "items-center justify-center",
|
previewRowOverflows ? "" : "items-center justify-center",
|
||||||
|
timelineType == "detail" && "mt-4",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="w-2" />
|
<div className="w-2" />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user