From 5340d696cfbcae2fa3baff66dabe2d36f5d43e77 Mon Sep 17 00:00:00 2001 From: kveld9 Date: Tue, 14 Apr 2026 17:26:02 -0300 Subject: [PATCH 1/2] new design --- src/components/AlbumHeader.tsx | 55 ++++--- src/pages/AlbumDetail.tsx | 28 +++- src/pages/PlaylistDetail.tsx | 262 +++++++++++++++++++++++---------- src/store/themeStore.ts | 12 ++ src/styles/theme.css | 24 +++ 5 files changed, 275 insertions(+), 106 deletions(-) diff --git a/src/components/AlbumHeader.tsx b/src/components/AlbumHeader.tsx index 93edef1e..901d6807 100644 --- a/src/components/AlbumHeader.tsx +++ b/src/components/AlbumHeader.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; -import { Play, Heart, ExternalLink, X, ChevronLeft, Download, ListPlus, HardDriveDownload, Loader2, Highlighter } from 'lucide-react'; +import { Play, Heart, ExternalLink, X, ChevronLeft, Download, ListPlus, HardDriveDownload, Loader2, Highlighter, Shuffle } from 'lucide-react'; import { SubsonicSong, buildCoverArtUrl } from '../api/subsonic'; import CachedImage from './CachedImage'; import CoverLightbox from './CoverLightbox'; @@ -8,6 +8,7 @@ import { useTranslation } from 'react-i18next'; import { useIsMobile } from '../hooks/useIsMobile'; import StarRating from './StarRating'; import type { EntityRatingSupportLevel } from '../api/subsonic'; +import { useThemeStore } from '../store/themeStore'; function formatDuration(seconds: number): string { const h = Math.floor(seconds / 3600); @@ -85,6 +86,7 @@ interface AlbumHeaderProps { onRemoveOffline: () => void; onPlayAll: () => void; onEnqueueAll: () => void; + onShuffleAll?: () => void; onBio: () => void; onCloseBio: () => void; entityRatingValue: number; @@ -111,6 +113,7 @@ export default function AlbumHeader({ onRemoveOffline, onPlayAll, onEnqueueAll, + onShuffleAll, onBio, onCloseBio, entityRatingValue, @@ -120,6 +123,7 @@ export default function AlbumHeader({ const { t } = useTranslation(); const navigate = useNavigate(); const isMobile = useIsMobile(); + const enableCoverArtBackground = useThemeStore(s => s.enableCoverArtBackground); const [lightboxOpen, setLightboxOpen] = useState(false); const totalDuration = songs.reduce((acc, s) => acc + s.duration, 0); @@ -138,14 +142,16 @@ export default function AlbumHeader({ )}
- {resolvedCoverUrl && ( -