web: S opens universal search, sort menu, iOS-style appearance, centered play icon

- Sidebar search box replaced by a blurred overlay (S or /, Shift+S shuffles): songs,
  artists, albums, Plex and stem playlists across every enabled server, arrow keys + Enter
- Sort select + flip chip replaced by one button with a checked menu (fields, directions)
- Themes are now Black/Dark/White with the iOS accent colors; old presets migrate
- Play triangle recentered, per-button nudges removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-11-20 17:03:51 -08:00
1 parent 11dffdf9e6
commit d30479c6f7
5 files changed
+221 -56

No files matched your search

+15 -1
View File
@@ -24,11 +24,25 @@ export const S = Object.assign({
acapella: false, // spell "A Cappella" as "Acapella"
bar: { speed: true, mixer: true, lyrics: true, queue: true }, // player bar buttons
stations: [], // web radio: [{id, name, url}]
theme: "graphite", accent: "", css: "", sideArt: false, artTheme: false,
theme: "dark", accent: "music", css: "", sideArt: false, artTheme: false,
}, load(KEY) || {});
if (!S.clientId) S.clientId = uuid();
if (!S.ui2) { if (S.theme === "amber" && !S.accent) S.theme = "graphite"; S.ui2 = true; }
// Before the iOS-style appearance: eight preset themes and a free accent color.
if (!["black", "dark", "white"].includes(S.theme)) {
const old = S.theme, hues = { music: 353, pink: 349, orange: 35, yellow: 48, green: 135, teal: 189, blue: 211, indigo: 241, purple: 280 };
S.theme = old === "oled" ? "black" : old === "light" ? "white" : "dark";
let h = { graphite: 216, amber: 39, ocean: 201, rose: 340, forest: 142, mono: 211, oled: 39, light: 37 }[old] ?? 211;
const m = /^#([0-9a-f]{6})$/i.exec(S.accent || "");
if (m) {
const n = parseInt(m[1], 16), r = (n >> 16) / 255, g = (n >> 8 & 255) / 255, b = (n & 255) / 255, mx = Math.max(r, g, b), c = mx - Math.min(r, g, b);
if (c > 0.05) h = 60 * (mx === r ? ((g - b) / c + 6) % 6 : mx === g ? (b - r) / c + 2 : (r - g) / c + 4);
}
const d = x => Math.min(Math.abs(x - h), 360 - Math.abs(x - h));
S.accent = Object.keys(hues).sort((a, b) => d(hues[a]) - d(hues[b]))[0];
}
if (!S.accent || S.accent[0] === "#") S.accent = "music";
if (S.fmt.startsWith("opus") && !new Audio().canPlayType('audio/ogg; codecs="opus"')) S.fmt = "flac";
// Before multiple servers there was one S.plex and one S.section.