fix(ui): bring back v1's header and menu
The header is one row again: zone tabs on the left, then the BPM readout, and on wide screens the Beat/Downbeat switch, brightness and the buttons. Under 1000 px the buttons fold into the Menu, which opens with the mode toggle and brightness, as in v1. Groups and the Beat/Downbeat switch from main are kept; the Zones dropdown main used on narrow screens is gone, since the zone tabs stay visible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
011883a6a8
commit
16a3d3aa26
2 files changed
+54
-142
No files matched your search
+26
-108
@@ -68,16 +68,15 @@ body {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/* One header line: zone tabs, then BPM and the Menu; every action is in the Menu */
|
||||
/* One header row: zone tabs, the BPM readout, then the buttons (or, on narrow screens, the Menu) */
|
||||
header {
|
||||
background-color: #1a1a1a;
|
||||
padding: 0.75rem 1rem;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
border-bottom: 2px solid #4a4a4a;
|
||||
gap: 0.65rem;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
@@ -85,92 +84,18 @@ header h1 {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* After the zone tabs: BPM and the Menu */
|
||||
.header-end {
|
||||
.header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
flex-wrap: nowrap;
|
||||
flex: 0 1 auto;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
margin-left: auto;
|
||||
flex: 0 0 auto;
|
||||
min-width: 0;
|
||||
order: 1;
|
||||
}
|
||||
|
||||
/* The row of header buttons stays in the page for the Menu to forward clicks to, but is not shown;
|
||||
the Beat/Downbeat switch is in the Menu too */
|
||||
.header-actions,
|
||||
#seq-switch-toggle-wrap {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.zones-menu-mobile {
|
||||
display: none;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.zones-menu-dropdown {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
background-color: #1a1a1a;
|
||||
border: 1px solid #4a4a4a;
|
||||
border-radius: 4px;
|
||||
padding: 0.25rem 0;
|
||||
display: none;
|
||||
min-width: 10rem;
|
||||
max-width: min(16rem, calc(100vw - 1rem));
|
||||
max-height: min(50vh, 20rem);
|
||||
overflow-y: auto;
|
||||
z-index: 1100;
|
||||
}
|
||||
|
||||
.zones-menu-dropdown.open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.zones-menu-item {
|
||||
width: 100%;
|
||||
background: none;
|
||||
border: none;
|
||||
color: white;
|
||||
text-align: left;
|
||||
padding: 0.45rem 0.75rem;
|
||||
font-size: 0.85rem;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.zones-menu-item:hover {
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
.zones-menu-item.active {
|
||||
background-color: #6a5acd;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.zones-menu-empty {
|
||||
padding: 0.45rem 0.75rem;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
#zones-menu-btn {
|
||||
max-width: 9rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.header-menu-mobile {
|
||||
display: flex;
|
||||
display: none;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.main-menu-dropdown {
|
||||
@@ -207,9 +132,8 @@ header h1 {
|
||||
}
|
||||
|
||||
.menu-brightness-control {
|
||||
padding: 0.55rem 0.75rem 0.45rem;
|
||||
border-top: 1px solid #333;
|
||||
margin-top: 0.25rem;
|
||||
padding: 0.45rem 0.75rem 0.55rem;
|
||||
border-bottom: 1px solid #333;
|
||||
}
|
||||
|
||||
.menu-brightness-control label {
|
||||
@@ -486,12 +410,16 @@ body.preset-ui-run .edit-mode-only {
|
||||
|
||||
.zones-container {
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
padding: 0.5rem 0;
|
||||
flex: 1 1 14rem;
|
||||
min-width: 8rem;
|
||||
align-self: stretch;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
order: 0;
|
||||
}
|
||||
|
||||
.audio-top-indicator {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.zones-list {
|
||||
@@ -1614,7 +1542,7 @@ html.simulated-bpm-mode .seq-switch-toggle-wrap {
|
||||
/* Mobile-friendly layout */
|
||||
@media (max-width: 1000px) {
|
||||
header {
|
||||
gap: 0.5rem;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
@@ -1625,37 +1553,27 @@ html.simulated-bpm-mode .seq-switch-toggle-wrap {
|
||||
max-width: min(16rem, calc(100vw - 1rem));
|
||||
}
|
||||
|
||||
|
||||
.zones-menu-mobile {
|
||||
display: flex;
|
||||
margin-right: auto;
|
||||
.zones-container {
|
||||
padding: 0.5rem 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.zones-container {
|
||||
/* All actions are in the Menu */
|
||||
.header-actions {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.header-menu-mobile {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
margin-top: 0;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.header-end {
|
||||
gap: 0.35rem;
|
||||
flex: 1 1 auto;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.header-end .audio-top-indicator {
|
||||
.audio-top-indicator {
|
||||
min-width: 5rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.header-end .audio-top-beat-sync {
|
||||
.audio-top-beat-sync {
|
||||
padding: 0.2rem 0.4rem;
|
||||
min-height: 2rem;
|
||||
gap: 0.3rem;
|
||||
|
||||
+28
-34
@@ -9,11 +9,20 @@
|
||||
<body>
|
||||
<div class="app-container">
|
||||
<header>
|
||||
<div class="header-end">
|
||||
<div class="zones-menu-mobile">
|
||||
<button type="button" class="btn btn-secondary" id="zones-menu-btn" aria-haspopup="true" aria-expanded="false" aria-controls="zones-menu-dropdown">Zones</button>
|
||||
<div id="zones-menu-dropdown" class="zones-menu-dropdown" role="menu" aria-label="Zones"></div>
|
||||
<div class="zones-container">
|
||||
<div id="zones-list">
|
||||
Loading zones...
|
||||
</div>
|
||||
</div>
|
||||
<div id="audio-top-indicator" class="audio-top-indicator">
|
||||
<button type="button" id="audio-top-beat-sync" class="audio-beat-sync-btn audio-top-beat-sync" disabled title="Sync step to music (S)">
|
||||
<span class="audio-top-indicator-label">BPM</span>
|
||||
<span id="audio-top-bpm-value" class="audio-top-indicator-value">--</span>
|
||||
<span id="audio-top-beat-readout" class="audio-top-beat-readout" aria-live="polite"></span>
|
||||
<span id="audio-top-bar-phase" class="audio-top-bar-phase" aria-live="polite" title="Bar phase (beat in bar)"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
<div class="nav-slide-toggle-wrap seq-switch-toggle-wrap edit-mode-only" id="seq-switch-toggle-wrap">
|
||||
<span class="nav-slide-toggle-side-label nav-slide-toggle-side-label--beat">Beat</span>
|
||||
<button type="button" role="switch" class="nav-slide-toggle-switch seq-switch-toggle" id="seq-switch-toggle" aria-pressed="false" aria-label="Switch sequence on beat" title="When starting a sequence: wait for beat or downbeat">
|
||||
@@ -21,15 +30,6 @@
|
||||
</button>
|
||||
<span class="nav-slide-toggle-side-label nav-slide-toggle-side-label--downbeat">Downbeat</span>
|
||||
</div>
|
||||
<div id="audio-top-indicator" class="audio-top-indicator">
|
||||
<button type="button" id="audio-top-beat-sync" class="audio-beat-sync-btn audio-top-beat-sync" disabled title="Sync step to music (S)">
|
||||
<span class="audio-top-indicator-label">BPM</span>
|
||||
<span id="audio-top-bpm-value" class="audio-top-indicator-value">--</span>
|
||||
<span id="audio-top-beat-readout" class="audio-top-beat-readout" aria-live="polite"></span>
|
||||
<span id="audio-top-bar-phase" class="audio-top-bar-phase" aria-live="polite" title="Bar phase (beat in bar)"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
<div class="header-brightness-control">
|
||||
<label for="header-brightness-slider">Brightness</label>
|
||||
<input type="range" id="header-brightness-slider" min="0" max="255" value="255">
|
||||
@@ -37,50 +37,44 @@
|
||||
<button class="btn btn-secondary" id="profiles-btn">Profiles</button>
|
||||
<button class="btn btn-secondary edit-mode-only" id="devices-btn">Devices</button>
|
||||
<button class="btn btn-secondary edit-mode-only" id="groups-btn">Groups</button>
|
||||
<button class="btn btn-secondary edit-mode-only" id="outputs-btn">Outputs</button>
|
||||
<button class="btn btn-secondary" id="sequences-btn">Sequences</button>
|
||||
<button class="btn btn-secondary edit-mode-only" id="zones-btn">Zones</button>
|
||||
<button class="btn btn-secondary edit-mode-only" id="presets-btn">Presets</button>
|
||||
<button class="btn btn-secondary edit-mode-only" id="sequences-btn">Sequences</button>
|
||||
<button class="btn btn-secondary edit-mode-only" id="outputs-btn">Outputs</button>
|
||||
<button class="btn btn-secondary edit-mode-only" id="patterns-btn">Patterns</button>
|
||||
<button class="btn btn-secondary edit-mode-only" id="color-palette-btn">Colour Palette</button>
|
||||
<button class="btn btn-secondary" id="audio-btn">Audio</button>
|
||||
<button class="btn btn-secondary edit-mode-only" id="settings-btn">Settings</button>
|
||||
<button class="btn btn-secondary" id="settings-btn">Settings</button>
|
||||
<button class="btn btn-secondary" id="help-btn">Help</button>
|
||||
<button type="button" class="btn btn-secondary ui-mode-toggle" id="ui-mode-toggle" aria-pressed="false" title="Switch preset strip mode — label is the mode you will switch to">Edit mode</button>
|
||||
</div>
|
||||
<div class="header-menu-mobile">
|
||||
</div>
|
||||
<div class="header-menu-mobile">
|
||||
<button class="btn btn-secondary" id="main-menu-btn">Menu</button>
|
||||
<div id="main-menu-dropdown" class="main-menu-dropdown">
|
||||
<div class="nav-slide-toggle-wrap nav-slide-toggle-wrap--mobile seq-switch-toggle-wrap" id="seq-switch-toggle-wrap-mobile">
|
||||
<button type="button" class="ui-mode-toggle" id="ui-mode-toggle-mobile" aria-pressed="false">Edit mode</button>
|
||||
<div class="menu-brightness-control">
|
||||
<label for="menu-brightness-slider">Brightness</label>
|
||||
<input type="range" id="menu-brightness-slider" min="0" max="255" value="255">
|
||||
</div>
|
||||
<div class="nav-slide-toggle-wrap nav-slide-toggle-wrap--mobile seq-switch-toggle-wrap edit-mode-only" id="seq-switch-toggle-wrap-mobile">
|
||||
<span class="nav-slide-toggle-side-label nav-slide-toggle-side-label--beat">Beat</span>
|
||||
<button type="button" role="switch" class="nav-slide-toggle-switch seq-switch-toggle" id="seq-switch-toggle-mobile" aria-pressed="false" aria-label="Switch sequence on beat" title="Beat or downbeat">
|
||||
<span class="nav-slide-toggle-track" aria-hidden="true"><span class="nav-slide-toggle-thumb"></span></span>
|
||||
</button>
|
||||
<span class="nav-slide-toggle-side-label nav-slide-toggle-side-label--downbeat">Downbeat</span>
|
||||
</div>
|
||||
<button type="button" class="ui-mode-toggle" id="ui-mode-toggle-mobile" aria-pressed="false">Edit mode</button>
|
||||
<button type="button" data-target="profiles-btn">Profiles</button>
|
||||
<button type="button" class="edit-mode-only" data-target="devices-btn">Devices</button>
|
||||
<button type="button" class="edit-mode-only" data-target="groups-btn">Groups</button>
|
||||
<button type="button" class="edit-mode-only" data-target="outputs-btn">Outputs</button>
|
||||
<button type="button" data-target="sequences-btn">Sequences</button>
|
||||
<button type="button" class="edit-mode-only" data-target="zones-btn">Zones</button>
|
||||
<button type="button" class="edit-mode-only" data-target="presets-btn">Presets</button>
|
||||
<button type="button" class="edit-mode-only" data-target="sequences-btn">Sequences</button>
|
||||
<button type="button" class="edit-mode-only" data-target="outputs-btn">Outputs</button>
|
||||
<button type="button" class="edit-mode-only" data-target="patterns-btn">Patterns</button>
|
||||
<button type="button" class="edit-mode-only" data-target="color-palette-btn">Colour Palette</button>
|
||||
<button type="button" data-target="audio-btn">Audio</button>
|
||||
<button type="button" class="edit-mode-only" data-target="settings-btn">Settings</button>
|
||||
<button type="button" data-target="settings-btn">Settings</button>
|
||||
<button type="button" data-target="help-btn">Help</button>
|
||||
<div class="menu-brightness-control">
|
||||
<label for="menu-brightness-slider">Brightness</label>
|
||||
<input type="range" id="menu-brightness-slider" min="0" max="255" value="255">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zones-container">
|
||||
<div id="zones-list">
|
||||
Loading zones...
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@@ -654,7 +648,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="help-ui-preview-caption">Zone buttons below the header; management buttons on the right (Edit mode).</p>
|
||||
<p class="help-ui-preview-caption">Zone buttons on the left of the header; brightness and the other buttons on the right (Menu on narrow screens).</p>
|
||||
<h3>Run mode and Edit mode</h3>
|
||||
<ul>
|
||||
<li><strong>Run mode</strong>: day-to-day control — choose a zone, tap presets, apply profiles. Management buttons are hidden.</li>
|
||||
|
||||
Reference in new issue
Block a user