From 875e178c0bb65eac5c333c0f9e39af2dcb522562 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Sat, 22 Nov 2025 14:47:28 -0800 Subject: [PATCH] move player back above router --- src/renderer/app.tsx | 7 +- src/renderer/router/app-router.tsx | 262 ++++++++++++++--------------- 2 files changed, 132 insertions(+), 137 deletions(-) diff --git a/src/renderer/app.tsx b/src/renderer/app.tsx index 9ec15f85b..dfaf60e84 100644 --- a/src/renderer/app.tsx +++ b/src/renderer/app.tsx @@ -20,6 +20,8 @@ import { useAppTheme } from '/@/renderer/themes/use-app-theme'; import { sanitizeCss } from '/@/renderer/utils/sanitize'; import { WebAudio } from '/@/shared/types/types'; import '/@/shared/styles/global.css'; +import { PlayerProvider } from '/@/renderer/features/player/context/player-context'; +import { AudioPlayers } from '/@/renderer/features/player/components/audio-players'; const ipc = isElectron() ? window.api.ipc : null; @@ -84,7 +86,10 @@ export const App = () => { zIndex={50000} /> - + + + + diff --git a/src/renderer/router/app-router.tsx b/src/renderer/router/app-router.tsx index d4e81186a..60a44aebe 100644 --- a/src/renderer/router/app-router.tsx +++ b/src/renderer/router/app-router.tsx @@ -2,8 +2,6 @@ import { lazy, Suspense } from 'react'; import { HashRouter, Route, Routes } from 'react-router'; import { RouterErrorBoundary } from '/@/renderer/components/error-boundary/router-error-boundary'; -import { AudioPlayers } from '/@/renderer/features/player/components/audio-players'; -import { PlayerProvider } from '/@/renderer/features/player/context/player-context'; import { AddToPlaylistContextModal } from '/@/renderer/features/playlists/components/add-to-playlist-context-modal'; import { ShareItemContextModal } from '/@/renderer/features/sharing/components/share-item-context-modal'; import { ResponsiveLayout } from '/@/renderer/layouts/responsive-layout'; @@ -76,155 +74,147 @@ export const AppRouter = () => { const router = ( - - - - - }> - } - errorElement={} - > - }> + + + }> + } errorElement={}> + }> + } + errorElement={} + index + /> + } + errorElement={} + path={AppRoute.HOME} + /> + } + errorElement={} + path={AppRoute.SEARCH} + /> + } + errorElement={} + path={AppRoute.SETTINGS} + /> + } + errorElement={} + path={AppRoute.NOW_PLAYING} + /> + } + element={} errorElement={} index /> - } - errorElement={} - path={AppRoute.HOME} - /> - } - errorElement={} - path={AppRoute.SEARCH} - /> - } - errorElement={} - path={AppRoute.SETTINGS} - /> - } - errorElement={} - path={AppRoute.NOW_PLAYING} - /> - - } - errorElement={} - index - /> - } - path={AppRoute.LIBRARY_GENRES_ALBUMS} - /> - } - path={AppRoute.LIBRARY_GENRES_SONGS} - /> - } - errorElement={} - path={AppRoute.LIBRARY_ALBUMS} - /> - } - errorElement={} - path={AppRoute.LIBRARY_ALBUMS_DETAIL} - /> - } - errorElement={} - path={AppRoute.LIBRARY_ARTISTS} - /> - - } index /> - } - path={AppRoute.LIBRARY_ARTISTS_DETAIL_DISCOGRAPHY} - /> - } - path={AppRoute.LIBRARY_ARTISTS_DETAIL_SONGS} - /> - } - path={AppRoute.LIBRARY_ARTISTS_DETAIL_TOP_SONGS} - /> - - } - errorElement={} - path={AppRoute.FAKE_LIBRARY_ALBUM_DETAILS} + path={AppRoute.LIBRARY_GENRES_ALBUMS} /> } - errorElement={} - path={AppRoute.LIBRARY_SONGS} + path={AppRoute.LIBRARY_GENRES_SONGS} /> - } - errorElement={} - path={AppRoute.PLAYLISTS} - /> - } - errorElement={} - path={AppRoute.PLAYLISTS_DETAIL_SONGS} - /> - } - path={AppRoute.LIBRARY_ALBUM_ARTISTS} - > - } index /> - - } index /> - } - path={ - AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL_DISCOGRAPHY - } - /> - } - path={ - AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL_SONGS - } - /> - } - path={ - AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL_TOP_SONGS - } - /> - - - } path="*" /> - - - }> - }> } - path={AppRoute.ACTION_REQUIRED} + element={} + errorElement={} + path={AppRoute.LIBRARY_ALBUMS} /> - } path={AppRoute.LOGIN} /> + } + errorElement={} + path={AppRoute.LIBRARY_ALBUMS_DETAIL} + /> + } + errorElement={} + path={AppRoute.LIBRARY_ARTISTS} + /> + + } index /> + } + path={AppRoute.LIBRARY_ARTISTS_DETAIL_DISCOGRAPHY} + /> + } + path={AppRoute.LIBRARY_ARTISTS_DETAIL_SONGS} + /> + } + path={AppRoute.LIBRARY_ARTISTS_DETAIL_TOP_SONGS} + /> + + } + errorElement={} + path={AppRoute.FAKE_LIBRARY_ALBUM_DETAILS} + /> + } + errorElement={} + path={AppRoute.LIBRARY_SONGS} + /> + } + errorElement={} + path={AppRoute.PLAYLISTS} + /> + } + errorElement={} + path={AppRoute.PLAYLISTS_DETAIL_SONGS} + /> + } + path={AppRoute.LIBRARY_ALBUM_ARTISTS} + > + } index /> + + } index /> + } + path={ + AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL_DISCOGRAPHY + } + /> + } + path={AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL_SONGS} + /> + } + path={ + AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL_TOP_SONGS + } + /> + + + } path="*" /> - - - + + }> + }> + } + path={AppRoute.ACTION_REQUIRED} + /> + } path={AppRoute.LOGIN} /> + + + + );