From 94ec3bfcbbed1494abeee1161bbada80c78d7a72 Mon Sep 17 00:00:00 2001 From: JSC Date: Sat, 9 Aug 2025 21:45:07 +0200 Subject: [PATCH] fix: update volume default value and improve Playlist component's maxHeight calculation --- src/components/player/Player.tsx | 12 ++++++------ src/components/player/Playlist.tsx | 6 ++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/components/player/Player.tsx b/src/components/player/Player.tsx index e4bf56e..b3bf286 100644 --- a/src/components/player/Player.tsx +++ b/src/components/player/Player.tsx @@ -44,7 +44,7 @@ export function Player({ className }: PlayerProps) { const [state, setState] = useState({ status: 'stopped', mode: 'continuous', - volume: 50, + volume: 80, position: 0 }) const [displayMode, setDisplayMode] = useState('normal') @@ -293,6 +293,9 @@ export function Player({ className }: PlayerProps) { {/* Track Info */}
+

+ {state.current_sound?.name || 'No track selected'} +

{state.current_sound && (state.current_sound.extract_url || state.current_sound.id) && ( @@ -325,15 +328,12 @@ export function Player({ className }: PlayerProps) { )} -

- {state.current_sound?.name || 'No track selected'} -

- {state.playlist && ( + {/* {state.playlist && (

{state.playlist.name}

- )} + )} */}
{/* Progress Bar */} diff --git a/src/components/player/Playlist.tsx b/src/components/player/Playlist.tsx index c8cda80..373876d 100644 --- a/src/components/player/Playlist.tsx +++ b/src/components/player/Playlist.tsx @@ -19,8 +19,6 @@ export function Playlist({ onTrackSelect, variant = 'normal' }: PlaylistProps) { - const maxHeight = variant === 'maximized' ? 'h-[calc(100vh-230px)]' : 'h-60' - return (
{/* Header */} @@ -34,7 +32,7 @@ export function Playlist({
{/* Track List */} - +
{playlist.sounds.map((sound, index) => (
- + {formatDuration(sound.duration)}