From 57f328e9e5c037e3000e08d0f227fbb3a10a112a Mon Sep 17 00:00:00 2001
From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
Date: Thu, 6 Nov 2025 07:39:06 -0600
Subject: [PATCH] improve annotation offset popver
---
web/public/locales/en/views/explore.json | 2 +-
.../overlay/detail/AnnotationSettingsPane.tsx | 70 +++++++------------
.../overlay/detail/SearchDetailDialog.tsx | 13 ++--
3 files changed, 32 insertions(+), 53 deletions(-)
diff --git a/web/public/locales/en/views/explore.json b/web/public/locales/en/views/explore.json
index 24248ffa3..afc81eaa6 100644
--- a/web/public/locales/en/views/explore.json
+++ b/web/public/locales/en/views/explore.json
@@ -74,7 +74,7 @@
"label": "Annotation Offset",
"desc": "This data comes from your camera's detect feed but is overlayed on images from the the record feed. It is unlikely that the two streams are perfectly in sync. As a result, the bounding box and the footage will not line up perfectly. You can use this setting to offset the annotations forward or backward in time to better align them with the recorded footage.",
"millisecondsToOffset": "Milliseconds to offset detect annotations by. Default: 0",
- "tips": "TIP: Imagine there is an event clip with a person walking from left to right. If the event timeline bounding box is consistently to the left of the person then the value should be decreased. Similarly, if a person is walking from left to right and the bounding box is consistently ahead of the person then the value should be increased.",
+ "tips": "Lower the value if the video playback is ahead of the boxes and path points, and increase the value if the video playback is behind them. This value can be negative.",
"toast": {
"success": "Annotation offset for {{camera}} has been saved to the config file. Restart Frigate to apply your changes."
}
diff --git a/web/src/components/overlay/detail/AnnotationSettingsPane.tsx b/web/src/components/overlay/detail/AnnotationSettingsPane.tsx
index 94c44ecdf..ce619c8fb 100644
--- a/web/src/components/overlay/detail/AnnotationSettingsPane.tsx
+++ b/web/src/components/overlay/detail/AnnotationSettingsPane.tsx
@@ -1,6 +1,4 @@
import Heading from "@/components/ui/heading";
-import { Label } from "@/components/ui/label";
-import { Switch } from "@/components/ui/switch";
import { Event } from "@/types/event";
import { FrigateConfig } from "@/types/frigateConfig";
import { zodResolver } from "@hookform/resolvers/zod";
@@ -8,7 +6,6 @@ import axios from "axios";
import { useCallback, useState } from "react";
import { useForm } from "react-hook-form";
import { LuExternalLink } from "react-icons/lu";
-import { PiWarningCircle } from "react-icons/pi";
import { Link } from "react-router-dom";
import { toast } from "sonner";
import useSWR from "swr";
@@ -31,15 +28,11 @@ import { useDocDomain } from "@/hooks/use-doc-domain";
type AnnotationSettingsPaneProps = {
event: Event;
- showZones: boolean;
- setShowZones: React.Dispatch>;
annotationOffset: number;
setAnnotationOffset: React.Dispatch>;
};
export function AnnotationSettingsPane({
event,
- showZones,
- setShowZones,
annotationOffset,
setAnnotationOffset,
}: AnnotationSettingsPaneProps) {
@@ -144,21 +137,7 @@ export function AnnotationSettingsPane({
{t("trackingDetails.annotationSettings.title")}
-