add link to speed estimation docs in zone edit pane

This commit is contained in:
Josh Hawkins 2025-05-09 11:00:37 -05:00
parent aff4563fcc
commit 6376fbe8cb
2 changed files with 15 additions and 1 deletions

View File

@ -268,7 +268,8 @@
"allObjects": "All Objects",
"speedEstimation": {
"title": "Speed Estimation",
"desc": "Enable speed estimation for objects in this zone. The zone must have exactly 4 points."
"desc": "Enable speed estimation for objects in this zone. The zone must have exactly 4 points.",
"docs": "Read the documentation"
},
"speedThreshold": {
"title": "Speed Threshold ({{unit}})",

View File

@ -30,6 +30,8 @@ import { flattenPoints, interpolatePoints } from "@/utils/canvasUtil";
import ActivityIndicator from "../indicators/activity-indicator";
import { getAttributeLabels } from "@/utils/iconUtil";
import { Trans, useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import { LuExternalLink } from "react-icons/lu";
type ZoneEditPaneProps = {
polygons?: Polygon[];
@ -669,6 +671,17 @@ export default function ZoneEditPane({
</div>
<FormDescription>
{t("masksAndZones.zones.speedEstimation.desc")}
<div className="mt-2 flex items-center text-primary">
<Link
to="https://docs.frigate.video/configuration/zones#speed-estimation"
target="_blank"
rel="noopener noreferrer"
className="inline"
>
{t("masksAndZones.zones.speedEstimation.docs")}
<LuExternalLink className="ml-2 inline-flex size-3" />
</Link>
</div>
</FormDescription>
<FormMessage />
</FormItem>