From 54d011897dc5c7069095baf7f28792cf222bcfa6 Mon Sep 17 00:00:00 2001 From: Andrew Davis <1709934+Savid@users.noreply.github.com> Date: Thu, 3 Apr 2025 18:18:21 +1000 Subject: [PATCH] cleanup macrobar --- ui/src/components/MacroBar.tsx | 4 ++- ui/src/components/MacroForm.tsx | 12 ++++----- ui/src/components/WebRTCVideo.tsx | 22 ++++++++------- ui/src/routes/devices.$id.settings.macros.tsx | 27 ++++++++++--------- 4 files changed, 35 insertions(+), 30 deletions(-) diff --git a/ui/src/components/MacroBar.tsx b/ui/src/components/MacroBar.tsx index 107d8de..066c21f 100644 --- a/ui/src/components/MacroBar.tsx +++ b/ui/src/components/MacroBar.tsx @@ -27,7 +27,9 @@ export default function MacroBar() { return (
- +
+ +
{macros.map(macro => (
diff --git a/ui/src/components/WebRTCVideo.tsx b/ui/src/components/WebRTCVideo.tsx index f169553..8e46a5e 100644 --- a/ui/src/components/WebRTCVideo.tsx +++ b/ui/src/components/WebRTCVideo.tsx @@ -528,16 +528,18 @@ export default function WebRTCVideo() { return (
-
- - videoElm.current?.requestFullscreen({ - navigationUI: "show", - }) - } - /> - -
+
+
+ + videoElm.current?.requestFullscreen({ + navigationUI: "show", + }) + } + /> + +
+
{macro.name} -

+

{macro.steps.map((step, stepIndex) => { const StepIcon = stepIndex === 0 ? LuMoveRight : LuCornerDownRight; @@ -154,7 +154,7 @@ export default function SettingsMacrosRoute() { {Array.isArray(step.keys) && step.keys.map((key, idx) => ( - + {keyDisplayMap[key] || key} {idx < step.keys.length - 1 && ( @@ -210,16 +210,18 @@ export default function SettingsMacrosRoute() { title="Macros" description={`${loading ? '?' : macros.length}/${MAX_TOTAL_MACROS}`} > -

-
+ { macros.length > 0 && ( +
+
+ )}
@@ -235,7 +237,6 @@ export default function SettingsMacrosRoute() { ) : macros.length === 0 ? (