From 6205a9d58800740b0c5164c4a958db868a0524cb Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 9 Mar 2026 16:08:50 -0500 Subject: [PATCH] add red dot for any pending changes including profiles --- web/src/pages/Settings.tsx | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/web/src/pages/Settings.tsx b/web/src/pages/Settings.tsx index 0ca568855..9bbb165c6 100644 --- a/web/src/pages/Settings.tsx +++ b/web/src/pages/Settings.tsx @@ -1146,15 +1146,22 @@ export default function Settings() { Record> > = {}; + // Build a set of menu keys that have pending changes for this camera + const pendingMenuKeys = new Set(); + const cameraPrefix = `${selectedCamera}::`; + for (const key of Object.keys(pendingDataBySection)) { + if (key.startsWith(cameraPrefix)) { + const menuKey = pendingKeyToMenuKey(key); + if (menuKey) pendingMenuKeys.add(menuKey); + } + } + // Set override status for all camera sections using the shared mapping Object.entries(CAMERA_SECTION_MAPPING).forEach( ([sectionKey, settingsKey]) => { const isOverridden = cameraOverrides.includes(sectionKey); - // Check if there are pending changes for this camera and section - const pendingDataKey = `${selectedCamera}::${sectionKey}`; - const hasChanges = pendingDataKey in pendingDataBySection; overrideMap[settingsKey] = { - hasChanges, + hasChanges: pendingMenuKeys.has(settingsKey), isOverridden, }; }, @@ -1173,7 +1180,12 @@ export default function Settings() { }); return merged; }); - }, [selectedCamera, cameraOverrides, pendingDataBySection]); + }, [ + selectedCamera, + cameraOverrides, + pendingDataBySection, + pendingKeyToMenuKey, + ]); const renderMenuItemLabel = useCallback( (key: SettingsType) => {