diff --git a/web/public/locales/en/views/settings.json b/web/public/locales/en/views/settings.json index dd93a62ec0..1391e69ede 100644 --- a/web/public/locales/en/views/settings.json +++ b/web/public/locales/en/views/settings.json @@ -40,6 +40,11 @@ "profilePrefix": "{{profile}} profile: {{fields}}" } }, + "menuDot": { + "overrideGlobal": "This section overrides the global configuration", + "overrideProfile": "This section is overridden by the {{profile}} profile", + "unsaved": "This section has unsaved changes" + }, "menu": { "general": "General", "globalConfig": "Global configuration", diff --git a/web/src/pages/Settings.tsx b/web/src/pages/Settings.tsx index b916e84609..fb1d4a37f7 100644 --- a/web/src/pages/Settings.tsx +++ b/web/src/pages/Settings.tsx @@ -103,6 +103,12 @@ import SaveAllPreviewPopover, { type SaveAllPreviewItem, } from "@/components/overlay/detail/SaveAllPreviewPopover"; import { useRestart } from "@/api/ws"; +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/components/ui/tooltip"; +import { TooltipPortal } from "@radix-ui/react-tooltip"; const allSettingsViews = [ "uiSettings", @@ -1386,10 +1392,20 @@ export default function Settings() { CAMERA_SECTION_KEYS.has(key) && status?.isOverridden; const showUnsavedDot = status?.hasChanges; - const dotColor = - status?.overrideSource === "profile" && activeProfileColor - ? activeProfileColor.dot - : "bg-selected"; + const isProfileOverride = + status?.overrideSource === "profile" && activeProfileColor; + const dotColor = isProfileOverride + ? activeProfileColor.dot + : "bg-selected"; + + const overrideTooltip = isProfileOverride + ? t("menuDot.overrideProfile", { + profile: activeEditingProfile + ? (profileFriendlyNames.get(activeEditingProfile) ?? + activeEditingProfile) + : "", + }) + : t("menuDot.overrideGlobal"); return (