diff --git a/web/public/locales/en/views/settings.json b/web/public/locales/en/views/settings.json index 7c6475668..7d07d5064 100644 --- a/web/public/locales/en/views/settings.json +++ b/web/public/locales/en/views/settings.json @@ -1240,7 +1240,8 @@ "keyRequired": "Detector name is required.", "keyDuplicate": "Detector name already exists.", "noSchema": "No detector schemas are available.", - "none": "No detector instances configured." + "none": "No detector instances configured.", + "add": "Add detector" }, "record": { "title": "Recording Settings" diff --git a/web/src/components/config-form/sections/BaseSection.tsx b/web/src/components/config-form/sections/BaseSection.tsx index 81d9b16f9..4a417f85b 100644 --- a/web/src/components/config-form/sections/BaseSection.tsx +++ b/web/src/components/config-form/sections/BaseSection.tsx @@ -25,12 +25,7 @@ import { useSectionSchema } from "@/hooks/use-config-schema"; import type { FrigateConfig } from "@/types/frigateConfig"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; -import { - LuRotateCcw, - LuSave, - LuChevronDown, - LuChevronRight, -} from "react-icons/lu"; +import { LuChevronDown, LuChevronRight } from "react-icons/lu"; import Heading from "@/components/ui/heading"; import get from "lodash/get"; import unset from "lodash/unset"; @@ -874,7 +869,6 @@ export function ConfigSection({ disabled={isSaving || disabled} className="flex flex-1 gap-2" > - {level === "global" ? t("button.resetToDefault", { ns: "common", @@ -911,10 +905,7 @@ export function ConfigSection({ })} ) : ( - <> - - {t("button.save", { ns: "common", defaultValue: "Save" })} - + <>{t("button.save", { ns: "common", defaultValue: "Save" })} )} diff --git a/web/src/components/config-form/theme/fields/DetectorHardwareField.tsx b/web/src/components/config-form/theme/fields/DetectorHardwareField.tsx index 1e097c691..dca280926 100644 --- a/web/src/components/config-form/theme/fields/DetectorHardwareField.tsx +++ b/web/src/components/config-form/theme/fields/DetectorHardwareField.tsx @@ -628,13 +628,6 @@ export function DetectorHardwareField(props: FieldProps) { const detectorEntries = Object.entries(detectors); const isDisabled = Boolean(disabled || readonly); - const addLabel = `${t("button.add", { - ns: "common", - defaultValue: "Add", - })} ${t("detectors.label", { - ns: configNamespace, - defaultValue: "Detector hardware", - })}`; return (
@@ -806,10 +799,13 @@ export function DetectorHardwareField(props: FieldProps) {
)} -
-
+
+
- {addLabel} + {t("configForm.detectors.add", { + ns: "views/settings", + defaultValue: "Add detector", + })}