From c75b6f1ff69d944bb07b9395880a63620a0a8a00 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 10 Nov 2026 19:53:32 +0100 Subject: feat(dashboard): one fixed screen for the tablet The Dashboard tab drops the draggable card grid for a fixed layout: a top band of system, Claude and tablet chips with trend and fill backgrounds, music and spending always on, a row of one to three busy modules (printer, build VM, OBS) that scroll long lines, and the action icons in Hyprland's rotating border. The stats, tablet and llm panels and the vendored Gridstack go. Co-Authored-By: Claude Opus 5.5 --- static/modules/obs.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'static/modules/obs.js') diff --git a/static/modules/obs.js b/static/modules/obs.js index 6842522..bcf237b 100644 --- a/static/modules/obs.js +++ b/static/modules/obs.js @@ -54,6 +54,26 @@ async function post(action, body = {}) { } } +// The dashboard's running slot: what is live, the scene and the elapsed +// time, and a stop for it. +export const busy = (st) => Boolean(st.connected && (st.recording || st.streaming)); + +export function slot(st, el) { + if (!el.firstChild) { + el.innerHTML = ` + + + `; + } + const what = st.recording ? (st.paused ? "Recording paused" : "Recording") : "Streaming"; + el.querySelector(".what > span").textContent = `${what} · ${st.currentScene ?? ""}`; + el.querySelector(".pct").textContent = st.recording ? clock(st.recordingTime) : "live"; + el.querySelector(".meta > span").textContent = + [st.recording ? "recording" : null, st.streaming ? "streaming" : null].filter(Boolean).join(" + "); + el.querySelector(".act").onclick = () => + post(st.recording ? "record" : "stream", { on: false }); +} + function bigButton(kind, name, label, on, times) { const b = document.createElement("button"); b.className = `deck-btn ${kind}${on ? " on" : ""}`; -- cgit v1.2.3