feat: album/playlist header menu and UI consistency

Album/Playlist Menu:
- Remove + and Download buttons from headers
- Add AlbumMenu component with: Play Next, Play Later, Share (Qobuz/song.link), Download
- Implement queue handlers (handleAddAlbumToQueueNext, handleAddAlbumToQueueLater)
- Implement share handlers (shareAlbumQobuzLink, shareAlbumSonglink)
- Apply same menu to PlaylistDetailView

Button consistency (no more pills):
- AlbumDetailView: border-radius 20px → 8px
- PlaylistDetailView: border-radius 24px → 8px
- ArtistDetailView: border-radius 20px → 8px
- FavoritesView: border-radius 20px → 8px
- LocalLibraryView: border-radius 24px/20px → 8px

UserCard simplified (previous commit)
This commit is contained in:
vicrodh committed 2026-01-10 23:54:25 -06:00
1 parent c4203a195d
commit 73ef1f91db
7 files changed
+430 -40

No files matched your search

+17 -14
View File
@@ -1,8 +1,9 @@
<script lang="ts">
import { onMount } from 'svelte';
import { invoke } from '@tauri-apps/api/core';
import { ArrowLeft, Play, Shuffle, Heart, Plus, MoreHorizontal, Download } from 'lucide-svelte';
import { ArrowLeft, Play, Shuffle, Heart } from 'lucide-svelte';
import TrackRow from '../TrackRow.svelte';
import AlbumMenu from '../AlbumMenu.svelte';
import { getDownloadState, type DownloadStatus } from '$lib/stores/downloadState';
interface Track {
@@ -46,12 +47,15 @@
onTrackGoToArtist?: (artistId: number) => void;
onPlayAll?: () => void;
onShuffleAll?: () => void;
onAddToQueue?: () => void;
onPlayAllNext?: () => void;
onPlayAllLater?: () => void;
onAddTrackToPlaylist?: (trackId: number) => void;
onTrackDownload?: (track: Track) => void;
onTrackRemoveDownload?: (trackId: number) => void;
getTrackDownloadStatus?: (trackId: number) => { status: DownloadStatus; progress: number };
onDownloadAlbum?: () => void;
onShareAlbumQobuz?: () => void;
onShareAlbumSonglink?: () => void;
downloadStateVersion?: number;
}
@@ -69,12 +73,15 @@
onTrackGoToArtist,
onPlayAll,
onShuffleAll,
onAddToQueue,
onPlayAllNext,
onPlayAllLater,
onAddTrackToPlaylist,
onTrackDownload,
onTrackRemoveDownload,
getTrackDownloadStatus,
onDownloadAlbum,
onShareAlbumQobuz,
onShareAlbumSonglink,
downloadStateVersion
}: Props = $props();
@@ -187,17 +194,13 @@
fill={isFavorite ? 'var(--accent-primary)' : 'none'}
/>
</button>
<button class="icon-btn" onclick={onAddToQueue}>
<Plus size={20} color="white" />
</button>
{#if onDownloadAlbum}
<button class="icon-btn" onclick={onDownloadAlbum} title="Download album">
<Download size={20} color="white" />
</button>
{/if}
<button class="icon-btn">
<MoreHorizontal size={20} color="white" />
</button>
<AlbumMenu
onPlayNext={onPlayAllNext}
onPlayLater={onPlayAllLater}
onShareQobuz={onShareAlbumQobuz}
onShareSonglink={onShareAlbumSonglink}
onDownload={onDownloadAlbum}
/>
</div>
</div>
</div>