summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/style.css
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-24 17:39:41 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-24 17:39:41 +0200
commit8c780b9928db8145b7fe18ecd137384ccfe25d8f (patch)
tree5cfc06eec0fdf9bb7fe0a14f45e3ef803bb86a20 /packages/meshbay-hub/src/meshbay_hub/static/style.css
parent941d1a135dd7b03834576855e8e9fdaa24c4e406 (diff)
downloadmeshbay-8c780b9928db8145b7fe18ecd137384ccfe25d8f.tar.gz
feat(hub): Music app client — album grid, flat list, persistent player
Implements the client half of docs/musicbay.md against MNP 0.8: - music-app.js: album grid (grouped by artist -> album, from index-time artist/album fields) or flat folder view, per-group localStorage toggle like Videos. MusicBrainz (music_meta_req) is only looked up when a track has no embedded cover at all — well-tagged files never trigger a network call, unlike Videos where TMDB is unconditional. Reuses video-app.js's MediaThumb/LazyTile (now exported) rather than duplicating the chunk-path thumbnail decode + virtualization. - music-player.js: the persistent player bar — queue, shuffle (Fisher- Yates, keeps the current track in place when toggled), repeat (off/ all/one), volume (localStorage), prev/next, a one-track prefetch cache. No MSE, no node-side streaming: a track is downloaded and decrypted once via file-utils.js's pipelinedDownload, same chunk pipeline Files already uses, then played from a blob URL. - group-page.js: owns musicQueue/musicbrainzConfig state and renders MusicPlayerBar outside the tab-switched area — deliberately, so playback survives navigating to Chat/Files, the same reasoning the video/preview modals are shell-owned rather than app-owned. - apps.js: registers "music". transport.js: fetchMusicMeta (keyed by path, same reordering-hazard fix as fetchMediaMeta), setMusicbrainzConfig/setMusicbrainzEnabled (signed ops, mirroring TMDB's), and the three new ack handlers. group-settings.js: a MusicBrainz settings section (contact string, per-group toggle) — the existing Applications checklist already picks up "music" for free, per apps.md's own claim. - icon.js: music/pause/skip-next/skip-prev/shuffle/repeat/volume, drawn in the same stroked style as the existing set. - i18n: group.tab_music, the music.* and settings_node.musicbrainz_* keys, translated (not just copied) across all ten locales, Polish carrying full one/few/many/other plural forms for music.n_tracks. - webapp.py's _ASSETS, test_hook_ordering.py's STATIC_FILES and test_transport_contracts.py's SPLIT_FILES gain the two new files. Full suite (common + hub + node): 1116 passed, no regressions. `npm run sync-ui` in meshbay-client confirmed both files copied. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KBi7ALLGfwcjBXt57yNMcy
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/style.css')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/style.css250
1 files changed, 250 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/style.css b/packages/meshbay-hub/src/meshbay_hub/static/style.css
index 446a751..b4e4089 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/style.css
+++ b/packages/meshbay-hub/src/meshbay_hub/static/style.css
@@ -2685,3 +2685,253 @@ a.transfer-name {
object-fit: cover;
border-radius: 4px;
}
+
+/* ── Music app (docs/musicbay.md) ─────────────────────────────────────────
+ Reuses .video-overlay/.video-top-bar/.video-title/.video-close, .tb-btn/
+ .tb-search, .video-flat-list/.video-flat-row/.video-flat-info/
+ .video-flat-title/.video-flat-sub/.video-flat-folder/.video-flat-chevron
+ and .video-thumb-empty as-is — only what's genuinely different from
+ Videos (album art is square, not 2:3; there is a persistent player bar;
+ grouping is artist -> album, not movie/show) gets its own rule below. */
+
+.music-artist-section { margin-bottom: 22px; }
+.music-artist-heading {
+ font-size: 0.95em;
+ font-weight: 600;
+ margin: 0 0 10px;
+ color: var(--text);
+}
+
+.music-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
+ gap: 16px;
+}
+.music-tile-slot { min-height: 200px; }
+
+.music-card {
+ cursor: pointer;
+ border-radius: 8px;
+ overflow: hidden;
+ background: var(--bg-raised);
+ border: 1px solid var(--border);
+ transition: border-color 0.12s, transform 0.12s;
+}
+.music-card:hover { border-color: var(--accent); transform: translateY(-2px); }
+
+.music-cover {
+ width: 100%;
+ aspect-ratio: 1 / 1;
+ object-fit: cover;
+ display: block;
+ background: var(--bg-surface);
+}
+.music-cover.video-thumb-empty { aspect-ratio: 1 / 1; }
+
+.music-card-info { padding: 8px 10px; }
+.music-card-title {
+ font-size: 0.88em;
+ font-weight: 600;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+.music-card-sub {
+ font-size: 0.78em;
+ color: var(--text-dim);
+ margin-top: 2px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+/* Detail modal — sits inside the shared .video-overlay */
+
+.music-detail {
+ width: min(560px, 92vw);
+ max-height: calc(100vh - 100px);
+ margin-top: 60px;
+ background: var(--bg-surface);
+ border-radius: 10px;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+}
+.music-detail .video-top-bar {
+ position: static;
+ background: var(--bg-raised);
+ border-bottom: 1px solid var(--border);
+}
+.music-detail .video-title { color: var(--text); }
+.music-detail .video-close { background: var(--bg-surface); color: var(--text); }
+.music-detail .video-close:hover { background: var(--border); }
+
+.music-detail-body { padding: 16px 20px; overflow-y: auto; }
+.music-detail-header {
+ display: flex;
+ align-items: flex-start;
+ gap: 14px;
+ margin-bottom: 14px;
+}
+.music-detail-cover {
+ width: 96px;
+ height: 96px;
+ aspect-ratio: 1 / 1;
+ object-fit: cover;
+ border-radius: 6px;
+ flex-shrink: 0;
+ background: var(--bg-raised);
+}
+.music-detail-meta { min-width: 0; }
+.music-detail-artist { font-weight: 600; font-size: 0.95em; }
+.music-detail-date { font-size: 0.8em; color: var(--text-dim); margin: 2px 0 8px; }
+
+.music-tracklist { display: flex; flex-direction: column; gap: 2px; }
+.music-track-row {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ width: 100%;
+ padding: 6px 8px;
+ background: none;
+ border: 1px solid transparent;
+ border-radius: 6px;
+ color: var(--text);
+ font-size: 0.85em;
+ cursor: pointer;
+ text-align: left;
+}
+.music-track-row:hover { background: var(--bg-raised); border-color: var(--border); }
+.music-track-no { width: 24px; flex-shrink: 0; color: var(--text-dim); text-align: right; }
+.music-track-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.music-track-duration { color: var(--text-dim); font-size: 0.9em; flex-shrink: 0; }
+
+/* Mode B — flat list. .video-flat-thumb-slot's sizing is reused verbatim;
+ only the empty-box icon differs, so it gets a name of its own. */
+.music-flat-thumb {
+ width: 64px;
+ height: 40px;
+ flex-shrink: 0;
+ border-radius: 4px;
+ border: 1px solid var(--border);
+}
+
+/* ── Persistent player bar (docs/musicbay.md §2.3) ────────────────────────
+ `position: sticky`, not `fixed` — deliberately: CLAUDE.md's own history
+ records more than one layout bug from a fixed-position element quietly
+ double-reserving space against a page that also sized itself against the
+ viewport. Sticky stays in normal flow, so it never needs a height this
+ stylesheet has to know about anywhere else. */
+.music-player-bar {
+ position: sticky;
+ bottom: 0;
+ z-index: 50;
+ display: flex;
+ align-items: center;
+ gap: 16px;
+ flex-wrap: wrap;
+ margin-top: 16px;
+ padding: 8px 16px;
+ background: var(--bg-raised);
+ border: 1px solid var(--border);
+ border-radius: 10px;
+}
+
+.music-player-info {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ min-width: 0;
+ flex: 1 1 160px;
+}
+.music-player-icon { width: 20px; height: 20px; color: var(--text-dim); flex-shrink: 0; }
+.music-player-text { min-width: 0; }
+.music-player-title {
+ font-size: 0.85em;
+ font-weight: 600;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+.music-player-sub {
+ font-size: 0.75em;
+ color: var(--text-dim);
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.music-player-transport {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+ flex-shrink: 0;
+}
+.music-player-btn {
+ background: none;
+ border: none;
+ color: var(--text-dim);
+ width: 32px;
+ height: 32px;
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ position: relative;
+}
+.music-player-btn:hover { background: var(--bg-surface); color: var(--text); }
+.music-player-btn.active { color: var(--accent); }
+.music-player-btn .icon { width: 16px; height: 16px; }
+.music-player-play {
+ width: 38px;
+ height: 38px;
+ background: var(--accent);
+ color: var(--accent-text);
+}
+.music-player-play:hover { background: var(--accent-hover); color: var(--accent-text); }
+.music-player-play:disabled { opacity: 0.6; cursor: not-allowed; }
+.music-repeat-badge {
+ position: absolute;
+ bottom: 1px;
+ right: 1px;
+ font-size: 0.55em;
+ font-weight: 700;
+ line-height: 1;
+ background: var(--accent);
+ color: var(--accent-text);
+ border-radius: 50%;
+ width: 11px;
+ height: 11px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.music-player-seek {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ flex: 2 1 200px;
+ min-width: 120px;
+}
+.music-player-time { font-size: 0.75em; color: var(--text-dim); flex-shrink: 0; width: 34px; }
+.music-player-time:last-child { text-align: right; }
+.music-player-seek input[type="range"] { flex: 1; }
+
+.music-player-volume {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ flex-shrink: 0;
+}
+.music-player-volume .icon { width: 16px; height: 16px; color: var(--text-dim); }
+.music-player-volume input[type="range"] { width: 80px; }
+
+.music-player-error { flex-basis: 100%; font-size: 0.78em; color: var(--error); }
+
+@media (max-width: 640px) {
+ .music-player-bar { gap: 8px; }
+ .music-player-seek { order: 4; flex-basis: 100%; }
+ .music-player-volume { display: none; }
+}