From 3c3b1d68ff5504cec00d87cae78cb3470bd58bfa Mon Sep 17 00:00:00 2001 From: Aiden Date: Fri, 22 May 2026 17:44:12 +1000 Subject: [PATCH] UI Cleanup --- ui/src/App.jsx | 28 ++---- ui/src/components/StackPresetToolbar.jsx | 118 +---------------------- ui/src/components/StatusPanels.jsx | 29 ++++-- 3 files changed, 33 insertions(+), 142 deletions(-) diff --git a/ui/src/App.jsx b/ui/src/App.jsx index 3a1741b..3b857a5 100644 --- a/ui/src/App.jsx +++ b/ui/src/App.jsx @@ -23,8 +23,6 @@ function AppFooter() { function App() { const [appState, setAppState] = useRuntimeState(); - const [presetName, setPresetName] = useState(""); - const [selectedPresetName, setSelectedPresetName] = useState(""); const [expandedLayerIds, setExpandedLayerIds] = useState([]); const [dragLayerId, setDragLayerId] = useState(null); const [dropTargetLayerId, setDropTargetLayerId] = useState(null); @@ -34,16 +32,8 @@ function App() { const performance = appState?.performance ?? {}; const runtime = appState?.runtime ?? {}; const video = appState?.video ?? {}; + const videoOutput = appState?.videoOutput ?? {}; const app = appState?.app ?? {}; - const stackPresets = appState?.stackPresets ?? []; - - useEffect(() => { - if (!selectedPresetName && stackPresets.length > 0) { - setSelectedPresetName(stackPresets[0]); - } else if (selectedPresetName && !stackPresets.includes(selectedPresetName)) { - setSelectedPresetName(stackPresets[0] ?? ""); - } - }, [selectedPresetName, stackPresets]); useEffect(() => { const layerIds = new Set(layers.map((layer) => layer.id)); @@ -70,7 +60,7 @@ function App() {

Video Shader Toys

-

Live shader stack, DeckLink status, and runtime controls.

+

Live shader stack, video IO status, and runtime controls.

{runtime.compileSucceeded ? "Ready" : "Compile Error"} @@ -88,8 +78,8 @@ function App() {
{layers.length}
-
Signal
-
{video.hasSignal ? "Present" : "Missing"}
+
Output
+
{videoOutput.enabled ? "Enabled" : "Disabled"}
Render
@@ -99,14 +89,8 @@ function App() {
- - + +
setScreenshotQueued(false), 1200); - } - } - +export function StackPresetToolbar() { return (
-

Stack presets

-

Save or recall the current layer chain.

+

Runtime controls

+

Rescan manifests and rebuild changed active shader layers.

-
- -
-
- -
- onPresetNameChange(event.target.value)} - /> - -
- {trimmedPresetName ? ( -

- {willOverwrite - ? `This will overwrite the existing preset "${normalizedPresetName}".` - : `This will save as "${normalizedPresetName}".`} -

- ) : ( - - )} -
- -
- -
- - -
- -
-
); } diff --git a/ui/src/components/StatusPanels.jsx b/ui/src/components/StatusPanels.jsx index cd8daee..30e6b7c 100644 --- a/ui/src/components/StatusPanels.jsx +++ b/ui/src/components/StatusPanels.jsx @@ -4,8 +4,21 @@ function formatNumber(value, digits = 3) { return Number(value ?? 0).toFixed(digits); } -export function StatusPanels({ app, performance, runtime, video }) { +function formatEndpoint(endpoint) { + const backend = endpoint?.backend || "none"; + const device = endpoint?.device ? ` ${endpoint.device}` : ""; + return `${backend}${device}`; +} + +function formatVideoMode(endpoint) { + const resolution = endpoint?.resolution || "Unknown"; + const frameRate = endpoint?.frameRate ? ` ${endpoint.frameRate}` : ""; + return `${resolution}${frameRate}`; +} + +export function StatusPanels({ app, performance, runtime, video, videoOutput }) { const budgetUsedPercent = Math.max(0, Math.min(100, Number(performance.budgetUsedPercent) || 0)); + const outputEnabled = Boolean(videoOutput?.enabled); return ( <> @@ -16,8 +29,8 @@ export function StatusPanels({ app, performance, runtime, video }) { {runtime.compileSucceeded ? "Ready" : "Error"} - - {video.hasSignal ? "Signal" : "No signal"} + + {outputEnabled ? "Output" : "No output"}
@@ -51,9 +64,13 @@ export function StatusPanels({ app, performance, runtime, video }) {