From 16f1c575d7c09ab0e1406baf9429ca7f53ac476a Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sat, 18 May 2024 14:19:32 -0600 Subject: [PATCH] UI Fixes (#11423) * Settings fixes * Fix formatting --- web/src/components/Statusbar.tsx | 4 +- web/src/components/menu/AccountSettings.tsx | 94 ++++++++++----------- web/src/components/menu/GeneralSettings.tsx | 30 +++---- web/src/components/navigation/Bottombar.tsx | 4 +- web/src/components/player/PreviewPlayer.tsx | 4 +- web/src/hooks/use-stats.ts | 2 +- web/src/views/live/LiveCameraView.tsx | 28 +++--- 7 files changed, 83 insertions(+), 83 deletions(-) diff --git a/web/src/components/Statusbar.tsx b/web/src/components/Statusbar.tsx index d0c142b32..b2574f2ee 100644 --- a/web/src/components/Statusbar.tsx +++ b/web/src/components/Statusbar.tsx @@ -116,7 +116,7 @@ export default function Statusbar() { ); })} -
+
{Object.entries(messages).length === 0 ? (
@@ -129,7 +129,7 @@ export default function Statusbar() { const message = (
- - - - - -
- -
-
- - -

Account

-
-
-
-
-
- -
- - Current User: {profile?.username || "anonymous"} - - - + + + + - - -
+ +
+ + + +

Account

+
+
+ + + +
+ + Current User: {profile?.username || "anonymous"} + + + + + + Logout + + +
+
+ ); } diff --git a/web/src/components/menu/GeneralSettings.tsx b/web/src/components/menu/GeneralSettings.tsx index d40a1a33b..608db7997 100644 --- a/web/src/components/menu/GeneralSettings.tsx +++ b/web/src/components/menu/GeneralSettings.tsx @@ -116,22 +116,20 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
- - - -
- -
-
- - -

Settings

-
-
-
-
+ + +
+ +
+
+ + +

Settings

+
+
+
+
No Preview Found
- ) + ); } export abstract class PreviewController { diff --git a/web/src/hooks/use-stats.ts b/web/src/hooks/use-stats.ts index d381a6b48..bafc9e538 100644 --- a/web/src/hooks/use-stats.ts +++ b/web/src/hooks/use-stats.ts @@ -51,7 +51,7 @@ export default function useStats(stats: FrigateStats | undefined) { return; } - if (config.cameras[name].enabled && (cam["camera_fps"] == 0)) { + if (config.cameras[name].enabled && cam["camera_fps"] == 0) { problems.push({ text: `${capitalizeFirstLetter(name.replaceAll("_", " "))} is offline`, color: "text-danger", diff --git a/web/src/views/live/LiveCameraView.tsx b/web/src/views/live/LiveCameraView.tsx index a599151df..cc27b72bf 100644 --- a/web/src/views/live/LiveCameraView.tsx +++ b/web/src/views/live/LiveCameraView.tsx @@ -101,7 +101,9 @@ export default function LiveCameraView({ camera }: LiveCameraViewProps) { return ( cameraMetadata.producers.find( (prod) => - prod.medias && prod.medias.find((media) => media.includes("audio, sendonly")) != undefined, + prod.medias && + prod.medias.find((media) => media.includes("audio, sendonly")) != + undefined, ) != undefined ); }, [cameraMetadata]); @@ -113,10 +115,12 @@ export default function LiveCameraView({ camera }: LiveCameraViewProps) { return ( cameraMetadata.producers.find( (prod) => - prod.medias && prod.medias.find((media) => media.includes("audio, recvonly")) != undefined, + prod.medias && + prod.medias.find((media) => media.includes("audio, recvonly")) != + undefined, ) != undefined ); - }, [cameraMetadata]) + }, [cameraMetadata]); // click overlay for ptzs @@ -351,14 +355,16 @@ export default function LiveCameraView({ camera }: LiveCameraViewProps) { onClick={() => setMic(!mic)} /> )} - {supportsAudioOutput && setAudio(!audio)} - />} + {supportsAudioOutput && ( + setAudio(!audio)} + /> + )}