Rename "childRoutes" to "children"
This commit is contained in:
@@ -82,7 +82,7 @@ export const BackupValidationDialog = ({
|
||||
<Button
|
||||
onClick={onDismiss}
|
||||
component={Link}
|
||||
to={AppRoutes.settings.childRoutes.tracking.path}
|
||||
to={AppRoutes.settings.children.tracking.path}
|
||||
autoFocus={!!validationResult?.missingTrackers.length}
|
||||
variant={validationResult?.missingTrackers.length ? 'contained' : 'text'}
|
||||
>
|
||||
|
||||
@@ -268,7 +268,7 @@ export function Extensions({ tabsMenuHeight }: { tabsMenuHeight: number }) {
|
||||
}}
|
||||
>
|
||||
<Typography>{t`You have to add a extension repository to be able to install extensions`}</Typography>
|
||||
<Button component={Link} variant="contained" to={AppRoutes.settings.childRoutes.browse.path}>
|
||||
<Button component={Link} variant="contained" to={AppRoutes.settings.children.browse.path}>
|
||||
{t`Settings`}
|
||||
</Button>
|
||||
</Stack>
|
||||
|
||||
@@ -95,7 +95,7 @@ export function ExtensionCard(props: IProps) {
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<OptionalCardActionAreaLink disabled={!isInstalled} to={AppRoutes.extension.childRoutes.info.path(pkgName)}>
|
||||
<OptionalCardActionAreaLink disabled={!isInstalled} to={AppRoutes.extension.children.info.path(pkgName)}>
|
||||
<ListCardContent>
|
||||
<ListCardAvatar
|
||||
iconUrl={requestManager.getValidImgUrlFor(iconUrl)}
|
||||
|
||||
@@ -107,7 +107,7 @@ export function Sources({ tabsMenuHeight }: { tabsMenuHeight: number }) {
|
||||
useAppAction(
|
||||
<>
|
||||
<CustomTooltip title={t`Global Search`}>
|
||||
<IconButton onClick={() => navigate(AppRoutes.sources.childRoutes.searchAll.path())} color="inherit">
|
||||
<IconButton onClick={() => navigate(AppRoutes.sources.children.searchAll.path())} color="inherit">
|
||||
<TravelExploreIcon />
|
||||
</IconButton>
|
||||
</CustomTooltip>
|
||||
|
||||
@@ -63,8 +63,8 @@ export const SourceCard: React.FC<IProps> = (props: IProps) => {
|
||||
<Card>
|
||||
<CardActionArea
|
||||
component={Link}
|
||||
to={AppRoutes.sources.childRoutes.browse.path(id)}
|
||||
state={AppRoutes.sources.childRoutes.browse.state({
|
||||
to={AppRoutes.sources.children.browse.path(id)}
|
||||
state={AppRoutes.sources.children.browse.state({
|
||||
contentType: SourceContentType.POPULAR,
|
||||
clearCache: true,
|
||||
})}
|
||||
@@ -105,8 +105,8 @@ export const SourceCard: React.FC<IProps> = (props: IProps) => {
|
||||
{...MUIUtil.preventRippleProp()}
|
||||
variant="outlined"
|
||||
component={Link}
|
||||
to={AppRoutes.sources.childRoutes.browse.path(id)}
|
||||
state={AppRoutes.sources.childRoutes.browse.state({
|
||||
to={AppRoutes.sources.children.browse.path(id)}
|
||||
state={AppRoutes.sources.children.browse.state({
|
||||
contentType: SourceContentType.LATEST,
|
||||
clearCache: true,
|
||||
})}
|
||||
|
||||
@@ -248,11 +248,7 @@ export function CategorySelect(props: CategorySelectProps) {
|
||||
width: '100%',
|
||||
}}
|
||||
>
|
||||
<Button
|
||||
component={Link}
|
||||
to={AppRoutes.settings.childRoutes.categories.path}
|
||||
onClick={onDismiss}
|
||||
>
|
||||
<Button component={Link} to={AppRoutes.settings.children.categories.path} onClick={onDismiss}>
|
||||
{allCategories.length ? t`Edit` : t`Create`}
|
||||
</Button>
|
||||
<Stack direction="row">
|
||||
|
||||
@@ -133,7 +133,7 @@ export const DownloadSettings = () => {
|
||||
onChange={(e) => updateSetting('downloadAsCbz', e.target.checked)}
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.images.childRoutes.processingDownloads.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.images.children.processingDownloads.path}>
|
||||
<ListItemText primary={t`Image download processing`} />
|
||||
</ListItemLink>
|
||||
<List
|
||||
|
||||
@@ -48,7 +48,7 @@ export const SourceCard = (source: SourceIdInfo & SourceLanguageInfo & SourceCon
|
||||
<CustomTooltip title={t`Settings`}>
|
||||
<IconButton
|
||||
component={Link}
|
||||
to={AppRoutes.sources.childRoutes.configure.path(id)}
|
||||
to={AppRoutes.sources.children.configure.path(id)}
|
||||
color="inherit"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
{...MUIUtil.preventRippleProp()}
|
||||
|
||||
@@ -193,7 +193,7 @@ const SourceSearchPreview = React.memo(
|
||||
<Card sx={{ mb: 1 }}>
|
||||
<CardActionArea
|
||||
component={Link}
|
||||
to={AppRoutes.sources.childRoutes.browse.path(id, searchString)}
|
||||
to={AppRoutes.sources.children.browse.path(id, searchString)}
|
||||
sx={{ p: 1, display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}
|
||||
>
|
||||
<Box>
|
||||
@@ -376,7 +376,7 @@ export const SearchAll = ({
|
||||
replace: true,
|
||||
state: {
|
||||
...state,
|
||||
...AppRoutes.sources.childRoutes.searchAll.state({
|
||||
...AppRoutes.sources.children.searchAll.state({
|
||||
shouldShowOnlyPinnedSources: true,
|
||||
}),
|
||||
},
|
||||
@@ -399,7 +399,7 @@ export const SearchAll = ({
|
||||
replace: true,
|
||||
state: {
|
||||
...state,
|
||||
...AppRoutes.sources.childRoutes.searchAll.state({
|
||||
...AppRoutes.sources.children.searchAll.state({
|
||||
shouldShowOnlyPinnedSources: false,
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -179,7 +179,7 @@ export function Library() {
|
||||
<Button
|
||||
size="large"
|
||||
component={Link}
|
||||
to={AppRoutes.sources.childRoutes.searchAll.path(query)}
|
||||
to={AppRoutes.sources.children.searchAll.path(query)}
|
||||
sx={{ textTransform: 'none', width: '100%' }}
|
||||
>
|
||||
{t`Search for "${query}" globally`}
|
||||
|
||||
@@ -129,7 +129,7 @@ export function LibrarySettings() {
|
||||
</ListSubheader>
|
||||
}
|
||||
>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.categories.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.categories.path}>
|
||||
<ListItemText
|
||||
primary={t`Edit categories`}
|
||||
secondary={plural(categoryCount, {
|
||||
@@ -197,7 +197,7 @@ export function LibrarySettings() {
|
||||
secondary={t`Remove non library manga from categories`}
|
||||
/>
|
||||
</ListItemButton>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.library.childRoutes.duplicates.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.library.children.duplicates.path}>
|
||||
<ListItemText
|
||||
primary={t`Duplicated entries`}
|
||||
secondary={t`Show all duplicated entries in your library`}
|
||||
|
||||
@@ -89,12 +89,12 @@ export const MangaToolbarMenu = ({ manga, onRefresh, refreshing }: IProps) => {
|
||||
<>
|
||||
<CustomTooltip title={t`Migrate`}>
|
||||
<Link
|
||||
to={AppRoutes.migrate.childRoutes.singleMangaSearch.path(
|
||||
to={AppRoutes.migrate.children.singleMangaSearch.path(
|
||||
manga.sourceId,
|
||||
manga.id,
|
||||
manga.title,
|
||||
)}
|
||||
state={AppRoutes.migrate.childRoutes.singleMangaSearch.state({
|
||||
state={AppRoutes.migrate.children.singleMangaSearch.state({
|
||||
title: t`Migrate "${manga.title}"`,
|
||||
})}
|
||||
style={{ textDecoration: 'none', color: 'inherit' }}
|
||||
@@ -165,12 +165,12 @@ export const MangaToolbarMenu = ({ manga, onRefresh, refreshing }: IProps) => {
|
||||
<MenuItem
|
||||
key="migrate"
|
||||
component={Link}
|
||||
to={AppRoutes.migrate.childRoutes.singleMangaSearch.path(
|
||||
to={AppRoutes.migrate.children.singleMangaSearch.path(
|
||||
manga.sourceId,
|
||||
manga.id,
|
||||
manga.title,
|
||||
)}
|
||||
state={AppRoutes.migrate.childRoutes.singleMangaSearch.state({
|
||||
state={AppRoutes.migrate.children.singleMangaSearch.state({
|
||||
title: t`Migrate "${manga.title}"`,
|
||||
})}
|
||||
style={{ textDecoration: 'none', color: 'inherit' }}
|
||||
|
||||
@@ -44,7 +44,7 @@ export const TrackMangaButton = ({ manga }: { manga: MangaTrackRecordInfo & Mang
|
||||
}
|
||||
|
||||
if (!loggedInTrackers.length) {
|
||||
navigate(AppRoutes.settings.childRoutes.tracking.path);
|
||||
navigate(AppRoutes.settings.children.tracking.path);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ const getMangaLinkTo = (
|
||||
case 'duplicate':
|
||||
return AppRoutes.manga.path(mangaId);
|
||||
case 'migrate.search':
|
||||
return AppRoutes.migrate.childRoutes.singleMangaSearch.path(sourceId ?? '-1', mangaId, mangaTitle);
|
||||
return AppRoutes.migrate.children.singleMangaSearch.path(sourceId ?? '-1', mangaId, mangaTitle);
|
||||
case 'migrate.select':
|
||||
return '';
|
||||
default:
|
||||
|
||||
@@ -27,11 +27,11 @@ export const SearchLink = ({
|
||||
const link = (() => {
|
||||
const isSourceMode = mode === 'source' && sourceId !== undefined;
|
||||
if (isSourceMode) {
|
||||
return AppRoutes.sources.childRoutes.browse.path(sourceId, query);
|
||||
return AppRoutes.sources.children.browse.path(sourceId, query);
|
||||
}
|
||||
|
||||
if (mode === 'source.global-search') {
|
||||
return AppRoutes.sources.childRoutes.searchAll.path(query);
|
||||
return AppRoutes.sources.children.searchAll.path(query);
|
||||
}
|
||||
|
||||
return AppRoutes.library.path(undefined, query);
|
||||
|
||||
@@ -319,9 +319,9 @@ export class MigrationManager {
|
||||
const [manga] = mangas;
|
||||
|
||||
ReactRouter.navigate(
|
||||
AppRoutes.migrate.childRoutes.singleMangaSearch.path(manga.sourceId, manga.id, manga.title),
|
||||
AppRoutes.migrate.children.singleMangaSearch.path(manga.sourceId, manga.id, manga.title),
|
||||
{
|
||||
state: AppRoutes.migrate.childRoutes.singleMangaSearch.state({
|
||||
state: AppRoutes.migrate.children.singleMangaSearch.state({
|
||||
title: t`Migrate "${manga.title}"`,
|
||||
}),
|
||||
},
|
||||
@@ -671,7 +671,7 @@ export class MigrationManager {
|
||||
}
|
||||
|
||||
static openManualSearch(mangaId: MangaIdInfo['id'], title: string): void {
|
||||
ReactRouter.navigate(AppRoutes.migrate.childRoutes.manualSearch.path(mangaId, title), {
|
||||
ReactRouter.navigate(AppRoutes.migrate.children.manualSearch.path(mangaId, title), {
|
||||
state: AppRoutes.migrate.children.manualSearch.state({
|
||||
title: t`Manual migration search for "${title}"`,
|
||||
mode: 'migrate.select.bulk',
|
||||
|
||||
@@ -53,10 +53,10 @@ export const ImagesSettings = () => {
|
||||
</ListSubheader>
|
||||
}
|
||||
>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.images.childRoutes.processingDownloads.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.images.children.processingDownloads.path}>
|
||||
<ListItemText primary={t`Image download processing`} />
|
||||
</ListItemLink>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.images.childRoutes.processingServe.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.images.children.processingServe.path}>
|
||||
<ListItemText primary={t`Image serve processing`} />
|
||||
</ListItemLink>
|
||||
</List>
|
||||
|
||||
@@ -48,7 +48,7 @@ export const More = () => {
|
||||
const hiddenItemsMoreGroup = [
|
||||
...(hiddenNavBarItemsByMoreGroup[NavBarItemMoreGroup.HIDDEN_ITEM] ?? STABLE_EMPTY_ARRAY),
|
||||
{
|
||||
path: AppRoutes.settings.childRoutes.categories.path,
|
||||
path: AppRoutes.settings.children.categories.path,
|
||||
title: msg`Categories`,
|
||||
SelectedIconComponent: ListAltIcon,
|
||||
IconComponent: ListAltIcon,
|
||||
|
||||
@@ -33,73 +33,73 @@ export function Settings() {
|
||||
|
||||
return (
|
||||
<List sx={{ padding: 0 }}>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.appearance.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.appearance.path}>
|
||||
<ListItemIcon>
|
||||
<PaletteIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={t`Appearance`} />
|
||||
</ListItemLink>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.reader.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.reader.path}>
|
||||
<ListItemIcon>
|
||||
<AutoStoriesIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={t`Reader`} />
|
||||
</ListItemLink>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.library.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.library.path}>
|
||||
<ListItemIcon>
|
||||
<CollectionsOutlinedBookmarkIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={t`Library`} />
|
||||
</ListItemLink>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.download.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.download.path}>
|
||||
<ListItemIcon>
|
||||
<GetAppOutlinedIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={t`Downloads`} />
|
||||
</ListItemLink>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.images.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.images.path}>
|
||||
<ListItemIcon>
|
||||
<ImageIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={t`Images`} />
|
||||
</ListItemLink>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.tracking.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.tracking.path}>
|
||||
<ListItemIcon>
|
||||
<SyncIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={t`Tracking`} />
|
||||
</ListItemLink>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.backup.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.backup.path}>
|
||||
<ListItemIcon>
|
||||
<BackupIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={t`Backup`} />
|
||||
</ListItemLink>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.browse.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.browse.path}>
|
||||
<ListItemIcon>
|
||||
<ExploreOutlinedIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={t`Browse`} />
|
||||
</ListItemLink>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.history.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.history.path}>
|
||||
<ListItemIcon>
|
||||
<HistoryIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={t`History`} />
|
||||
</ListItemLink>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.device.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.device.path}>
|
||||
<ListItemIcon>
|
||||
<DevicesIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={t`Device`} />
|
||||
</ListItemLink>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.webui.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.webui.path}>
|
||||
<ListItemIcon>
|
||||
<WebIcon />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={t`WebUI`} />
|
||||
</ListItemLink>
|
||||
<ListItemLink to={AppRoutes.settings.childRoutes.server.path}>
|
||||
<ListItemLink to={AppRoutes.settings.children.server.path}>
|
||||
<ListItemIcon>
|
||||
<DnsIcon />
|
||||
</ListItemIcon>
|
||||
|
||||
@@ -359,7 +359,7 @@ export function SourceMangas() {
|
||||
{
|
||||
state: {
|
||||
...locationState,
|
||||
...AppRoutes.sources.childRoutes.browse.state({ contentType: newContentType }),
|
||||
...AppRoutes.sources.children.browse.state({ contentType: newContentType }),
|
||||
},
|
||||
},
|
||||
);
|
||||
@@ -430,7 +430,7 @@ export function SourceMangas() {
|
||||
{source?.isConfigurable && (
|
||||
<CustomTooltip title={t`Settings`}>
|
||||
<IconButton
|
||||
onClick={() => navigate(AppRoutes.sources.childRoutes.configure.path(sourceId))}
|
||||
onClick={() => navigate(AppRoutes.sources.children.configure.path(sourceId))}
|
||||
aria-label="display more actions"
|
||||
edge="end"
|
||||
color="inherit"
|
||||
|
||||
@@ -65,7 +65,7 @@ export const TrackManga = ({ manga }: { manga: MangaIdInfo & MangaTitleInfo }) =
|
||||
|
||||
useEffect(() => {
|
||||
if (!loading && !error && !trackersInUse.length && !loggedInTrackers.length) {
|
||||
navigate(AppRoutes.settings.childRoutes.tracking.path);
|
||||
navigate(AppRoutes.settings.children.tracking.path);
|
||||
}
|
||||
}, [loading]);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ export const TrackerOAuthLogin = () => {
|
||||
makeToast(t`Could not log in to ${trackerName}`, 'error', getErrorMessage(e));
|
||||
}
|
||||
|
||||
navigate(AppRoutes.settings.childRoutes.tracking.path, { replace: true });
|
||||
navigate(AppRoutes.settings.children.tracking.path, { replace: true });
|
||||
};
|
||||
|
||||
login();
|
||||
|
||||
Reference in New Issue
Block a user