Simplify setting route names
This commit is contained in:
10
src/App.tsx
10
src/App.tsx
@@ -119,18 +119,18 @@ const MainApp = () => {
|
|||||||
<Route index element={<Settings />} />
|
<Route index element={<Settings />} />
|
||||||
<Route path="about" element={<About />} />
|
<Route path="about" element={<About />} />
|
||||||
<Route path="categories" element={<CategorySettings />} />
|
<Route path="categories" element={<CategorySettings />} />
|
||||||
<Route path="readerSettings" element={<GlobalReaderSettings />} />
|
<Route path="reader" element={<GlobalReaderSettings />} />
|
||||||
<Route path="librarySettings">
|
<Route path="library">
|
||||||
<Route index element={<LibrarySettings />} />
|
<Route index element={<LibrarySettings />} />
|
||||||
<Route path="duplicates" element={<LibraryDuplicates />} />
|
<Route path="duplicates" element={<LibraryDuplicates />} />
|
||||||
</Route>
|
</Route>
|
||||||
<Route path="downloadSettings" element={<DownloadSettings />} />
|
<Route path="download" element={<DownloadSettings />} />
|
||||||
<Route path="backup" element={<Backup />} />
|
<Route path="backup" element={<Backup />} />
|
||||||
<Route path="server" element={<ServerSettings />} />
|
<Route path="server" element={<ServerSettings />} />
|
||||||
<Route path="webUI" element={<WebUISettings />} />
|
<Route path="webUI" element={<WebUISettings />} />
|
||||||
<Route path="browseSettings" element={<BrowseSettings />} />
|
<Route path="browse" element={<BrowseSettings />} />
|
||||||
<Route path="device" element={<DeviceSetting />} />
|
<Route path="device" element={<DeviceSetting />} />
|
||||||
<Route path="trackingSettings" element={<TrackingSettings />} />
|
<Route path="tracking" element={<TrackingSettings />} />
|
||||||
<Route path="appearance" element={<Appearance />} />
|
<Route path="appearance" element={<Appearance />} />
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ export function Backup() {
|
|||||||
<Button
|
<Button
|
||||||
onClick={closeInvalidBackupDialog}
|
onClick={closeInvalidBackupDialog}
|
||||||
component={Link}
|
component={Link}
|
||||||
to="/settings/trackingSettings"
|
to="/settings/tracking"
|
||||||
autoFocus={!!validationResult?.missingTrackers.length}
|
autoFocus={!!validationResult?.missingTrackers.length}
|
||||||
variant={validationResult?.missingTrackers.length ? 'contained' : 'text'}
|
variant={validationResult?.missingTrackers.length ? 'contained' : 'text'}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ export function Extensions({ tabsMenuHeight }: { tabsMenuHeight: number }) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography>{t('extension.label.add_repository_info')}</Typography>
|
<Typography>{t('extension.label.add_repository_info')}</Typography>
|
||||||
<Button component={Link} variant="contained" to="/settings/browseSettings">
|
<Button component={Link} variant="contained" to="/settings/browse">
|
||||||
{t('settings.title')}
|
{t('settings.title')}
|
||||||
</Button>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export const TrackMangaButton = ({ manga }: { manga: MangaTrackRecordInfo & Pick
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!loggedInTrackers.length) {
|
if (!loggedInTrackers.length) {
|
||||||
navigate('/settings/trackingSettings');
|
navigate('/settings/tracking');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,25 +69,25 @@ export function Settings() {
|
|||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText primary={t('category.title.category_other')} />
|
<ListItemText primary={t('category.title.category_other')} />
|
||||||
</ListItemLink>
|
</ListItemLink>
|
||||||
<ListItemLink to="/settings/readerSettings">
|
<ListItemLink to="/settings/reader">
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<AutoStoriesIcon />
|
<AutoStoriesIcon />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText primary={t('reader.settings.title.reader_settings')} />
|
<ListItemText primary={t('reader.settings.title.reader_settings')} />
|
||||||
</ListItemLink>
|
</ListItemLink>
|
||||||
<ListItemLink to="/settings/librarySettings">
|
<ListItemLink to="/settings/library">
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<CollectionsOutlinedBookmarkIcon />
|
<CollectionsOutlinedBookmarkIcon />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText primary={t('library.title')} />
|
<ListItemText primary={t('library.title')} />
|
||||||
</ListItemLink>
|
</ListItemLink>
|
||||||
<ListItemLink to="/settings/downloadSettings">
|
<ListItemLink to="/settings/download">
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<GetAppOutlinedIcon />
|
<GetAppOutlinedIcon />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText primary={t('download.title')} />
|
<ListItemText primary={t('download.title')} />
|
||||||
</ListItemLink>
|
</ListItemLink>
|
||||||
<ListItemLink to="/settings/trackingSettings">
|
<ListItemLink to="/settings/tracking">
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<SyncIcon />
|
<SyncIcon />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
@@ -109,7 +109,7 @@ export function Settings() {
|
|||||||
secondary={t('settings.clear_cache.label.description')}
|
secondary={t('settings.clear_cache.label.description')}
|
||||||
/>
|
/>
|
||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
<ListItemLink to="/settings/browseSettings">
|
<ListItemLink to="/settings/browse">
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<ExploreOutlinedIcon />
|
<ExploreOutlinedIcon />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export const TrackManga = ({ manga }: { manga: MangaIdInfo & Pick<MangaType, 'ti
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!loading && !error && !trackersInUse.length && !loggedInTrackers.length) {
|
if (!loading && !error && !trackersInUse.length && !loggedInTrackers.length) {
|
||||||
navigate('/settings/trackingSettings');
|
navigate('/settings/tracking');
|
||||||
}
|
}
|
||||||
}, [loading]);
|
}, [loading]);
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export const TrackerOAuthLogin = () => {
|
|||||||
makeToast(t('tracking.action.login.label.failure', { name: trackerName }), 'error');
|
makeToast(t('tracking.action.login.label.failure', { name: trackerName }), 'error');
|
||||||
}
|
}
|
||||||
|
|
||||||
navigate('/settings/trackingSettings', { replace: true });
|
navigate('/settings/tracking', { replace: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
login();
|
login();
|
||||||
|
|||||||
Reference in New Issue
Block a user