Disable "more" route on desktop

This commit is contained in:
schroda
2025-04-05 15:23:39 +02:00
parent dcf1b5b1c2
commit 8cbc8c5099

View File

@@ -25,6 +25,7 @@ import { Reader } from '@/modules/reader/screens/Reader.tsx';
import { AppRoutes } from '@/modules/core/AppRoute.constants.ts'; import { AppRoutes } from '@/modules/core/AppRoute.constants.ts';
import { HistorySettings } from '@/modules/history/screens/HistorySettings.tsx'; import { HistorySettings } from '@/modules/history/screens/HistorySettings.tsx';
import { useMetadataServerSettings } from '@/modules/settings/services/ServerSettingsMetadata.ts'; import { useMetadataServerSettings } from '@/modules/settings/services/ServerSettingsMetadata.ts';
import { MediaQuery } from '@/modules/core/utils/MediaQuery.tsx';
const { Browse } = loadable(() => import('@/modules/browse/screens/Browse.tsx'), lazyLoadFallback); const { Browse } = loadable(() => import('@/modules/browse/screens/Browse.tsx'), lazyLoadFallback);
const { DownloadQueue } = loadable(() => import('@/modules/downloads/screens/DownloadQueue.tsx'), lazyLoadFallback); const { DownloadQueue } = loadable(() => import('@/modules/downloads/screens/DownloadQueue.tsx'), lazyLoadFallback);
@@ -102,6 +103,7 @@ const BackgroundSubscriptions = () => {
const MainApp = () => { const MainApp = () => {
const { navBarWidth, appBarHeight, bottomBarHeight } = useNavBarContext(); const { navBarWidth, appBarHeight, bottomBarHeight } = useNavBarContext();
const isMobileWidth = MediaQuery.useIsMobileWidth();
const { const {
settings: { hideHistory }, settings: { hideHistory },
@@ -127,7 +129,7 @@ const MainApp = () => {
{/* General Routes */} {/* General Routes */}
<Route path={AppRoutes.root.match} element={<Navigate to={AppRoutes.library.path} replace />} /> <Route path={AppRoutes.root.match} element={<Navigate to={AppRoutes.library.path} replace />} />
<Route path={AppRoutes.matchAll.match} element={<Navigate to={AppRoutes.root.path} replace />} /> <Route path={AppRoutes.matchAll.match} element={<Navigate to={AppRoutes.root.path} replace />} />
<Route path={AppRoutes.more.match} element={<More />} /> {isMobileWidth && <Route path={AppRoutes.more.match} element={<More />} />}
<Route path={AppRoutes.settings.match}> <Route path={AppRoutes.settings.match}>
<Route index element={<Settings />} /> <Route index element={<Settings />} />
<Route path={AppRoutes.settings.childRoutes.about.match} element={<About />} /> <Route path={AppRoutes.settings.childRoutes.about.match} element={<About />} />