Introduce "Extension info" screen

This commit is contained in:
schroda
2025-06-22 23:12:54 +02:00
parent 998400327f
commit 2e105a0539
16 changed files with 1236 additions and 150 deletions

View File

@@ -120,6 +120,17 @@ export const AppRoutes = {
},
},
},
extension: {
match: 'extension',
path: '/extension',
childRoutes: {
info: {
match: ':pkgName',
path: (pkgName: string) => `/extension/${pkgName}`,
},
},
},
downloads: {
match: 'downloads',
path: '/downloads',

View File

@@ -0,0 +1,27 @@
/*
* Copyright (C) Contributors to the Suwayomi project
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { Link } from 'react-router-dom';
import CardActionArea from '@mui/material/CardActionArea';
import { ComponentProps } from 'react';
export const OptionalCardActionAreaLink = ({
disabled,
children,
...props
}: ComponentProps<typeof CardActionArea> & ComponentProps<typeof Link> & { disabled?: boolean }) => {
if (disabled) {
return children;
}
return (
<CardActionArea component={Link} {...props}>
{children}
</CardActionArea>
);
};