feat(02): controller UI — vertical anim list, play/pause, browser audio, terminal aesthetic
- Replace waveform+DAW layout with animation controller - Animations as vertical list with > cursor, no icons - Transport: play/pause button, seek slider, time display - Browser <audio> handles playback, 10Hz ticks to server - Sidebar: devices only (200px) - python:3.11-slim base (replaces Alpine, fixes librosa/numba build) - libsndfile symlink kept for soundfile - Remove python-mpv, add librosa for beat detection
This commit is contained in:
@@ -8,10 +8,8 @@
|
||||
--text-primary: #cccccc;
|
||||
--text-dim: #555555;
|
||||
--text-accent: var(--accent);
|
||||
--text-warning: #ff6600;
|
||||
--font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
|
||||
--font-size: 13px;
|
||||
--panel-gap: 1px;
|
||||
}
|
||||
|
||||
*, *::before, *::after {
|
||||
@@ -30,75 +28,145 @@ body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* DAW layout — header / (sidebar + main) / transport */
|
||||
/* Layout: header / (sidebar + main) / transport */
|
||||
.app-shell {
|
||||
display: grid;
|
||||
grid-template-rows: 40px 1fr 48px;
|
||||
grid-template-columns: 280px 1fr;
|
||||
grid-template-rows: 36px 1fr 52px;
|
||||
grid-template-columns: 200px 1fr;
|
||||
grid-template-areas:
|
||||
"header header"
|
||||
"sidebar main"
|
||||
"transport transport";
|
||||
height: 100vh;
|
||||
gap: var(--panel-gap);
|
||||
gap: 1px;
|
||||
background: #111;
|
||||
}
|
||||
|
||||
/* ── Header ─────────────────────────────────── */
|
||||
.header {
|
||||
grid-area: header;
|
||||
background: var(--bg-panel-dark);
|
||||
border-bottom: 1px solid var(--border-dim);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 16px;
|
||||
gap: 16px;
|
||||
padding: 0 12px;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
color: var(--text-accent);
|
||||
font-size: 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.15em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.header-sep {
|
||||
color: var(--border-dim);
|
||||
}
|
||||
|
||||
.status-dot {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: var(--text-dim);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.status-dot.connected { background: #00ff88; }
|
||||
.status-dot.error { background: #ff3333; }
|
||||
|
||||
.beat-indicator {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
border-radius: 50%;
|
||||
background: var(--text-dim);
|
||||
flex-shrink: 0;
|
||||
transition: background 0.05s;
|
||||
}
|
||||
.beat-indicator.beat-flash {
|
||||
background: #ffcc00;
|
||||
box-shadow: 0 0 10px #ffcc00;
|
||||
}
|
||||
.beat-label {
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.12em;
|
||||
}
|
||||
|
||||
/* ── Sidebar ─────────────────────────────────── */
|
||||
.sidebar {
|
||||
grid-area: sidebar;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--bg-panel);
|
||||
border-right: 1px solid var(--border-dim);
|
||||
overflow: hidden;
|
||||
gap: var(--panel-gap);
|
||||
}
|
||||
|
||||
.panel {
|
||||
border: 1px solid var(--border-dim);
|
||||
background: var(--bg-panel);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.panel-header {
|
||||
background: var(--bg-panel-dark);
|
||||
border-bottom: 1px solid var(--border-dim);
|
||||
padding: 6px 12px;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.12em;
|
||||
padding: 5px 10px;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.14em;
|
||||
color: var(--text-accent);
|
||||
text-transform: uppercase;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.panel-content {
|
||||
flex: 1;
|
||||
padding: 8px 10px;
|
||||
overflow-y: auto;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar { width: 3px; }
|
||||
::-webkit-scrollbar-track { background: transparent; }
|
||||
::-webkit-scrollbar-thumb { background: var(--border-dim); }
|
||||
|
||||
.device-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 5px 0;
|
||||
border-bottom: 1px solid #111;
|
||||
gap: 6px;
|
||||
}
|
||||
.device-row:last-child { border-bottom: none; }
|
||||
|
||||
.device-row-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1px;
|
||||
min-width: 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* Device manage section — collapsible via <details> */
|
||||
.device-remove {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-dim);
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
padding: 0 2px;
|
||||
line-height: 1;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.device-remove:hover { color: #ff3333; border: none; }
|
||||
|
||||
.device-manage-section {
|
||||
border-top: 1px solid var(--border-dim);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.device-manage-section > summary {
|
||||
padding: 5px 12px;
|
||||
padding: 5px 10px;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
@@ -107,98 +175,167 @@ body {
|
||||
user-select: none;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.device-manage-section > summary::-webkit-details-marker { display: none; }
|
||||
.device-manage-section > summary::before { content: "▶ "; font-size: 8px; }
|
||||
.device-manage-section[open] > summary { color: var(--text-accent); }
|
||||
.device-manage-section[open] > summary::before { content: "▼ "; }
|
||||
|
||||
.device-manage-section > summary::before {
|
||||
content: "▶ ";
|
||||
font-size: 8px;
|
||||
.device-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
.device-form button[type="submit"] {
|
||||
margin-top: 2px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
.device-manage-section[open] > summary {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
.device-manage-section[open] > summary::before {
|
||||
content: "▼ ";
|
||||
}
|
||||
|
||||
.device-manage-section > summary:hover {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
.panel-content {
|
||||
flex: 1;
|
||||
padding: 8px 12px;
|
||||
overflow-y: auto;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
/* Scrollbar — terminal feel */
|
||||
::-webkit-scrollbar { width: 4px; }
|
||||
::-webkit-scrollbar-track { background: var(--bg-primary); }
|
||||
::-webkit-scrollbar-thumb { background: var(--border-dim); }
|
||||
|
||||
/* ── Main area — Animation grid ─────────────── */
|
||||
.main-area {
|
||||
grid-area: main;
|
||||
background: var(--bg-panel-dark);
|
||||
border: 1px solid var(--border-dim);
|
||||
background: var(--bg-primary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--text-dim);
|
||||
font-size: 14px;
|
||||
letter-spacing: 0.1em;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
padding: 5px 14px;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.14em;
|
||||
color: var(--text-accent);
|
||||
text-transform: uppercase;
|
||||
background: var(--bg-panel-dark);
|
||||
border-bottom: 1px solid var(--border-dim);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.animation-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.anim-tile {
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-bottom: 1px solid #111;
|
||||
color: var(--text-dim);
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size);
|
||||
cursor: pointer;
|
||||
padding: 8px 14px;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.anim-tile:hover {
|
||||
background: #0d0d0d;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.anim-tile.active {
|
||||
background: #0a1a1a;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.anim-cursor {
|
||||
color: transparent;
|
||||
flex-shrink: 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.anim-tile.active .anim-cursor {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.anim-name {
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.06em;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.anim-desc {
|
||||
font-size: 11px;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
/* ── Transport bar ───────────────────────────── */
|
||||
.transport-bar {
|
||||
grid-area: transport;
|
||||
background: var(--bg-panel-dark);
|
||||
border-top: 1px solid var(--border-dim);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 16px;
|
||||
color: var(--text-dim);
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.08em;
|
||||
gap: 8px;
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
/* Status dot */
|
||||
.status-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--text-dim);
|
||||
.transport-btn {
|
||||
background: var(--bg-panel);
|
||||
color: var(--accent);
|
||||
border: 1px solid var(--border-dim);
|
||||
padding: 5px 10px;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
text-align: center;
|
||||
}
|
||||
.transport-btn:hover {
|
||||
background: var(--accent);
|
||||
color: var(--bg-primary);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.transport-playpause {
|
||||
min-width: 38px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.transport-time {
|
||||
font-size: 12px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
white-space: nowrap;
|
||||
color: var(--text-primary);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.status-dot.connected { background: #00ff88; }
|
||||
.status-dot.error { background: #ff3333; }
|
||||
|
||||
/* Text helpers */
|
||||
.text-dim { color: var(--text-dim); }
|
||||
.text-accent { color: var(--text-accent); }
|
||||
|
||||
/* Device list rows */
|
||||
.device-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 6px 0;
|
||||
border-bottom: 1px solid var(--bg-panel-dark);
|
||||
gap: 8px;
|
||||
}
|
||||
.device-row:last-child {
|
||||
border-bottom: none;
|
||||
.seek-slider {
|
||||
flex: 1;
|
||||
min-width: 60px;
|
||||
accent-color: var(--accent);
|
||||
cursor: pointer;
|
||||
height: 3px;
|
||||
}
|
||||
|
||||
.device-row-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
min-width: 0;
|
||||
.transport-sep {
|
||||
width: 1px;
|
||||
height: 20px;
|
||||
background: var(--border-dim);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Form elements */
|
||||
.transport-file-select {
|
||||
background: var(--bg-panel);
|
||||
color: var(--text-primary);
|
||||
border: 1px solid var(--border-dim);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 12px;
|
||||
padding: 4px 6px;
|
||||
max-width: 200px;
|
||||
min-width: 100px;
|
||||
cursor: pointer;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
|
||||
/* Form base */
|
||||
input, select, button {
|
||||
background: var(--bg-panel);
|
||||
border: 1px solid var(--border-dim);
|
||||
@@ -207,165 +344,13 @@ input, select, button {
|
||||
font-size: var(--font-size);
|
||||
padding: 4px 8px;
|
||||
outline: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
border-color: var(--border-bright);
|
||||
color: var(--text-accent);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Device form */
|
||||
.device-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
padding: 8px 12px;
|
||||
border-top: 1px solid var(--border-dim);
|
||||
}
|
||||
|
||||
.device-form button[type="submit"] {
|
||||
margin-top: 4px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
/* Device remove button */
|
||||
.device-remove {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-dim);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
padding: 0 4px;
|
||||
line-height: 1;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.device-remove:hover {
|
||||
color: #ff3333;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Transport controls */
|
||||
.transport-controls {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.transport-btn {
|
||||
background: var(--bg-panel);
|
||||
color: var(--accent);
|
||||
border: 1px solid var(--border-dim);
|
||||
padding: 4px 10px;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.85rem;
|
||||
cursor: pointer;
|
||||
min-width: 36px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.transport-btn:hover {
|
||||
background: var(--accent);
|
||||
color: var(--bg-primary);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.transport-time {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.85rem;
|
||||
white-space: nowrap;
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.transport-seek {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.seek-slider {
|
||||
width: 100%;
|
||||
accent-color: var(--accent);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.transport-file {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.audio-path-input {
|
||||
background: var(--bg-primary);
|
||||
color: var(--text-primary);
|
||||
border: 1px solid var(--border-dim);
|
||||
padding: 4px 8px;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.8rem;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.audio-path-input:focus {
|
||||
border-color: var(--accent);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Transport bar layout override */
|
||||
.transport-bar {
|
||||
gap: 12px;
|
||||
padding: 6px 12px;
|
||||
}
|
||||
|
||||
/* Waveform */
|
||||
.waveform-container {
|
||||
background: var(--bg-primary);
|
||||
border: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.playback-cursor {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 2px;
|
||||
height: 100%;
|
||||
background: var(--accent);
|
||||
pointer-events: none;
|
||||
transition: left 0.1s linear;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/* Beat indicator in header */
|
||||
.beat-indicator {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
background: var(--text-dim);
|
||||
flex-shrink: 0;
|
||||
transition: background 0.05s ease;
|
||||
}
|
||||
|
||||
.beat-indicator.beat-flash {
|
||||
background: #ffcc00;
|
||||
box-shadow: 0 0 8px #ffcc00;
|
||||
}
|
||||
|
||||
/* Animation selector */
|
||||
.animation-select-input {
|
||||
background: var(--bg-primary);
|
||||
color: var(--text-primary);
|
||||
border: 1px solid var(--border-dim);
|
||||
padding: 4px 8px;
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size);
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.animation-select-input:focus {
|
||||
border-color: var(--border-bright);
|
||||
outline: none;
|
||||
}
|
||||
.text-dim { color: var(--text-dim); }
|
||||
.text-accent { color: var(--text-accent); }
|
||||
|
||||
Reference in New Issue
Block a user