From 30317b7617191287b54d5eb85d8443d885fc646e Mon Sep 17 00:00:00 2001 From: JSC Date: Tue, 8 Jul 2025 11:01:35 +0200 Subject: [PATCH] feat: add ultra-minimized view and toggle functionality in MusicPlayer --- src/components/MusicPlayer.tsx | 38 +++++++++++++++++++++++++++-- src/contexts/MusicPlayerContext.tsx | 13 ++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/src/components/MusicPlayer.tsx b/src/components/MusicPlayer.tsx index 70cda77..ad21a89 100644 --- a/src/components/MusicPlayer.tsx +++ b/src/components/MusicPlayer.tsx @@ -16,7 +16,8 @@ import { Shuffle, List, Maximize2, - Minimize2 + Minimize2, + Minus } from 'lucide-react' export function MusicPlayer() { @@ -31,6 +32,7 @@ export function MusicPlayer() { playlist, currentTrackIndex, isMinimized, + isUltraMinimized, showPlaylist, togglePlayPause, stop, @@ -42,6 +44,7 @@ export function MusicPlayer() { setPlayMode, playTrack, toggleMaximize, + toggleUltraMinimize, togglePlaylistVisibility, } = useMusicPlayer() @@ -95,6 +98,28 @@ export function MusicPlayer() { const progressPercentage = (currentTime / duration) * 100 + // Ultra-minimized view - only essential controls + if (isUltraMinimized) { + return ( + +
+ + + + +
+
+ ) + } + if (isMinimized) { return ( @@ -106,7 +131,16 @@ export function MusicPlayer() { alt={currentTrack.title} className="h-full w-full object-cover" /> -
+
+