diff --git a/web/src/lib/components/CompactTrackCard.svelte b/web/src/lib/components/CompactTrackCard.svelte index ed526455..2588bb7a 100644 --- a/web/src/lib/components/CompactTrackCard.svelte +++ b/web/src/lib/components/CompactTrackCard.svelte @@ -5,6 +5,11 @@ import TrackMenu from './TrackMenu.svelte'; import CardActionCluster from './CardActionCluster.svelte'; + // Horizontal compact track row — cover thumb on the left, title + + // artist on the right. Mirrors Android's CompactTrackTile so the + // Most Played section reads the same way across platforms (three + // narrow rows that scroll together). + let { track, sectionTracks, @@ -32,24 +37,27 @@ } -
+
| null = null; @@ -51,12 +52,20 @@ } - + diff --git a/web/src/lib/components/Shell.svelte b/web/src/lib/components/Shell.svelte index 747da9c6..cb9fe4c9 100644 --- a/web/src/lib/components/Shell.svelte +++ b/web/src/lib/components/Shell.svelte @@ -36,9 +36,9 @@ goto('/login', { replaceState: true }); } - function isActive(href: string): boolean { - if (href === '/') return page.url.pathname === '/'; - return page.url.pathname.startsWith(href); + function isActive(prefix: string): boolean { + if (prefix === '/') return page.url.pathname === '/'; + return page.url.pathname.startsWith(prefix); } // Primary nav. Sits centered in the top bar (replaces the prior left @@ -46,22 +46,33 @@ // destinations, plus Library acting as a parent for Artists / Albums / // Liked / History / Playlists (tabs at /library/+layout.svelte). // Search + user menu live on the right side of the header (unchanged). + // Library targets the Artists tab directly so SPA navigation doesn't + // bounce through the /library 308-redirect. isActive('/library') + // still matches all sub-routes by prefix so the active state covers + // every tab. const navItems = [ - { href: '/', label: 'Home', icon: House }, - { href: '/library', label: 'Library', icon: LibraryBig }, - { href: '/discover', label: 'Discover', icon: Compass } + { href: '/', label: 'Home', icon: House, matchPrefix: '/' }, + { href: '/library/artists', label: 'Library', icon: LibraryBig, matchPrefix: '/library' }, + { href: '/discover', label: 'Discover', icon: Compass, matchPrefix: '/discover' } ]; e.key === 'Escape' && (menuOpen = false)} />
-
- {appName()} + +
+ + {appName()} + -
{/if}
+
-
+ +
{/snippet} {/if} @@ -214,7 +212,7 @@ ariaLabel="Rediscover artists" > {#snippet item(artist: import('$lib/api/types').ArtistRef)} -
+
{/snippet} {/if}