- led-simulator: the rig runs the C++ led-driver as WebAssembly (sim-driver/), one single-threaded worker per bar, no cross-origin isolation needed. Rooms (one JSON per room) with an on-page editor, and a pattern gallery. The Python server, Pyodide boot and ring buffer are removed. - sim-controller sim_rig.c: serves /sim/ from an embedded pack, the page's WebSocket and the rooms/flash API. The desktop build embeds it too. - bridge.c: a "browser" bridge kind that carries ESP-NOW frames to the page; devices announced through it are marked sim. - UI: Simulator in the Menu, split view with resize and pop-out, swipe between controller and rig on phones; SIM/REAL badges in Devices. - Fades: preset pushes and Wi-Fi driver bodies always carry fade and beat_time, so "off" no longer inherits an earlier fade. - Also the sequences-v2 work in progress: desktop port, bridge firmware, serial bridge, Wi-Fi drivers, sequence timeline, audio and API changes. - led-driver: ESP-NOW link, beat sync, control messages, sim hooks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
254 lines
7.0 KiB
CSS
254 lines
7.0 KiB
CSS
:root {
|
|
--bg: #0e0f12;
|
|
--panel: #15171c;
|
|
--panel-2: #1b1e24;
|
|
--line: #2a2e36;
|
|
--text: #d6dae2;
|
|
--muted: #8a909c;
|
|
--accent: #5aa9ff;
|
|
--ok: #3ecf8e;
|
|
--warn: #f2b84b;
|
|
--bad: #ff6b6b;
|
|
--off: #4b505b;
|
|
color-scheme: dark;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
html, body {
|
|
margin: 0;
|
|
height: 100%;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font: 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
}
|
|
|
|
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
button {
|
|
font: inherit;
|
|
color: var(--text);
|
|
background: #253041;
|
|
border: 1px solid #34465f;
|
|
border-radius: 6px;
|
|
padding: 5px 11px;
|
|
cursor: pointer;
|
|
}
|
|
button:hover:not(:disabled) { background: #2d3b50; }
|
|
button:disabled { opacity: .45; cursor: default; }
|
|
button.secondary { background: var(--panel-2); border-color: var(--line); }
|
|
button.secondary:hover:not(:disabled) { background: #232730; }
|
|
button.icon {
|
|
background: none; border: none; font-size: 20px; line-height: 1;
|
|
padding: 0 4px; color: var(--muted);
|
|
}
|
|
button.link {
|
|
background: none; border: none; padding: 0; color: var(--muted);
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.topbar {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: 10px 18px;
|
|
padding: 10px 16px;
|
|
border-bottom: 1px solid var(--line);
|
|
background: var(--panel);
|
|
}
|
|
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
|
|
.brand-mark {
|
|
width: 14px; height: 14px; border-radius: 3px;
|
|
background: linear-gradient(90deg, #ff3b3b, #ffd23b, #3bff8a, #3bb2ff, #b03bff);
|
|
}
|
|
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
.chip {
|
|
border: 1px solid var(--line);
|
|
background: var(--panel-2);
|
|
border-radius: 999px;
|
|
padding: 2px 10px;
|
|
color: var(--muted);
|
|
white-space: nowrap;
|
|
}
|
|
.chip.ok { color: var(--ok); border-color: #22533f; }
|
|
.chip.warn { color: var(--warn); border-color: #5a4720; }
|
|
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
|
|
.toggle { display: flex; align-items: center; gap: 5px; color: var(--muted); margin-left: 6px; }
|
|
|
|
.banner {
|
|
padding: 8px 16px;
|
|
background: #3a1d22;
|
|
color: #ffd6d6;
|
|
border-bottom: 1px solid #5c2a31;
|
|
}
|
|
.banner.info { background: #1d2a3a; color: #d6e8ff; border-color: #2a405c; }
|
|
|
|
.stage {
|
|
flex: 1;
|
|
display: flex;
|
|
min-height: 0;
|
|
}
|
|
.rig {
|
|
flex: 1;
|
|
position: relative;
|
|
min-width: 0;
|
|
min-height: 360px;
|
|
}
|
|
.rig canvas {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.drawer {
|
|
width: 360px;
|
|
max-width: 100%;
|
|
border-left: 1px solid var(--line);
|
|
background: var(--panel);
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 12px 14px;
|
|
gap: 10px;
|
|
min-height: 0;
|
|
}
|
|
.drawer[hidden] { display: none; }
|
|
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; }
|
|
.drawer-title { font-size: 16px; font-weight: 600; }
|
|
.drawer-sub { color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; }
|
|
.facts {
|
|
display: grid;
|
|
grid-template-columns: 80px 1fr;
|
|
gap: 4px 10px;
|
|
margin: 0;
|
|
}
|
|
.facts dt { color: var(--muted); }
|
|
.facts dd { margin: 0; }
|
|
.drawer-actions { display: flex; gap: 6px; flex-wrap: wrap; }
|
|
.log-head { display: flex; justify-content: space-between; color: var(--muted); }
|
|
.log {
|
|
flex: 1;
|
|
min-height: 120px;
|
|
margin: 0;
|
|
overflow: auto;
|
|
background: #0b0c0f;
|
|
border: 1px solid var(--line);
|
|
border-radius: 6px;
|
|
padding: 8px;
|
|
font: 11px/1.45 ui-monospace, Menlo, Consolas, monospace;
|
|
color: #b9c0cc;
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.state-off { color: var(--off); }
|
|
.state-queued, .state-loading { color: var(--warn); }
|
|
.state-running { color: var(--ok); }
|
|
.state-crashed { color: var(--bad); }
|
|
|
|
.hint {
|
|
padding: 8px 16px;
|
|
border-top: 1px solid var(--line);
|
|
color: var(--muted);
|
|
background: var(--panel);
|
|
}
|
|
.hint code {
|
|
color: var(--text);
|
|
font-family: ui-monospace, Menlo, Consolas, monospace;
|
|
}
|
|
|
|
@media (max-width: 760px) {
|
|
.stage { flex-direction: column; }
|
|
.drawer { width: auto; border-left: none; border-top: 1px solid var(--line); max-height: 50vh; }
|
|
.actions { margin-left: 0; }
|
|
}
|
|
|
|
/* ---- rooms and the editor ---- */
|
|
.room-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
|
|
.edit-tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
|
|
.edit-tools[hidden] { display: none; }
|
|
.field-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
|
|
.muted { color: var(--muted); }
|
|
select, input {
|
|
font: inherit;
|
|
color: var(--text);
|
|
background: var(--panel-2);
|
|
border: 1px solid var(--line);
|
|
border-radius: 6px;
|
|
padding: 4px 7px;
|
|
min-width: 0;
|
|
}
|
|
input:focus, select:focus { outline: 2px solid #34465f; outline-offset: 0; }
|
|
a.button {
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
color: var(--text);
|
|
border: 1px solid var(--line);
|
|
background: var(--panel-2);
|
|
border-radius: 6px;
|
|
padding: 5px 11px;
|
|
}
|
|
a.button:hover { background: #232730; }
|
|
button.danger { background: #3a1d22; border-color: #5c2a31; color: #ffd6d6; }
|
|
button.danger:hover:not(:disabled) { background: #4a242b; }
|
|
|
|
.edit-hint {
|
|
display: none;
|
|
padding: 6px 16px;
|
|
background: #1d2a3a;
|
|
color: #d6e8ff;
|
|
border-bottom: 1px solid #2a405c;
|
|
}
|
|
body.editing .edit-hint { display: block; }
|
|
|
|
.note { margin: 0; color: var(--warn); }
|
|
.edit-form {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 8px 10px;
|
|
padding: 10px;
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
background: var(--panel-2);
|
|
}
|
|
.edit-form[hidden] { display: none; }
|
|
.edit-form label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); }
|
|
.edit-form label:first-child, .edit-form label:nth-child(2) { grid-column: 1 / -1; }
|
|
.edit-form button { grid-column: 1 / -1; justify-self: start; }
|
|
|
|
dialog {
|
|
color: var(--text);
|
|
background: var(--panel);
|
|
border: 1px solid var(--line);
|
|
border-radius: 10px;
|
|
padding: 16px 18px;
|
|
width: min(560px, calc(100vw - 32px));
|
|
}
|
|
dialog::backdrop { background: rgba(0, 0, 0, .55); }
|
|
dialog h2 { margin: 0 0 12px; font-size: 15px; }
|
|
dialog form, dialog { display: flex; flex-direction: column; gap: 10px; }
|
|
dialog:not([open]) { display: none; }
|
|
dialog label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); }
|
|
dialog label.check { flex-direction: row; align-items: center; gap: 6px; }
|
|
.dialog-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
|
|
.dialog-actions { display: flex; justify-content: flex-end; gap: 6px; }
|
|
.error { color: var(--bad); margin: 0; min-height: 1em; }
|
|
table.defs { width: 100%; border-collapse: collapse; }
|
|
table.defs th { text-align: left; color: var(--muted); font-weight: normal; padding: 4px; }
|
|
table.defs td { padding: 4px; }
|
|
table.defs input { width: 100%; }
|
|
|
|
.drawer-body { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
|
|
.drawer-body[hidden] { display: none; }
|
|
.drawer-empty { margin: 0; color: var(--muted); }
|
|
.drawer-empty[hidden] { display: none; }
|
|
.drawer-empty code { color: var(--text); }
|
|
|
|
/* In the controller's split view (an iframe beside it) */
|
|
body.embedded .not-embedded { display: none; }
|