From 5f262621c4c1ba9b6ae038eb8cb089c6d22eb590 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sun, 1 Feb 2026 17:25:39 -0600 Subject: [PATCH] fix red unsaved dot --- web/src/pages/Settings.tsx | 32 +++++++++++++++++++- web/src/views/settings/SingleSectionPage.tsx | 13 ++++++-- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/web/src/pages/Settings.tsx b/web/src/pages/Settings.tsx index ef75e31c5..7e7fbe209 100644 --- a/web/src/pages/Settings.tsx +++ b/web/src/pages/Settings.tsx @@ -464,6 +464,32 @@ const GLOBAL_SECTION_MAPPING: Record = { timestamp_style: "globalTimestampStyle", }; +const ENRICHMENTS_SECTION_MAPPING: Record = { + semantic_search: "integrationSemanticSearch", + genai: "integrationGenerativeAi", + face_recognition: "integrationFaceRecognition", + lpr: "integrationLpr", + classification: "integrationObjectClassification", + audio_transcription: "integrationAudioTranscription", +}; + +const SYSTEM_SECTION_MAPPING: Record = { + database: "systemDatabase", + mqtt: "systemMqtt", + tls: "systemTls", + auth: "systemAuthentication", + networking: "systemNetworking", + proxy: "systemProxy", + ui: "systemUi", + logger: "systemLogging", + environment_vars: "systemEnvironmentVariables", + telemetry: "systemTelemetry", + birdseye: "systemBirdseye", + ffmpeg: "systemFfmpeg", + detectors: "systemDetectorHardware", + model: "systemDetectionModel", +}; + const CAMERA_SECTION_KEYS = new Set( Object.values(CAMERA_SECTION_MAPPING), ); @@ -661,7 +687,11 @@ export default function Settings() { if (level === "camera") { menuKey = CAMERA_SECTION_MAPPING[sectionKey] || sectionKey; } else { - menuKey = GLOBAL_SECTION_MAPPING[sectionKey] || sectionKey; + menuKey = + GLOBAL_SECTION_MAPPING[sectionKey] || + ENRICHMENTS_SECTION_MAPPING[sectionKey] || + SYSTEM_SECTION_MAPPING[sectionKey] || + sectionKey; } setSectionStatusByKey((prev) => ({ diff --git a/web/src/views/settings/SingleSectionPage.tsx b/web/src/views/settings/SingleSectionPage.tsx index 40be4f3cb..7ec3330a6 100644 --- a/web/src/views/settings/SingleSectionPage.tsx +++ b/web/src/views/settings/SingleSectionPage.tsx @@ -1,4 +1,4 @@ -import { useState } from "react"; +import { useCallback, useState } from "react"; import { useTranslation } from "react-i18next"; import type { SectionConfig } from "@/components/config-form/sections"; import { ConfigSectionTemplate } from "@/components/config-form/sections"; @@ -47,6 +47,7 @@ export function SingleSectionPage({ showOverrideIndicator = true, selectedCamera, setUnsavedChanges, + onSectionStatusChange, pendingDataBySection, onPendingDataChange, }: SingleSectionPageProps) { @@ -62,6 +63,14 @@ export function SingleSectionPage({ isOverridden: false, }); + const handleSectionStatusChange = useCallback( + (status: SectionStatus) => { + setSectionStatus(status); + onSectionStatusChange?.(sectionKey, level, status); + }, + [level, onSectionStatusChange, sectionKey], + ); + if (level === "camera" && !selectedCamera) { return (
@@ -122,7 +131,7 @@ export function SingleSectionPage({ pendingDataBySection={pendingDataBySection} onPendingDataChange={onPendingDataChange} requiresRestart={requiresRestart} - onStatusChange={setSectionStatus} + onStatusChange={handleSectionStatusChange} />
);