feat(web): make TrackRow click-to-play; pass tracks+index from album page

TrackRow becomes a <button> that dispatches playQueue(tracks, index).
Album page supplies the full track list + each index so the rest of
the album enqueues automatically when the user clicks a track.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-24 21:39:34 -04:00
parent 4189ef9899
commit 4bff8cc99a
3 changed files with 52 additions and 22 deletions
+2 -2
View File
@@ -69,8 +69,8 @@
<p class="text-text-secondary">This album has no tracks.</p>
{:else}
<div class="overflow-hidden rounded border border-border">
{#each album.tracks as track (track.id)}
<TrackRow {track} />
{#each album.tracks as track, i (track.id)}
<TrackRow tracks={album.tracks} index={i} />
{/each}
</div>
{/if}