From c0f70295d8356d0492fa23d5553ecba0c749a4aa Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Wed, 8 Apr 2026 07:34:17 -0500 Subject: [PATCH] match replay objects list with debug view --- web/src/pages/Replay.tsx | 132 +++++++++++++++++++++------------------ 1 file changed, 70 insertions(+), 62 deletions(-) diff --git a/web/src/pages/Replay.tsx b/web/src/pages/Replay.tsx index 50927d1dd..2a6ea9ad1 100644 --- a/web/src/pages/Replay.tsx +++ b/web/src/pages/Replay.tsx @@ -41,6 +41,7 @@ import { Toaster } from "@/components/ui/sonner"; import { CameraConfig, FrigateConfig } from "@/types/frigateConfig"; import { getIconForLabel } from "@/utils/iconUtil"; import { getTranslatedLabel } from "@/utils/i18n"; +import { Card } from "@/components/ui/card"; import { ObjectType } from "@/types/ws"; import WsMessageFeed from "@/components/ws/WsMessageFeed"; import { ConfigSectionTemplate } from "@/components/config-form/sections/ConfigSectionTemplate"; @@ -633,7 +634,7 @@ type ObjectListProps = { }; function ObjectList({ cameraConfig, objects, config }: ObjectListProps) { - const { t } = useTranslation(["views/settings"]); + const { t } = useTranslation(["views/settings", "common"]); const colormap = useMemo(() => { if (!config) { @@ -660,73 +661,80 @@ function ObjectList({ cameraConfig, objects, config }: ObjectListProps) { } return ( -
+
{objects.map((obj: ObjectType) => { return ( -
+
-
- {getIconForLabel(obj.label, "object", "size-4 text-white")} +
+
+ {getIconForLabel(obj.label, "object", "size-5 text-white")} +
+
+ {getTranslatedLabel(obj.label)} +
-
- {getTranslatedLabel(obj.label)} +
+
+
+

+ {t("debug.objectShapeFilterDrawing.score", { + ns: "views/settings", + })} +

+ {obj.score ? (obj.score * 100).toFixed(1).toString() : "-"}% +
+
+
+
+

+ {t("debug.objectShapeFilterDrawing.ratio", { + ns: "views/settings", + })} +

+ {obj.ratio ? obj.ratio.toFixed(2).toString() : "-"} +
+
+
+
+

+ {t("debug.objectShapeFilterDrawing.area", { + ns: "views/settings", + })} +

+ {obj.area && cameraConfig ? ( +
+
+ {t("information.pixels", { + ns: "common", + area: obj.area, + })} +
+
+ {( + (obj.area / + (cameraConfig.detect.width * + cameraConfig.detect.height)) * + 100 + ).toFixed(2)} + % +
+
+ ) : ( + "-" + )} +
+
-
-
- - {t("debug.objectShapeFilterDrawing.score", { - ns: "views/settings", - })} - : - - - {obj.score ? (obj.score * 100).toFixed(1) : "-"}% - -
- {obj.ratio && ( -
- - {t("debug.objectShapeFilterDrawing.ratio", { - ns: "views/settings", - })} - : - - {obj.ratio.toFixed(2)} -
- )} - {obj.area && cameraConfig && ( -
- - {t("debug.objectShapeFilterDrawing.area", { - ns: "views/settings", - })} - : - - - {obj.area} px ( - {( - (obj.area / - (cameraConfig.detect.width * - cameraConfig.detect.height)) * - 100 - ).toFixed(2)} - %) - -
- )} -
-
+ ); })}