fix: update volume default value and improve Playlist component's maxHeight calculation
This commit is contained in:
@@ -44,7 +44,7 @@ export function Player({ className }: PlayerProps) {
|
||||
const [state, setState] = useState<PlayerState>({
|
||||
status: 'stopped',
|
||||
mode: 'continuous',
|
||||
volume: 50,
|
||||
volume: 80,
|
||||
position: 0
|
||||
})
|
||||
const [displayMode, setDisplayMode] = useState<PlayerDisplayMode>('normal')
|
||||
@@ -293,6 +293,9 @@ export function Player({ className }: PlayerProps) {
|
||||
{/* Track Info */}
|
||||
<div className="mb-4 text-center">
|
||||
<div className="flex items-center justify-center gap-2">
|
||||
<h3 className="font-medium text-sm truncate">
|
||||
{state.current_sound?.name || 'No track selected'}
|
||||
</h3>
|
||||
{state.current_sound && (state.current_sound.extract_url || state.current_sound.id) && (
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
@@ -325,15 +328,12 @@ export function Player({ className }: PlayerProps) {
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
)}
|
||||
<h3 className="font-medium text-sm truncate">
|
||||
{state.current_sound?.name || 'No track selected'}
|
||||
</h3>
|
||||
</div>
|
||||
{state.playlist && (
|
||||
{/* {state.playlist && (
|
||||
<p className="text-xs text-muted-foreground truncate">
|
||||
{state.playlist.name}
|
||||
</p>
|
||||
)}
|
||||
)} */}
|
||||
</div>
|
||||
|
||||
{/* Progress Bar */}
|
||||
|
||||
Reference in New Issue
Block a user