diff --git a/frigate/object_processing.py b/frigate/object_processing.py index 9fc21a28b..6dd70781e 100644 --- a/frigate/object_processing.py +++ b/frigate/object_processing.py @@ -740,11 +740,11 @@ class CameraState: if not obj.false_positive: label = object_type - if ( - obj.obj_data.get("sub_label") - and obj.obj_data.get("sub_label")[0] in ALL_ATTRIBUTE_LABELS - ): - label = obj.obj_data["sub_label"] + if obj.obj_data.get("sub_label"): + if obj.obj_data.get("sub_label")[0] in ALL_ATTRIBUTE_LABELS: + label = obj.obj_data["sub_label"][0] + else: + label = f"{object_type}-verified" camera_activity["objects"].append( {"id": obj.obj_data["id"], "label": label, "stationary": not active} diff --git a/web/src/components/card/AnimatedEventCard.tsx b/web/src/components/card/AnimatedEventCard.tsx index 0ce535518..126dd4511 100644 --- a/web/src/components/card/AnimatedEventCard.tsx +++ b/web/src/components/card/AnimatedEventCard.tsx @@ -62,7 +62,7 @@ export function AnimatedEventCard({ event }: AnimatedEventCardProps) {
setCameraHovered(true)} - onMouseLeave={() => setCameraHovered(false)} >
@@ -173,7 +168,7 @@ export default function LivePlayer({
{[ ...new Set([ diff --git a/web/src/hooks/use-camera-activity.ts b/web/src/hooks/use-camera-activity.ts index ef065dd81..4e3b8b4be 100644 --- a/web/src/hooks/use-camera-activity.ts +++ b/web/src/hooks/use-camera-activity.ts @@ -3,7 +3,7 @@ import { useInitialCameraState, useMotionActivity, } from "@/api/ws"; -import { CameraConfig } from "@/types/frigateConfig"; +import { ATTRIBUTE_LABELS, CameraConfig } from "@/types/frigateConfig"; import { MotionData, ReviewSegment } from "@/types/review"; import { useEffect, useMemo, useState } from "react"; import { useTimelineUtils } from "./use-timeline-utils"; @@ -29,6 +29,7 @@ export function useCameraActivity( useEffect(() => { if (updatedCameraState) { + console.log(`the initial objects are ${JSON.stringify(updatedCameraState.objects)}`) setObjects(updatedCameraState.objects); } }, [updatedCameraState]); @@ -77,8 +78,20 @@ export function useCameraActivity( } } else { const newObjects = [...objects]; - newObjects[updatedEventIndex].label = - updatedEvent.after.sub_label ?? updatedEvent.after.label; + + let label = updatedEvent.after.label; + + if (updatedEvent.after.sub_label) { + const sub_label = updatedEvent.after.sub_label[0]; + + if (ATTRIBUTE_LABELS.includes(sub_label)) { + label = sub_label; + } else { + label = `${label}-verified`; + } + } + + newObjects[updatedEventIndex].label = label; newObjects[updatedEventIndex].stationary = updatedEvent.after.stationary; setObjects(newObjects); diff --git a/web/src/pages/SubmitPlus.tsx b/web/src/pages/SubmitPlus.tsx index 8cfd74c90..f51ad514d 100644 --- a/web/src/pages/SubmitPlus.tsx +++ b/web/src/pages/SubmitPlus.tsx @@ -141,7 +141,7 @@ export default function SubmitPlus() { open={upload != undefined} onOpenChange={(open) => (!open ? setUpload(undefined) : null)} > - + Submit To Frigate+ diff --git a/web/tailwind.config.js b/web/tailwind.config.js index 93faa87ca..924a7327e 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -139,7 +139,8 @@ module.exports = { xs: "480px", "2xl": "1440px", "3xl": "1920px", - "4xl": "2560px", + "2k": "2560px", + "4k": "3180px", }, }, },