From 842ead651869ae5a36e275264aaeac2e27944604 Mon Sep 17 00:00:00 2001 From: R0m1k3 Date: Fri, 17 Apr 2026 11:41:25 +0200 Subject: [PATCH] style: unify floating player design across all pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the old compact floating bar (h-88px rounded-2rem with expand button) with the same clean mini-bar design as the Dashboard sticky sub-bar — artwork + title + seeks + play + time + speed/volume/expand/ close + thin progress bar. The Dashboard hero inline player is kept. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/App.tsx | 18 +-- frontend/src/components/AudioPlayer.tsx | 153 ++++++++++++------------ frontend/src/pages/Dashboard.tsx | 76 ++++++------ 3 files changed, 120 insertions(+), 127 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 5e069ba..b440a03 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -28,21 +28,11 @@ function AppContent() { const isDashboard = location.pathname === '/dashboard' || location.pathname === '/'; const [user, setUser] = useState(null); - // Load user for the player useEffect(() => { - const loadUser = async () => { - try { - const { accessToken } = authService.getTokens(); - if (accessToken) { - const response = await authService.getMe(); - setUser(response.user); - } - } catch (error) { - console.error('Failed to load user for global player'); - } - }; - loadUser(); - }, [currentEpisode]); // Reload if needed or on mount + const { accessToken } = authService.getTokens(); + if (!accessToken) return; + authService.getMe().then(r => setUser(r.user)).catch(() => {}); + }, [currentEpisode]); return ( <> diff --git a/frontend/src/components/AudioPlayer.tsx b/frontend/src/components/AudioPlayer.tsx index 5356565..b0d5726 100644 --- a/frontend/src/components/AudioPlayer.tsx +++ b/frontend/src/components/AudioPlayer.tsx @@ -366,12 +366,7 @@ export default function AudioPlayer({ episode, onClose, userId, mode = 'floating } return ( -
- + <>