fix: improve thumbnail display in MusicPlayer with better styling and responsiveness
Some checks failed
Frontend CI / lint (push) Failing after 5m6s
Frontend CI / build (push) Has been skipped

This commit is contained in:
JSC
2025-07-18 22:07:46 +02:00
parent 7e8a416473
commit 72398db750

View File

@@ -123,11 +123,11 @@ export function MusicPlayer() {
<Card className="fixed bottom-4 right-4 w-80 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 border shadow-lg z-50"> <Card className="fixed bottom-4 right-4 w-80 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 border shadow-lg z-50">
{/* Thumbnail */} {/* Thumbnail */}
{currentTrack?.thumbnail && ( {currentTrack?.thumbnail && (
<div className="relative h-32 w-full overflow-hidden rounded-t-lg"> <div className="relative w-full overflow-hidden rounded-t-lg bg-muted/50 flex items-center justify-center">
<img <img
src={currentTrack.thumbnail} src={currentTrack.thumbnail}
alt={currentTrack.title} alt={currentTrack.title}
className="h-full w-full object-cover" className="max-w-full max-h-45 object-contain"
/> />
<div className="absolute top-2 right-2 flex space-x-1"> <div className="absolute top-2 right-2 flex space-x-1">
<Button <Button
@@ -296,11 +296,11 @@ export function MusicPlayer() {
<div className="flex-1 flex flex-col items-center justify-center p-8"> <div className="flex-1 flex flex-col items-center justify-center p-8">
{/* Large thumbnail */} {/* Large thumbnail */}
{currentTrack?.thumbnail && ( {currentTrack?.thumbnail && (
<div className="w-80 h-80 rounded-lg overflow-hidden mb-6 shadow-lg"> <div className="max-w-full rounded-lg overflow-hidden mb-6 shadow-lg bg-muted/50 flex items-center justify-center">
<img <img
src={currentTrack.thumbnail} src={currentTrack.thumbnail}
alt={currentTrack.title} alt={currentTrack.title}
className="h-full w-full object-cover" className="max-w-full max-h-full object-contain"
/> />
</div> </div>
)} )}