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/k1c.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'static/modules/k1c.js') diff --git a/static/modules/k1c.js b/static/modules/k1c.js index d8211fa..261ef4d 100644 --- a/static/modules/k1c.js +++ b/static/modules/k1c.js @@ -86,6 +86,37 @@ function armHold(btn) { btn.style.setProperty("--hold", `${HOLD_MS}ms`); } +// The dashboard's running slot: file, percent, time left, layer and +// temperatures, the press-and-hold stop and a progress bar. Wide slots show +// the slicer thumbnail in place of the icon (deck.css container query). +export const busy = (st) => !st.offline && (st.state === "printing" || st.state === "paused"); + +export function slot(st, el) { + if (!el.firstChild) { + el.innerHTML = ` + + + +
`; + armHold(el.querySelector(".estop")); + } + const p = st.progress ?? 0; + const name = (st.file ?? "").split("/").pop(); + el.querySelector(".what > span").textContent = st.state === "paused" ? `Paused · ${name}` : name; + el.querySelector(".pct").textContent = `${Math.round(p * 100)}%`; + el.querySelector(".meta > span").textContent = [ + `${dur(st.remaining)} left`, + st.layers ? `layer ${st.layer ?? "?"}/${st.layers}` : null, + `${temp(st.extruder)} / ${temp(st.bed)}`, + ].filter(Boolean).join(" · "); + el.querySelector(".bar i").style.width = `${p * 100}%`; + const thumb = el.querySelector(".sthumb"); + thumb.hidden = !st.thumbnail; + if (st.thumbnail && thumb.getAttribute("src") !== st.thumbnail) thumb.src = st.thumbnail; +} + export default { title: "K1C", tab: "K1C", -- cgit v1.2.3