Windows-only, release fixes, Discord covers, and layouts that fit the window

- Atmosphere is now Windows-only: macOS and Linux code, bundle settings and CI are removed
- Releases build as drafts and publish once the build succeeds; failing tests show as error notes
- Every release lists its Windows downloads and warns that the app isn't code-signed yet, so SmartScreen or antivirus may flag it
- Library tests no longer share one data folder at the same time
- Discord: the song's cover (Deezer, then Apple Music) as the big image with the logo as a badge; built-in app ID; invite cover in the image kit; clearer status setting
- Dialogs, menus and popovers stay inside the window and scroll instead of running off screen
- Expandable settings rows show a chevron
- Band names with & stay one artist unless both names are already separate artists
This commit is contained in:
Christian
2026-11-20 02:03:17 -05:00
parent b50db0df31
commit b8fde58a65
21 changed files with 330 additions and 325 deletions
+14 -14
View File
@@ -20,8 +20,6 @@ function h(tag, attrs = {}, ...kids) {
return el;
}
const icon = (name) => h("span", { class: "i", icon: name });
const isMac = /Mac|iPhone|iPad/.test(navigator.userAgentData?.platform || navigator.platform || navigator.userAgent);
const platformKeys = () => isMac && $$("kbd").forEach((k) => (k.textContent = k.textContent.replace(/^Ctrl /, "⌘ ")));
const hydrate = (root = document) => $$("[data-icon]", root).forEach((el) => (el.innerHTML = svg(el.dataset.icon)));
const KIND = { album: "Album", ep: "EP", single: "Single", lp: "LP", compilation: "Compilation", mixtape: "Mixtape", playlist: "Playlist", profile: "Profile", channel: "Channel", search: "Search results", track: "Track" };
@@ -95,6 +93,16 @@ function toast(message, kind = "") {
}, kind === "err" ? 6500 : 3000);
}
function placeFloating(el, x, y, above = false) {
const pad = 8;
el.style.maxHeight = `${Math.max(120, innerHeight - pad * 2)}px`;
el.style.maxWidth = `${innerWidth - pad * 2}px`;
el.style.overflowY = "auto";
const w = el.offsetWidth, hgt = el.offsetHeight;
el.style.left = `${Math.max(pad, Math.min(x, innerWidth - w - pad))}px`;
el.style.top = `${Math.max(pad, Math.min(above ? y - hgt : y, innerHeight - hgt - pad))}px`;
}
function art(url, cls, alt = "", ph = "music") {
if (!url) return h("div", { class: `${cls} ph` }, icon(ph));
const img = h("img", { class: cls, src: url, alt, loading: "lazy", draggable: "false", referrerpolicy: "no-referrer" });
@@ -195,8 +203,6 @@ function bindSidebar() {
function bindWindow() {
const bar = $("#titlebar");
document.documentElement.classList.toggle("mac", isMac);
if (isMac) bar.classList.add("mac");
const api = window.__TAURI__.window;
if (!api?.getCurrentWindow) return;
const win = api.getCurrentWindow();
@@ -222,7 +228,6 @@ function bindWindow() {
/* boot */
async function init() {
hydrate();
platformKeys();
bindWindow();
bindSidebar();
state.settings = await invoke("get_settings");
@@ -311,7 +316,7 @@ function renderObTools() {
if (!t) return;
$("#obTools").replaceChildren(
toolRow("ytdlp", t.ytdlp, "yt-dlp", "Reads links and downloads media (about 18 MB)."),
toolRow("ffmpeg", t.ffmpeg, "ffmpeg", t.canInstallFfmpeg ? "Converts formats and writes tags (about 90 MB)." : isMac ? "Run brew install ffmpeg in Terminal; Atmosphere finds it." : "Install it with your package manager.")
toolRow("ffmpeg", t.ffmpeg, "ffmpeg", "Converts formats and writes tags (about 90 MB).")
);
$("#obInstall").textContent = t.ytdlp.path && t.ffmpeg.path ? "Continue" : "Set up both";
}
@@ -860,9 +865,8 @@ function openTypeMenu(anchor, c) {
h("div", { class: "menu-note" }, "Albums, EPs and singles get album tags and track numbers.")
);
const r = anchor.getBoundingClientRect();
menu.style.left = `${r.left}px`;
menu.style.top = `${r.bottom + 6}px`;
menu.hidden = false;
placeFloating(menu, r.left, r.bottom + 6);
menu.querySelector("button")?.focus();
}
@@ -1148,8 +1152,7 @@ function openSaveMenu() {
$("#saveAsBtn").setAttribute("aria-expanded", "true");
renderSaveMenu();
const r = $("#saveAsBtn").getBoundingClientRect();
menu.style.left = `${r.left}px`;
menu.style.top = `${Math.max(12, r.top - menu.offsetHeight - 8)}px`;
placeFloating(menu, r.left, r.top - 8, true);
menu.querySelector(".opt[aria-checked='true']")?.focus();
}
@@ -1556,8 +1559,6 @@ function renderSettings() {
renderStorage();
}
const OS = isMac ? "mac" : /Linux|X11/.test(navigator.userAgent) ? "linux" : "windows";
function signinStatus(text, kind) {
const el = $("#signinStatus");
if (!el) return;
@@ -1570,7 +1571,6 @@ function renderSignin() {
const s = state.settings;
const sel = $("#signinSelect");
if (!s || !sel) return;
$$("option[data-os]", sel).forEach((o) => (o.hidden = o.dataset.os !== OS && o.value !== s.cookiesBrowser));
const isFile = s.cookiesBrowser === "file";
$("#cookiesFileRow").hidden = !isFile;
$("#signinCheck").hidden = !s.cookiesBrowser;
@@ -1628,7 +1628,7 @@ function renderToolSettings() {
return [h("div", {}, h("strong", { class: "name" }, h("span", { class: `dot ${tool.path ? "ok" : "warn"}` }), name), h("span", {}, status)), acts];
};
$("#toolYtdlp").replaceChildren(...card("ytdlp", t.ytdlp, "yt-dlp", "Not installed. Needed to read any link."));
$("#toolFfmpeg").replaceChildren(...card("ffmpeg", t.ffmpeg, "ffmpeg", t.canInstallFfmpeg ? "Not installed. Needed for MP3, M4A, FLAC, WAV, video and cover art." : isMac ? "Install it with Homebrew (brew install ffmpeg). Atmosphere finds it automatically." : "Install it with your package manager, then restart."));
$("#toolFfmpeg").replaceChildren(...card("ffmpeg", t.ffmpeg, "ffmpeg", "Not installed. Needed for MP3, M4A, FLAC, WAV, video and cover art."));
}
window.addEventListener("DOMContentLoaded", () => init().catch((e) => toast(errText(e), "err")));
+5 -6
View File
@@ -259,8 +259,7 @@
<option value="brave">Brave</option>
<option value="opera">Opera</option>
<option value="vivaldi">Vivaldi</option>
<option value="chromium" data-os="linux">Chromium</option>
<option value="safari" data-os="mac">Safari</option>
<option value="chromium">Chromium</option>
<option value="file">A cookies.txt file</option>
</select>
<button class="btn" id="signinCheck" type="button"><span class="label">Check</span><span class="spin" aria-hidden="true"></span></button>
@@ -289,20 +288,20 @@
<div class="group">
<label class="setting"><div><strong>Show what you're listening to</strong><span class="api-status" id="discordStatus" role="status">Off. Nothing is shared with Discord.</span></div><input type="checkbox" class="switch" data-key="discordEnabled" id="discordToggle" /></label>
<div class="setting discord-opt">
<div><strong>Your status says</strong><span>What people see under your name, like "Listening to Atmosphere". The song, artist and progress always show on your profile.</span></div>
<div><strong>Your status says</strong><span>The short line next to your name in member lists, DMs and your friends list, like "Listening to Atmosphere" or "Listening to Rihanna". Your profile card always shows the song, artist, cover and progress.</span></div>
<div class="seg" data-seg="discordStatus"><button type="button" data-value="app">Atmosphere</button><button type="button" data-value="artist">Artist</button><button type="button" data-value="song">Song</button></div>
</div>
<label class="setting discord-opt"><div><strong>Show cover art</strong><span>Discord can only show pictures from the web, so Atmosphere looks the song up on Deezer (only the artist and title are sent). Off: the Atmosphere logo is shown.</span></div><input type="checkbox" class="switch" data-key="discordCover" /></label>
<label class="setting discord-opt"><div><strong>Show cover art</strong><span>Your status shows the song's cover, with the Atmosphere logo as a small badge. Discord can only show pictures from the web, so Atmosphere finds the cover on Deezer or Apple Music (only the artist, title and album are sent). If none is found, or this is off, the Atmosphere logo is shown instead.</span></div><input type="checkbox" class="switch" data-key="discordCover" /></label>
<label class="setting discord-opt"><div><strong>Keep showing while paused</strong><span>Off: your status clears when you pause and comes back when you press play.</span></div><input type="checkbox" class="switch" data-key="discordPaused" /></label>
<details class="setting advanced discord-opt">
<summary><strong>Your own Discord app</strong><span>Shows your app's name and art instead, like "Listening to My Music". Leave the ID blank to use Atmosphere's.</span></summary>
<div class="adv-fields">
<ol class="discord-steps">
<li>Create an application in the <button class="link" id="discordPortal" type="button">Discord Developer Portal</button>. Its name is what your status shows.</li>
<li>Save the images, then upload both under <strong>Rich Presence › Art Assets</strong> without renaming them.</li>
<li>Save the images. Under <strong>Rich Presence › Art Assets</strong>, add <code>atmosphere.png</code> and <code>paused.png</code> without renaming them, and optionally <code>invite-cover.png</code> as the invite cover image.</li>
<li>Paste the <strong>Application ID</strong> from <strong>General Information</strong> here.</li>
</ol>
<div class="discord-assets"><button class="btn" id="discordAssets" type="button"><span class="label">Save the images…</span><span class="spin" aria-hidden="true"></span></button><span class="muted small">You choose the folder. Includes the logo, the paused badge and these steps.</span></div>
<div class="discord-assets"><button class="btn" id="discordAssets" type="button"><span class="label">Save the images…</span><span class="spin" aria-hidden="true"></span></button><span class="muted small">You choose the folder. Includes the logo, the paused badge, an invite cover and these steps.</span></div>
<label><span>Application ID</span><input class="text" id="discordClientId" placeholder="Atmosphere's own" inputmode="numeric" spellcheck="false" autocomplete="off" /></label>
</div>
</details>
+23 -19
View File
@@ -19,17 +19,21 @@ const Lib = {
};
const lnorm = (s) => (s || "").trim().toLowerCase();
function splitList(s) {
return (s || "").trim().split(/\s*(?:,|;|\s(?:feat\.?|ft\.?|featuring)\s|^(?:feat\.?|ft\.?)\s)\s*/i).map((p) => p.trim()).filter(Boolean);
}
function splitNames(s) {
const text = (s || "").trim();
let parts = text.split(/\s*(?:,|;|\s(?:feat\.?|ft\.?|featuring)\s|^(?:feat\.?|ft\.?)\s)\s*/i);
if (/,/.test(text)) parts = parts.flatMap((p) => p.split(/\s+&\s+/));
return parts.map((p) => p.trim()).filter(Boolean);
return splitList(s).flatMap((p) => {
if (!/\s&\s/.test(p)) return [p];
const pieces = p.split(/\s+&\s+/).map((x) => x.trim()).filter(Boolean);
return pieces.length > 1 && pieces.every((x) => Lib.solo?.has(lnorm(x))) ? pieces : [p];
});
}
function titleCredits(title) {
const t = title || "";
const inBrackets = [...t.matchAll(/[\(\[]\s*(?:feat\.?|ft\.?|featuring|with)\s+([^\)\]]+)[\)\]]/gi)].map((m) => m[1]);
const trailing = t.match(/\s(?:feat\.?|ft\.?|featuring)\s+([^\(\[]+)$/i);
return [...inBrackets, trailing?.[1]].filter(Boolean).flatMap((x) => splitNames(x.replace(/,?\s+&\s+/g, ", ")));
return [...inBrackets, trailing?.[1]].filter(Boolean).flatMap((x) => splitNames(x));
}
const primaryArtist = (s) => splitNames(s)[0] || "Unknown artist";
const artistsOf = (t) => {
@@ -51,6 +55,8 @@ function buildIndexes(snap) {
Lib.byId = new Map(snap.tracks.map((t) => [t.id, t]));
Lib.liked = new Set(snap.liked);
Lib.plays = snap.plays || {};
Lib.solo = new Set();
for (const t of snap.tracks) for (const n of [t.albumArtist, ...splitList(t.artist)]) if (n && !/\s&\s/.test(n)) Lib.solo.add(lnorm(n));
const main = new Set(snap.tracks.filter((t) => !t.playlist).map(sig));
Lib.songs = snap.tracks.filter((t) => !t.playlist || !main.has(sig(t)));
const albums = new Map();
@@ -261,14 +267,14 @@ async function deleteTracks(tracks) {
const box = h("input", { type: "checkbox", class: "box" });
box.checked = true;
const body = h("div", { class: "stack" },
h("p", { class: "muted" }, `${tracks.length === 1 ? `“${tracks[0].title}”` : songs(tracks.length)} will be moved to your ${isMac ? "Trash" : "Recycle Bin"}, along with any lyrics files, so you can restore them from there if you change your mind.`),
h("p", { class: "muted" }, `${tracks.length === 1 ? `“${tracks[0].title}”` : songs(tracks.length)} will be moved to your Recycle Bin, along with any lyrics files, so you can restore them from there if you change your mind.`),
inPlaylists ? h("label", { class: "check-row" }, box, h("span", {}, "Also remove them from your playlists")) : null);
const ok = await modal(tracks.length === 1 ? "Delete this song from your device?" : `Delete ${tracks.length} songs from your device?`, body, [{ label: "Cancel", value: false }, { label: "Delete", value: true, primary: true }]);
if (!ok) return;
try {
const n = await invoke("tracks_delete", { ids: tracks.map((t) => t.id), playlists: inPlaylists && box.checked });
Lib.sel.clear();
toast(`Deleted ${songs(n)}. ${isMac ? "Trash" : "Recycle Bin"} has them if you need them back.`, "ok");
toast(`Deleted ${songs(n)}. Recycle Bin has them if you need them back.`, "ok");
} catch (e) {
toast(errText(e), "err");
}
@@ -309,7 +315,7 @@ function closeMenus() {
$$(".ctx").forEach((m) => m.remove());
}
function menuAt(x, y, items) {
function menuAt(x, y, items, above = false) {
closeMenus();
const m = h("div", { class: "menu ctx", role: "menu" });
for (const it of items) {
@@ -317,9 +323,7 @@ function menuAt(x, y, items) {
else if (it) m.append(h("button", { role: "menuitem", class: `${it.sub ? "has-sub" : ""} ${it.danger ? "danger" : ""}`, disabled: it.disabled, onclick: (e) => { if (it.sub) { e.stopPropagation(); const r = e.currentTarget.getBoundingClientRect(); menuAt(r.right + 4, r.top - 6, it.sub()); } else { closeMenus(); it.run(); } } }, h("span", {}, it.label), it.sub ? icon("chevron-down") : it.hint ? h("kbd", {}, it.hint) : null));
}
document.body.append(m);
const w = m.offsetWidth, hgt = m.offsetHeight;
m.style.left = `${Math.min(x, innerWidth - w - 8)}px`;
m.style.top = `${Math.min(y, innerHeight - hgt - 8)}px`;
placeFloating(m, x, y, above);
m.querySelector("button")?.focus();
return m;
}
@@ -411,10 +415,10 @@ async function addToPlaylist(name, tracks) {
async function removeFromPlaylist(name, tracks) {
const pl = (Lib.data?.playlists || []).find((x) => x.name === name);
const bin = isMac ? "Trash" : "Recycle Bin";
const bin = "Recycle Bin";
const ok = pl?.linked
? await confirmBox(`Remove ${tracks.length === 1 ? `“${tracks[0].title}”` : plural(tracks.length, "song")} from ${name}?`, `This is your own folder, so the file itself moves from it to your ${bin}. If it's the only copy, it leaves your library too. You can restore it from the ${bin}.`, "Move to " + bin)
: await confirmBox(`Remove ${tracks.length === 1 ? `“${tracks[0].title}”` : plural(tracks.length, "song")} from ${name}?`, `The playlist's copy goes to your ${isMac ? "Trash" : "Recycle Bin"}. The song stays in your library.`, "Remove");
: await confirmBox(`Remove ${tracks.length === 1 ? `“${tracks[0].title}”` : plural(tracks.length, "song")} from ${name}?`, `The playlist's copy goes to your Recycle Bin. The song stays in your library.`, "Remove");
if (!ok) return;
try {
await invoke("playlist_remove", { name, ids: tracks.map((t) => t.id) });
@@ -448,11 +452,11 @@ function modal(title, body, actions) {
const close = (v) => { wrap.remove(); resolve(v); };
const wrap = h("div", { class: "modal-wrap", onclick: (e) => { if (e.target === wrap) close(null); } },
h("div", { class: "modal", role: "dialog", "aria-modal": "true", "aria-label": title },
h("h2", {}, title), body,
h("div", { class: "row end" }, ...actions.map((a) => h("button", { class: `btn ${a.primary ? "primary" : a.danger ? "danger-ghost" : "ghost"}`, onclick: () => close(a.value) }, a.label)))));
h("h2", {}, title), h("div", { class: "modal-body" }, body),
h("div", { class: "row end modal-actions" }, ...actions.map((a) => h("button", { class: `btn ${a.primary ? "primary" : a.danger ? "danger-ghost" : "ghost"}`, onclick: () => close(a.value) }, a.label)))));
wrap.addEventListener("keydown", (e) => {
if (e.key === "Escape") close(null);
if (e.key === "Enter" && e.target.tagName === "INPUT") close(actions.find((a) => a.primary)?.value);
if (e.key === "Enter" && e.target.tagName === "INPUT" && !e.defaultPrevented) close(actions.find((a) => a.primary)?.value);
});
document.body.append(wrap);
(wrap.querySelector("input, textarea") || wrap.querySelector(".btn.primary"))?.focus();
@@ -1193,7 +1197,7 @@ function bindLibrary() {
$$("[data-lib]").forEach((b) => b.addEventListener("click", () => { Lib.back = []; openLib(b.dataset.lib, null, false); }));
$("#newPlaylistBtn").addEventListener("click", playlistAddMenu);
$("#libScroll").addEventListener("scroll", () => Lib.drawSongs && requestAnimationFrame(Lib.drawSongs), { passive: true });
window.addEventListener("resize", () => Lib.drawSongs && Lib.drawSongs());
window.addEventListener("resize", () => { closeMenus(); Lib.drawSongs && Lib.drawSongs(); });
window.addEventListener("player", (e) => { if (e.detail.type === "track") markPlaying(); });
window.addEventListener("played", (e) => { Lib.plays[e.detail] = (Lib.plays[e.detail] || 0) + 1; });
listen("atmosphere://library", (e) => {
@@ -1212,7 +1216,7 @@ function bindLibrary() {
}
/* app-wide context menus (replaces the browser's own) */
const MOD = isMac ? "⌘" : "Ctrl+";
const MOD = "Ctrl+";
function editMenu(e, el) {
const isInput = el.tagName === "INPUT" || el.tagName === "TEXTAREA";
@@ -1378,7 +1382,7 @@ document.addEventListener("keydown", (e) => {
return;
}
const typing = e.target.closest?.("input, textarea, select, [contenteditable]");
if (!typing && state.view === "library" && Lib.sel.size && (e.key === "Delete" || (isMac && e.key === "Backspace" && e.metaKey))) {
if (!typing && state.view === "library" && Lib.sel.size && e.key === "Delete") {
e.preventDefault();
return deleteTracks(selectedTracks());
}
-1
View File
@@ -70,7 +70,6 @@ async function openMini() {
document.body.classList.add("mini-mode");
const box = $("#mini");
box.hidden = false;
box.classList.toggle("mac", isMac);
const win = miniWin();
const dpi = window.__TAURI__?.dpi;
if (win && dpi) {
+1 -1
View File
@@ -1,5 +1,5 @@
/* atmosphere · player.js · Audio engine: two-deck gapless playback, crossfade, volume levelling, queue, EQ and effects, media keys and resume. */
const MEDIA_BASE = /Windows/.test(navigator.userAgent) ? "http://atmo.localhost/" : "atmo://localhost/";
const MEDIA_BASE = "http://atmo.localhost/";
const mediaUrl = (kind, id) => `${MEDIA_BASE}${kind}/${encodeURIComponent(id)}`;
const artUrl = (key) => (key ? mediaUrl("a", key) : null);
+27 -17
View File
@@ -23,8 +23,8 @@
--art-opacity: 0.42;
--shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.65);
--ease: cubic-bezier(0.2, 0.8, 0.2, 1);
--font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, "Cantarell", "Ubuntu", "Noto Sans", sans-serif;
--font-display: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, "Cantarell", "Ubuntu", "Noto Sans", sans-serif;
--font: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
--font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
--mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, ui-monospace, "DejaVu Sans Mono", monospace;
--s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;
--r-chip: 6px; --r-ctl: 8px; --r-card: 12px;
@@ -323,7 +323,7 @@ select { padding-right: var(--s6); cursor: pointer; }
@keyframes nudge { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
/* save-as menu */
.save-menu { position: fixed; z-index: 40; width: 380px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 6px; animation: menuIn 150ms var(--ease); }
.save-menu { position: fixed; z-index: 40; width: min(380px, calc(100vw - 16px)); border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 6px; animation: menuIn 150ms var(--ease); }
@keyframes menuIn { from { opacity: 0; transform: translateY(6px); } }
.opt { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: var(--s3); padding: 10px var(--s3); border-radius: var(--r-ctl); width: 100%; text-align: left; }
.opt:hover:not(:disabled) { background: var(--hover); }
@@ -464,7 +464,7 @@ label.setting { cursor: pointer; }
.sheet-head { grid-template-columns: 128px minmax(0, 1fr); gap: var(--s5); }
.cover { width: 128px; height: 128px; }
.sheet-body.inspecting { padding-right: var(--s8); }
.inspector { position: fixed; top: 80px; right: 16px; }
.inspector { position: fixed; top: 80px; right: 16px; max-height: calc(100vh - 180px); max-width: calc(100vw - 32px); overflow-y: auto; }
.commit { flex-wrap: wrap; }
.attest { order: 3; }
}
@@ -617,7 +617,7 @@ label.setting { cursor: pointer; }
.range.vol { width: 96px; flex: none; }
/* drawers */
.drawer-panel { position: fixed; right: 12px; top: 12px; bottom: 90px; width: 380px; z-index: 40; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slideIn 200ms var(--ease); overflow: hidden; }
.drawer-panel { position: fixed; right: 12px; top: 12px; bottom: 90px; width: min(380px, calc(100vw - 24px)); z-index: 40; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slideIn 200ms var(--ease); overflow: hidden; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s4) var(--s3); border-bottom: 1px solid var(--hairline); }
.drawer-head h2 { font-size: 15px; }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--s2) var(--s2) var(--s4); }
@@ -737,8 +737,6 @@ label.setting { cursor: pointer; }
.tb-btn:active { background: var(--press); }
.tb-btn.close:hover { background: #c42b1c; color: #fff; }
.tb-btn.close:active { background: #b3271a; color: #fff; }
.titlebar.mac { grid-template-columns: minmax(0, 1fr); }
.titlebar.mac .tb-controls { display: none; }
.titlebar.blur .tb-btn, .titlebar.blur ~ .shell .side-brand img { opacity: 0.6; }
.sidebar { padding-top: 0; }
.main { padding-top: var(--titlebar); }
@@ -992,9 +990,6 @@ body.mini-mode > *:not(#mini):not(.toasts):not(.modal-wrap):not(script) { displa
.mini.tiny .mini-play { width: 32px; height: 32px; }
.mini.tiny .mini-play .i svg { width: 15px; height: 15px; }
.mini.mac.portrait .mini-top { padding-left: 78px; }
.mini.mac.portrait .mini-brand { display: none; }
.mini.mac.wide .mini-body, .mini.mac.tiny .mini-body { padding-top: 30px; }
@media (prefers-reduced-motion: reduce) { .mini-bg, .mini-play, .mini-top { transition: none; } }
/* linked playlist folders */
@@ -1032,8 +1027,6 @@ body.mini-mode > *:not(#mini):not(.toasts):not(.modal-wrap):not(script) { displa
.brand-mark { display: none; height: 24px; width: auto; }
.side-toggle { flex: none; opacity: 0; transition: opacity 120ms var(--ease), background-color 120ms var(--ease), color 120ms var(--ease); }
.sidebar:hover .side-toggle, .side-toggle:focus-visible { opacity: 1; }
.mac .side-brand { padding-left: 80px; }
.mac .side-brand .lockup { height: 22px; }
:root.side-collapsed { --side-w: 64px; }
.side-collapsed .sidebar { padding-left: 10px; padding-right: 10px; }
@@ -1043,9 +1036,6 @@ body.mini-mode > *:not(#mini):not(.toasts):not(.modal-wrap):not(script) { displa
.side-collapsed .side-toggle { position: absolute; inset: 0; margin: auto; width: 36px; height: 36px; opacity: 0; }
.side-collapsed .side-brand:hover .side-toggle, .side-collapsed .side-toggle:focus-visible { opacity: 1; background: var(--hover); color: var(--text); }
.side-collapsed .side-brand:hover .brand-mark, .side-collapsed .side-brand:focus-within .brand-mark { opacity: 0; }
.mac.side-collapsed .side-brand { height: auto; padding-top: calc(var(--titlebar) - 4px); flex-direction: column; }
.mac.side-collapsed .brand-mark { display: none; }
.mac.side-collapsed .side-toggle { position: static; opacity: 1; }
.side-collapsed .nav-item { justify-content: center; padding: 0; gap: 0; }
.side-collapsed .nav-item > span:not(.i):not(.nav-ring):not(.count), .side-collapsed .nav-item kbd { display: none; }
.side-collapsed .nav-item[aria-current="page"]::before { left: -10px; }
@@ -1152,14 +1142,14 @@ body.mini-mode > *:not(#mini):not(.toasts):not(.modal-wrap):not(script) { displa
/* choosing artist info online */
.modal:has(.pick-photos) { max-width: 720px; }
.pick-head { font-size: 12.5px; color: var(--text-2); margin-top: var(--s2); }
.pick-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s2); max-height: 260px; overflow-y: auto; }
.pick-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s2); }
.pick-photo { display: grid; gap: 4px; padding: 6px; border-radius: 10px; border: 2px solid transparent; text-align: center; min-width: 0; }
.pick-photo:hover { background: var(--hover); }
.pick-photo.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pick-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: var(--surface-2, var(--surface)); }
.pick-photo span { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-photo small { font-size: 11px; color: var(--text-3); }
.pick-pages { display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }
.pick-pages { display: grid; gap: 4px; }
.pick-page { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 10px; border: 2px solid transparent; }
.pick-page:hover { background: var(--hover); }
.pick-page.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
@@ -1215,3 +1205,23 @@ body.mini-mode > *:not(#mini):not(.toasts):not(.modal-wrap):not(script) { displa
.un-actions { grid-column: 2 / 4; display: flex; gap: var(--s2); flex-wrap: wrap; }
.un-close { grid-column: 3; grid-row: 1; margin: -6px -6px 0 0; }
@media (prefers-reduced-motion: reduce) { .update-notice { animation: none; } .update-notice.out { transition: none; } }
/* everything fits the window: dialogs scroll inside, buttons stay visible */
.modal-wrap { overflow: hidden; }
.modal { max-height: calc(100vh - 2 * var(--s6)); max-height: calc(100dvh - 2 * var(--s6)); display: flex; flex-direction: column; min-height: 0; }
.modal > h2, .modal-actions { flex-shrink: 0; }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 calc(-1 * var(--s6)); padding: 2px var(--s6); }
.modal-body > * + * { margin-top: 0; }
.modal-actions { flex-wrap: wrap; }
@media (max-height: 560px), (max-width: 520px) {
.modal-wrap { padding: var(--s3); }
.modal { padding: var(--s4); gap: var(--s3); max-height: calc(100vh - 2 * var(--s3)); max-height: calc(100dvh - 2 * var(--s3)); }
.modal-body { margin: 0 calc(-1 * var(--s4)); padding: 2px var(--s4); }
}
/* expandable rows show a chevron that turns when open */
.advanced summary { position: relative; padding-right: 32px; }
.advanced summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 8px; height: 8px; border: solid var(--text-3); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); transition: transform 160ms var(--ease); }
.advanced[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.advanced summary:hover::after { border-color: var(--text); }
@media (prefers-reduced-motion: reduce) { .advanced summary::after { transition: none; } }
+1 -1
View File
@@ -118,7 +118,7 @@ function sleepMenu(e) {
sleepActive() ? "-" : null,
opt("15 minutes", 15), opt("30 minutes", 30), opt("45 minutes", 45), opt("1 hour", 60), opt("2 hours", 120),
opt("End of this song", "song"),
].filter(Boolean));
].filter(Boolean), true);
}
function resumeMap() {