fix: multiple UX improvements and bug fixes
Playlist & Favorites: - Fix playlist loading error (missing field `id` in JSON parsing) - Add serde defaults for Track and PlaylistOwner optional fields - Fix track favorites toggle to actually call backend API - Add "Add to playlist" button on track rows in album view Sidebar UI improvements: - Increase sidebar width to 280px - Reduce text size and margins throughout - Normalize all icons to 14px (matching + and refresh buttons) - Add text overflow with ellipsis and tooltip for playlist names User card: - Make user card more compact (smaller avatar, fonts, icons) - Add collapsible toggle - when collapsed shows mini QBZ logo + username Queue & Playback: - Fix next_track spam when queue has only one song (queueEnded flag) Other fixes: - Fix TrackRow prop types (remove invalid hires, bitDepth, samplingRate props) - Fix FavoritesView and PlaylistDetailView component prop types - Add diagnostic logging to credential persistence
This commit is contained in:
1 parent
6eed045404
commit
cdc06d8759
10 files changed
+258
-115
No files matched your search
@@ -36,9 +36,10 @@
|
||||
onPlayAll?: () => void;
|
||||
onShuffleAll?: () => void;
|
||||
onAddToQueue?: () => void;
|
||||
onAddTrackToPlaylist?: (trackId: number) => void;
|
||||
}
|
||||
|
||||
let { album, onBack, onArtistClick, onTrackPlay, onPlayAll, onShuffleAll, onAddToQueue }: Props = $props();
|
||||
let { album, onBack, onArtistClick, onTrackPlay, onPlayAll, onShuffleAll, onAddToQueue, onAddTrackToPlaylist }: Props = $props();
|
||||
|
||||
let currentTrack = $state<number | null>(null);
|
||||
let isFavorite = $state(false);
|
||||
@@ -149,6 +150,7 @@
|
||||
currentTrack = track.id;
|
||||
onTrackPlay?.(track);
|
||||
}}
|
||||
onAddToPlaylist={onAddTrackToPlaylist ? () => onAddTrackToPlaylist(track.id) : undefined}
|
||||
/>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
@@ -244,10 +244,8 @@
|
||||
title={track.title}
|
||||
artist={track.performer?.name}
|
||||
duration={formatDuration(track.duration)}
|
||||
hires={track.hires}
|
||||
bitDepth={track.maximum_bit_depth}
|
||||
samplingRate={track.maximum_sampling_rate}
|
||||
onclick={() => handleTrackClick(track, index)}
|
||||
quality={track.hires ? 'Hi-Res' : undefined}
|
||||
onPlay={() => handleTrackClick(track, index)}
|
||||
/>
|
||||
{/each}
|
||||
</div>
|
||||
@@ -266,8 +264,7 @@
|
||||
artwork={album.image?.large || album.image?.thumbnail || ''}
|
||||
title={album.title}
|
||||
artist={album.artist.name}
|
||||
year={album.release_date_original?.slice(0, 4)}
|
||||
hires={album.hires}
|
||||
quality={album.hires ? 'Hi-Res' : undefined}
|
||||
onclick={() => onAlbumClick?.(album.id)}
|
||||
/>
|
||||
{/each}
|
||||
|
||||
@@ -451,10 +451,8 @@
|
||||
title={track.title}
|
||||
artist={track.artist}
|
||||
duration={track.duration}
|
||||
hires={track.hires}
|
||||
bitDepth={track.bitDepth}
|
||||
samplingRate={track.samplingRate}
|
||||
onclick={() => handleTrackClick(track)}
|
||||
quality={track.hires ? 'Hi-Res' : undefined}
|
||||
onPlay={() => handleTrackClick(track)}
|
||||
/>
|
||||
{/each}
|
||||
|
||||
|
||||
Reference in new issue
Block a user