From 2399f341038a8ccded52d846f716590115d067d1 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Fri, 9 Jan 2026 09:37:36 -0600 Subject: [PATCH] chore: remove dummy text and improve empty states Sidebar: - Remove placeholder playlists (My Playlist 1/2/3) - Keep only Favorites under Playlists section NowPlayingBar: - Remove hardcoded placeholder values (Irreplaceable, etc.) - Add empty state when no track is playing - Fix remaining time to be dynamic (duration - currentTime) - Add artwork placeholder when image is missing - Handle quality dots visibility properly --- src/lib/components/NowPlayingBar.svelte | 83 ++++++++++++++++++------- src/lib/components/Sidebar.svelte | 29 ++------- 2 files changed, 64 insertions(+), 48 deletions(-) diff --git a/src/lib/components/NowPlayingBar.svelte b/src/lib/components/NowPlayingBar.svelte index cd8251082..75e189a66 100644 --- a/src/lib/components/NowPlayingBar.svelte +++ b/src/lib/components/NowPlayingBar.svelte @@ -40,17 +40,17 @@ } let { - artwork = 'https://images.unsplash.com/photo-1470225620780-dba8ba36b745?w=200&h=200&fit=crop', - trackTitle = 'Irreplaceable', - artist = 'El Silencio de las Vega', - quality = 'FLAC • 24/192', - qualityLevel = 5, + artwork = '', + trackTitle = '', + artist = '', + quality = '', + qualityLevel = 0, isPlaying = false, onTogglePlay, onSkipBack, onSkipForward, - currentTime = 201, - duration = 345, + currentTime = 0, + duration = 0, onSeek, volume = 70, onVolumeChange, @@ -69,7 +69,8 @@ let isDraggingProgress = $state(false); let isDraggingVolume = $state(false); - const progress = $derived((currentTime / duration) * 100); + const progress = $derived(duration > 0 ? (currentTime / duration) * 100 : 0); + const hasTrack = $derived(trackTitle !== ''); function formatTime(seconds: number): string { const mins = Math.floor(seconds / 60); @@ -133,22 +134,36 @@
@@ -294,6 +309,28 @@ object-fit: cover; } + .artwork-placeholder { + width: 56px; + height: 56px; + border-radius: 4px; + background: var(--bg-tertiary); + display: flex; + align-items: center; + justify-content: center; + color: var(--text-muted); + } + + .empty-state { + display: flex; + align-items: center; + height: 56px; + } + + .empty-text { + font-size: 14px; + color: var(--text-muted); + } + .track-details { flex: 1; min-width: 0; diff --git a/src/lib/components/Sidebar.svelte b/src/lib/components/Sidebar.svelte index d06741562..b95a14c12 100644 --- a/src/lib/components/Sidebar.svelte +++ b/src/lib/components/Sidebar.svelte @@ -116,32 +116,11 @@