Two cards side by side said nothing about whether the rooms were playing together; now a room that joins the AVR moves into its card, under the input it is playing, and leaving puts the card back in its own slot. The button changes with it: Join Home Cinema when it stands alone, Leave when it is in the group, since the card's position already says which it is. Also fixes Separate everything, which sent a GET to a POST-only route and so failed with a 405 and snapped the rooms straight back. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
88 lines
3.3 KiB
HTML
88 lines
3.3 KiB
HTML
<!doctype html>
|
|
<html lang="en" data-step="{{ step }}" data-host="{{ host.label }}">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, user-scalable=no">
|
|
<title>{{ app_name }}</title>
|
|
|
|
<!-- Added to the iOS home screen, this opens full-screen with no browser chrome. -->
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
<meta name="apple-mobile-web-app-title" content="{{ app_name }}">
|
|
<meta name="theme-color" content="#0a0d14">
|
|
|
|
<link rel="manifest" href="{{ url_for('manifest') }}">
|
|
<link rel="apple-touch-icon" href="{{ url_for('static', filename='icon-180.png') }}">
|
|
<link rel="icon" href="{{ url_for('static', filename='icon-180.png') }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='panel.css') }}">
|
|
</head>
|
|
<body>
|
|
|
|
<div class="app">
|
|
<header class="top">
|
|
<h1><img class="logo" src="{{ url_for('static', filename='logo.svg') }}" alt="{{ app_name }}"></h1>
|
|
<button class="icon-button" data-role="refresh" aria-label="Refresh">
|
|
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20 12a8 8 0 1 1-2.34-5.66M20 4v5h-5"/></svg>
|
|
</button>
|
|
</header>
|
|
|
|
<section class="card source">
|
|
<div class="card-head">
|
|
<h2>{{ host.label }}</h2>
|
|
<span class="pill" data-role="avr-status">offline</span>
|
|
</div>
|
|
<button class="source-button" data-role="input-button">
|
|
<span class="eyebrow">Input</span>
|
|
<span class="value" data-role="input-name">—</span>
|
|
<svg class="chevron" viewBox="0 0 24 24" aria-hidden="true"><path d="M9 6l6 6-6 6"/></svg>
|
|
</button>
|
|
|
|
<div class="joined" data-role="joined" hidden>
|
|
<p class="joined-title">Playing together</p>
|
|
<div class="joined-rooms" data-role="joined-rooms"></div>
|
|
</div>
|
|
</section>
|
|
|
|
{% for room in rooms %}
|
|
<div class="room-slot" data-slot="{{ room.key }}">
|
|
<section class="card room" data-room="{{ room.key }}">
|
|
<div class="card-head">
|
|
<h2>{{ room.label }}</h2>
|
|
<span class="level"><b data-role="level">—</b></span>
|
|
</div>
|
|
|
|
<div class="volume">
|
|
<button class="step" data-delta="-1" aria-label="{{ room.label }}: volume down">−</button>
|
|
<div class="meter"><i data-role="bar"></i></div>
|
|
<button class="step" data-delta="1" aria-label="{{ room.label }}: volume up">+</button>
|
|
</div>
|
|
|
|
<button class="toggle" data-role="group" aria-pressed="false">
|
|
<span class="dot" aria-hidden="true"></span>
|
|
<span data-role="group-label">Separate</span>
|
|
</button>
|
|
</section>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
<button class="wide ghost" data-role="split-all" hidden>Separate everything</button>
|
|
<p class="foot" data-role="foot"></p>
|
|
</div>
|
|
|
|
<div class="sheet-wrap" data-role="sheet" hidden>
|
|
<div class="scrim" data-role="scrim"></div>
|
|
<div class="sheet" role="dialog" aria-modal="true" aria-label="{{ host.label }} input">
|
|
<div class="grabber" aria-hidden="true"></div>
|
|
<h3>{{ host.label }} input</h3>
|
|
<div class="options" data-role="options"></div>
|
|
<button class="wide ghost" data-role="sheet-close">Cancel</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="toast" data-role="toast" hidden></div>
|
|
|
|
<script src="{{ url_for('static', filename='app.js') }}"></script>
|
|
</body>
|
|
</html>
|