[verified] style: hide inactive track placeholder

Co-authored-by: Tom Ernst <tom@citr.one>
This commit was merged in pull request #10.
This commit is contained in:
tom authored and tom committed 2026-09-11 22:23:25 +00:00
1 parent 0db0cd31bc
commit 478f839ef3
2 files changed
+6 -1

No files matched your search

+4 -1
View File
@@ -46,7 +46,10 @@ function render() {
for (const zone of zones) {
const card = el('article', 'zone');
const name = el('h2', null, zone.name);
const track = el('p', 'track', zone.error || (zone.track.title ? `${zone.track.title}${zone.track.artist ? ' · ' + zone.track.artist : ''}` : 'Kein aktueller Titel'));
const trackText = zone.state === 'PLAYING' && zone.track.title
? `${zone.track.title}${zone.track.artist ? ' · ' + zone.track.artist : ''}`
: '';
const track = el('p', 'track', zone.error || trackText);
const controls = el('div', 'controls');
for (const [icon, label, action] of [['▶','Play','play'], ['Ⅱ','Pause','pause'], ['■','Stopp','stop']]) {
const button = el('button', action === 'play' ? 'stacked-play' : null);
+2
View File
@@ -257,3 +257,5 @@ def test_zone_cards_render_name_directly_without_transport_status():
assert "zone-head" not in source
assert ".zone-head" not in styles
assert "card.append(name, track, controls, volume, eq, zoneActions)" in source
assert "Kein aktueller Titel" not in source
assert "zone.state === 'PLAYING' && zone.track.title" in source