mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-12 10:07:36 +03:00
Add genai info
This commit is contained in:
parent
db7eef27c9
commit
4b671f2894
@ -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 objectCount = fetchedEvents
|
const reviewInfo = useMemo(() => {
|
||||||
? fetchedEvents.length
|
if (review.data.metadata?.title) {
|
||||||
: (review.data.objects ?? []).length;
|
return review.data.metadata.title;
|
||||||
|
} else {
|
||||||
|
const objectCount = fetchedEvents
|
||||||
|
? fetchedEvents.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">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user