From b2982897e20ea9fb0fef0eead994c854a770a505 Mon Sep 17 00:00:00 2001 From: Me Here Date: Mon, 25 May 2026 14:04:23 -0500 Subject: [PATCH] =?UTF-8?q?Header=20logo=20=E2=86=92=20right;=20fix=20Alt+?= =?UTF-8?q?=E2=86=91/=E2=86=93=20reorder;=20non-emoji=20theme=20glyph?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move the VARASYS logo to the right-hand control group (was left of the title). - Alt+↑/↓ now seeds the cue when none is set, so reordering works without having to cue an item first (it was silently no-opping). - Theme button uses plain glyphs (◐ system / ☀ light / ☾ dark) instead of the 🖥 emoji, which didn't render in some browsers. Co-Authored-By: Claude Opus 4.7 (1M context) --- index.html | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index d002e20..96229d2 100644 --- a/index.html +++ b/index.html @@ -212,16 +212,16 @@
- - - -

Stackable Metronome v0.0.1-dev

+ + + +
Space play · T tap · ←→ tempo · ↑↓ cue · ⏎ commit · N/P step · A add · ? help
@@ -915,8 +915,12 @@ function removeItem(i) { } function moveItem(i, d) { const sl = getSL(); const j = i + d; if (j < 0 || j >= sl.items.length) return; [sl.items[i], sl.items[j]] = [sl.items[j], sl.items[i]]; saveSetlists(); } function moveCuedItem(d) { // keyboard reorder of the cued item (Alt+↑/↓), within the viewed list - if (cuedSL !== activeSL || cuedItem < 0) return; - const sl = getSL(); const j = cuedItem + d; if (j < 0 || j >= sl.items.length) return; + const sl = getSL(); if (!sl || !sl.items.length) return; + if (cuedSL !== activeSL || cuedItem < 0 || cuedItem >= sl.items.length) { // no cue here yet → seed it + cuedSL = activeSL; + cuedItem = (loadedSL === activeSL && activeItem >= 0) ? activeItem : 0; + } + const j = cuedItem + d; if (j < 0 || j >= sl.items.length) { renderItems(); return; } // at an edge: just show the cue moveItem(cuedItem, d); if (loadedSL === activeSL) { if (activeItem === cuedItem) activeItem = j; else if (activeItem === j) activeItem = cuedItem; } cuedItem = j; renderItems(); @@ -1386,7 +1390,7 @@ function themePref() { try { const p = localStorage.getItem("metronome.theme"); function applyTheme(pref) { try { localStorage.setItem("metronome.theme", pref); } catch (e) {} document.documentElement.dataset.theme = effectiveTheme(pref); - $("themeBtn").textContent = pref === "system" ? "🖥" : pref === "light" ? "☀" : "🌙"; + $("themeBtn").textContent = pref === "system" ? "◐" : pref === "light" ? "☀" : "☾"; // plain glyphs (emoji ones failed to render in some browsers) $("themeBtn").title = "Theme: " + pref + " (click to cycle: system → light → dark)"; } $("themeBtn").addEventListener("click", () => applyTheme(THEMES[(THEMES.indexOf(themePref()) + 1) % THEMES.length]));