diff --git a/frigate/config/ui.py b/frigate/config/ui.py index ea28571bd..2f66aeed3 100644 --- a/frigate/config/ui.py +++ b/frigate/config/ui.py @@ -43,4 +43,3 @@ class UIConfig(FrigateBaseModel): unit_system: UnitSystemEnum = Field( default=UnitSystemEnum.metric, title="The unit system to use for measurements." ) - show_camera_names: Optional[bool] = Field(default=False, title="Show camera name") diff --git a/web/public/locales/en/config/ui.json b/web/public/locales/en/config/ui.json index af221b923..fec0a9528 100644 --- a/web/public/locales/en/config/ui.json +++ b/web/public/locales/en/config/ui.json @@ -18,9 +18,6 @@ }, "unit_system": { "label": "The unit system to use for measurements." - }, - "show_camera_names": { - "label": "Show the camera name in the player" } } } \ No newline at end of file diff --git a/web/public/locales/en/views/settings.json b/web/public/locales/en/views/settings.json index 8bed74c01..3dd357eba 100644 --- a/web/public/locales/en/views/settings.json +++ b/web/public/locales/en/views/settings.json @@ -47,6 +47,10 @@ "playAlertVideos": { "label": "Play Alert Videos", "desc": "By default, recent alerts on the Live dashboard play as small looping videos. Disable this option to only show a static image of recent alerts on this device/browser." + }, + "displayCameraNames": { + "label": "Display Camera Names", + "desc": "Displays the camera name in the top-right corner at all times, not just when offline or disabled. Useful for quick identification in multi-camera views." } }, "storedLayouts": { diff --git a/web/src/components/player/LivePlayer.tsx b/web/src/components/player/LivePlayer.tsx index 5e4f368c1..3e7dcde00 100644 --- a/web/src/components/player/LivePlayer.tsx +++ b/web/src/components/player/LivePlayer.tsx @@ -440,11 +440,7 @@ export default function LivePlayer({ (offline && showStillWithoutActivity) || !cameraEnabled) && ( {cameraName} diff --git a/web/src/types/frigateConfig.ts b/web/src/types/frigateConfig.ts index 8ae94ce56..ffe4cc14d 100644 --- a/web/src/types/frigateConfig.ts +++ b/web/src/types/frigateConfig.ts @@ -10,7 +10,6 @@ export interface UiConfig { dashboard: boolean; order: number; unit_system?: "metric" | "imperial"; - show_camera_names?: boolean; } export interface BirdseyeConfig { diff --git a/web/src/views/live/DraggableGridLayout.tsx b/web/src/views/live/DraggableGridLayout.tsx index 2a6793145..5239fe388 100644 --- a/web/src/views/live/DraggableGridLayout.tsx +++ b/web/src/views/live/DraggableGridLayout.tsx @@ -95,6 +95,7 @@ export default function DraggableGridLayout({ } = useCameraLiveMode(cameras, windowVisible); const [globalAutoLive] = usePersistence("autoLiveView", true); + const [displayCameraNames] = usePersistence("displayCameraNames", false); const { allGroupsStreamingSettings, setAllGroupsStreamingSettings } = useStreamingSettings(); @@ -610,7 +611,7 @@ export default function DraggableGridLayout({ streamName={streamName} autoLive={autoLive ?? globalAutoLive} showStillWithoutActivity={showStillWithoutActivity ?? true} - alwaysShowCameraName={config?.ui.show_camera_names ?? false} + alwaysShowCameraName={displayCameraNames} useWebGL={useWebGL} cameraRef={cameraRef} className={cn( diff --git a/web/src/views/live/LiveCameraView.tsx b/web/src/views/live/LiveCameraView.tsx index 1d0aca9b0..2d61d40f5 100644 --- a/web/src/views/live/LiveCameraView.tsx +++ b/web/src/views/live/LiveCameraView.tsx @@ -654,7 +654,7 @@ export default function LiveCameraView({ className={`${fullscreen ? "*:rounded-none" : ""}`} windowVisible showStillWithoutActivity={false} - alwaysShowCameraName={config?.ui.show_camera_names ?? false} + alwaysShowCameraName={false} cameraConfig={camera} playAudio={audio} playInBackground={playInBackground ?? false} diff --git a/web/src/views/live/LiveDashboardView.tsx b/web/src/views/live/LiveDashboardView.tsx index 18402ae02..8b7dd1336 100644 --- a/web/src/views/live/LiveDashboardView.tsx +++ b/web/src/views/live/LiveDashboardView.tsx @@ -211,6 +211,7 @@ export default function LiveDashboardView({ } = useCameraLiveMode(cameras, windowVisible); const [globalAutoLive] = usePersistence("autoLiveView", true); + const [displayCameraNames] = usePersistence("displayCameraNames", false); const { allGroupsStreamingSettings, setAllGroupsStreamingSettings } = useStreamingSettings(); @@ -549,7 +550,7 @@ export default function LiveDashboardView({ preferredLiveMode={preferredLiveModes[camera.name] ?? "mse"} autoLive={autoLive ?? globalAutoLive} showStillWithoutActivity={showStillWithoutActivity ?? true} - alwaysShowCameraName={config?.ui.show_camera_names ?? false} + alwaysShowCameraName={displayCameraNames} useWebGL={useWebGL} playInBackground={false} showStats={statsStates[camera.name]} diff --git a/web/src/views/settings/UiSettingsView.tsx b/web/src/views/settings/UiSettingsView.tsx index 432a989a7..092e3713d 100644 --- a/web/src/views/settings/UiSettingsView.tsx +++ b/web/src/views/settings/UiSettingsView.tsx @@ -92,6 +92,10 @@ export default function UiSettingsView() { // settings const [autoLive, setAutoLive] = usePersistence("autoLiveView", true); + const [cameraNames, setCameraName] = usePersistence( + "displayCameraNames", + false, + ); const [playbackRate, setPlaybackRate] = usePersistence("playbackRate", 1); const [weekStartsOn, setWeekStartsOn] = usePersistence("weekStartsOn", 0); const [alertVideos, setAlertVideos] = usePersistence("alertVideos", true); @@ -142,6 +146,21 @@ export default function UiSettingsView() {

{t("general.liveDashboard.playAlertVideos.desc")}

+
+
+ + +
+
+

{t("general.liveDashboard.displayCameraNames.desc")}

+
+