Rename "childRoutes" to "children"
This commit is contained in:
69
src/App.tsx
69
src/App.tsx
@@ -226,7 +226,7 @@ const PrivateRoutes = () => {
|
||||
return (
|
||||
<Navigate
|
||||
to={{
|
||||
pathname: AppRoutes.authentication.childRoutes.login.path,
|
||||
pathname: AppRoutes.authentication.children.login.path,
|
||||
search: `${SearchParam.REDIRECT}=${window.location.pathname}`,
|
||||
}}
|
||||
replace
|
||||
@@ -263,7 +263,7 @@ const MainApp = () => {
|
||||
<ErrorBoundary>
|
||||
<Routes>
|
||||
<Route path={AppRoutes.authentication.match}>
|
||||
<Route path={AppRoutes.authentication.childRoutes.login.match} element={<LoginPage />} />
|
||||
<Route path={AppRoutes.authentication.children.login.match} element={<LoginPage />} />
|
||||
</Route>
|
||||
|
||||
<Route element={<PrivateRoutes />}>
|
||||
@@ -280,59 +280,47 @@ const MainApp = () => {
|
||||
<Route path={AppRoutes.about.match} element={<About />} />
|
||||
<Route path={AppRoutes.settings.match}>
|
||||
<Route index element={<Settings />} />
|
||||
<Route
|
||||
path={AppRoutes.settings.childRoutes.categories.match}
|
||||
element={<CategorySettings />}
|
||||
/>
|
||||
<Route
|
||||
path={AppRoutes.settings.childRoutes.reader.match}
|
||||
element={<GlobalReaderSettings />}
|
||||
/>
|
||||
<Route path={AppRoutes.settings.childRoutes.library.match}>
|
||||
<Route path={AppRoutes.settings.children.categories.match} element={<CategorySettings />} />
|
||||
<Route path={AppRoutes.settings.children.reader.match} element={<GlobalReaderSettings />} />
|
||||
<Route path={AppRoutes.settings.children.library.match}>
|
||||
<Route index element={<LibrarySettings />} />
|
||||
<Route
|
||||
path={AppRoutes.settings.childRoutes.library.childRoutes.duplicates.match}
|
||||
path={AppRoutes.settings.children.library.children.duplicates.match}
|
||||
element={<LibraryDuplicates />}
|
||||
/>
|
||||
</Route>
|
||||
<Route path={AppRoutes.settings.childRoutes.download.match}>
|
||||
<Route path={AppRoutes.settings.children.download.match}>
|
||||
<Route index element={<DownloadSettings />} />
|
||||
{/* TODO: deprecated - got moved to "settings/images/processing/downloads" */}
|
||||
<Route
|
||||
path={AppRoutes.settings.childRoutes.download.childRoutes.conversions.match}
|
||||
path={AppRoutes.settings.children.download.children.conversions.match}
|
||||
element={
|
||||
<Navigate
|
||||
to={
|
||||
AppRoutes.settings.childRoutes.images.childRoutes.processingDownloads
|
||||
.path
|
||||
}
|
||||
to={AppRoutes.settings.children.images.children.processingDownloads.path}
|
||||
replace
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</Route>
|
||||
<Route path={AppRoutes.settings.childRoutes.images.match}>
|
||||
<Route path={AppRoutes.settings.children.images.match}>
|
||||
<Route index element={<ImagesSettings />} />
|
||||
<Route
|
||||
path={AppRoutes.settings.childRoutes.images.childRoutes.processingDownloads.match}
|
||||
path={AppRoutes.settings.children.images.children.processingDownloads.match}
|
||||
element={<ImageProcessingSetting type={ImageProcessingType.DOWNLOAD} />}
|
||||
/>
|
||||
<Route
|
||||
path={AppRoutes.settings.childRoutes.images.childRoutes.processingServe.match}
|
||||
path={AppRoutes.settings.children.images.children.processingServe.match}
|
||||
element={<ImageProcessingSetting type={ImageProcessingType.SERVE} />}
|
||||
/>
|
||||
</Route>
|
||||
<Route path={AppRoutes.settings.childRoutes.backup.match} element={<Backup />} />
|
||||
<Route path={AppRoutes.settings.childRoutes.server.match} element={<ServerSettings />} />
|
||||
<Route path={AppRoutes.settings.childRoutes.webui.match} element={<WebUISettings />} />
|
||||
<Route path={AppRoutes.settings.childRoutes.browse.match} element={<BrowseSettings />} />
|
||||
<Route path={AppRoutes.settings.childRoutes.history.match} element={<HistorySettings />} />
|
||||
<Route path={AppRoutes.settings.childRoutes.device.match} element={<DeviceSetting />} />
|
||||
<Route
|
||||
path={AppRoutes.settings.childRoutes.tracking.match}
|
||||
element={<TrackingSettings />}
|
||||
/>
|
||||
<Route path={AppRoutes.settings.childRoutes.appearance.match} element={<Appearance />} />
|
||||
<Route path={AppRoutes.settings.children.backup.match} element={<Backup />} />
|
||||
<Route path={AppRoutes.settings.children.server.match} element={<ServerSettings />} />
|
||||
<Route path={AppRoutes.settings.children.webui.match} element={<WebUISettings />} />
|
||||
<Route path={AppRoutes.settings.children.browse.match} element={<BrowseSettings />} />
|
||||
<Route path={AppRoutes.settings.children.history.match} element={<HistorySettings />} />
|
||||
<Route path={AppRoutes.settings.children.device.match} element={<DeviceSetting />} />
|
||||
<Route path={AppRoutes.settings.children.tracking.match} element={<TrackingSettings />} />
|
||||
<Route path={AppRoutes.settings.children.appearance.match} element={<Appearance />} />
|
||||
</Route>
|
||||
|
||||
{/* Manga Routes */}
|
||||
@@ -340,9 +328,9 @@ const MainApp = () => {
|
||||
<Route path={AppRoutes.sources.match}>
|
||||
{/* TODO: deprecated - "source" and "extension" page got merged into "browse" */}
|
||||
<Route index element={<Navigate to={AppRoutes.browse.path(BrowseTab.SOURCES)} replace />} />
|
||||
<Route path={AppRoutes.sources.childRoutes.browse.match} element={<SourceMangas />} />
|
||||
<Route path={AppRoutes.sources.childRoutes.configure.match} element={<SourceConfigure />} />
|
||||
<Route path={AppRoutes.sources.childRoutes.searchAll.match} element={<SearchAll />} />
|
||||
<Route path={AppRoutes.sources.children.browse.match} element={<SourceMangas />} />
|
||||
<Route path={AppRoutes.sources.children.configure.match} element={<SourceConfigure />} />
|
||||
<Route path={AppRoutes.sources.children.searchAll.match} element={<SearchAll />} />
|
||||
</Route>
|
||||
<Route path={AppRoutes.extension.match}>
|
||||
{/* TODO: deprecated - "source" and "extension" page got merged into "browse" */}
|
||||
@@ -350,11 +338,11 @@ const MainApp = () => {
|
||||
index
|
||||
element={<Navigate to={AppRoutes.browse.path(BrowseTab.EXTENSIONS)} replace />}
|
||||
/>
|
||||
<Route path={AppRoutes.extension.childRoutes.info.match} element={<ExtensionInfo />} />
|
||||
<Route path={AppRoutes.extension.children.info.match} element={<ExtensionInfo />} />
|
||||
</Route>
|
||||
<Route path={AppRoutes.downloads.match} element={<DownloadQueue />} />
|
||||
<Route path={AppRoutes.manga.match}>
|
||||
<Route path={AppRoutes.manga.childRoutes.reader.match} element={null} />
|
||||
<Route path={AppRoutes.manga.children.reader.match} element={null} />
|
||||
<Route index element={<Manga />} />
|
||||
</Route>
|
||||
<Route path={AppRoutes.library.match} element={<Library />} />
|
||||
@@ -364,12 +352,9 @@ const MainApp = () => {
|
||||
<Route path={AppRoutes.browse.match} element={<Browse />} />
|
||||
<Route path={AppRoutes.migrate.match}>
|
||||
<Route index element={<Migration />} />
|
||||
<Route path={AppRoutes.migrate.children.singleMangaSearch.match} element={<SearchAll />} />
|
||||
<Route
|
||||
path={AppRoutes.migrate.childRoutes.singleMangaSearch.match}
|
||||
element={<SearchAll />}
|
||||
/>
|
||||
<Route
|
||||
path={AppRoutes.migrate.childRoutes.manualSearch.match}
|
||||
path={AppRoutes.migrate.children.manualSearch.match}
|
||||
element={<MigrationManualSearch />}
|
||||
/>
|
||||
</Route>
|
||||
|
||||
Reference in New Issue
Block a user