diff --git a/src/components/player/Playlist.tsx b/src/components/player/Playlist.tsx index cc0ba0c..9f3607e 100644 --- a/src/components/player/Playlist.tsx +++ b/src/components/player/Playlist.tsx @@ -22,9 +22,10 @@ export function Playlist({ const maxHeight = variant === 'maximized' ? 'h-[calc(100vh-200px)]' : 'h-60' return ( -
-
-

+
+ {/* Header */} +
+

{playlist.name}

@@ -32,98 +33,69 @@ export function Playlist({
- -
+ {/* Track List */} + +
{playlist.sounds.map((sound, index) => (
onTrackSelect(index)} > - {/* Track Number or Play Icon */} -
+ {/* Track number/play icon - 1 column */} +
{currentIndex === index ? ( - + ) : ( - - {index + 1} - + {index + 1} )}
- - {/* Thumbnail */} -
- {sound.thumbnail ? ( - {sound.name} { - // Hide image and show music icon if thumbnail fails to load - const target = e.target as HTMLImageElement - target.style.display = 'none' - const musicIcon = target.nextElementSibling as HTMLElement - if (musicIcon) musicIcon.style.display = 'block' - }} - /> - ) : null} - + + {/* Thumbnail - 1 column */} +
+
+ {sound.thumbnail ? ( + + ) : ( + + )} +
- - {/* Track Info */} -
-

+ {sound.name} -

- {/*

- {sound.filename} -

*/} +
- - {/* Duration and Type */} - {/*
- + + {/* Duration - 2 columns */} +
+ {formatDuration(sound.duration)} - - {sound.type} - -
*/} +
))}
- {/* Playlist Stats */} -
+ {/* Footer Stats */} +
{playlist.sounds.length} tracks {formatDuration(playlist.duration)}