2024-10-03 04:02:59 +02:00
|
|
|
/*
|
|
|
|
|
* 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 Stack from '@mui/material/Stack';
|
|
|
|
|
import Tooltip from '@mui/material/Tooltip';
|
|
|
|
|
import Link from '@mui/material/Link';
|
|
|
|
|
|
|
|
|
|
import { Link as RouterLink } from 'react-router-dom';
|
|
|
|
|
import { TypographyMaxLines } from '@/modules/core/components/TypographyMaxLines';
|
2024-12-11 20:10:59 +01:00
|
|
|
import { AppRoutes } from '@/modules/core/AppRoute.constants.ts';
|
2024-10-03 04:02:59 +02:00
|
|
|
|
|
|
|
|
export const ReaderNavBarDesktopMetadata = ({
|
|
|
|
|
mangaId,
|
|
|
|
|
mangaTitle,
|
|
|
|
|
chapterTitle,
|
2024-12-19 00:36:01 +01:00
|
|
|
scanlator,
|
2024-10-03 04:02:59 +02:00
|
|
|
}: {
|
|
|
|
|
mangaId: number;
|
|
|
|
|
mangaTitle: string;
|
|
|
|
|
chapterTitle: string;
|
2024-12-19 00:36:01 +01:00
|
|
|
scanlator?: string | null;
|
2024-10-03 04:02:59 +02:00
|
|
|
}) => (
|
|
|
|
|
<Stack>
|
|
|
|
|
<Tooltip title={mangaTitle} placement="right">
|
|
|
|
|
<TypographyMaxLines lines={3} variant="h6" component="h1" sx={{ textAlign: 'center' }}>
|
2024-12-11 20:10:59 +01:00
|
|
|
<Link
|
|
|
|
|
component={RouterLink}
|
|
|
|
|
to={AppRoutes.manga.path(mangaId)}
|
|
|
|
|
sx={{ textDecoration: 'none', color: 'inherit' }}
|
|
|
|
|
>
|
2024-10-03 04:02:59 +02:00
|
|
|
{mangaTitle}
|
|
|
|
|
</Link>
|
|
|
|
|
</TypographyMaxLines>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
<Tooltip title={chapterTitle} placement="right">
|
|
|
|
|
<TypographyMaxLines lines={4} variant="body1" component="h2" sx={{ textAlign: 'center' }}>
|
|
|
|
|
{chapterTitle}
|
|
|
|
|
</TypographyMaxLines>
|
|
|
|
|
</Tooltip>
|
2024-12-19 00:36:01 +01:00
|
|
|
{scanlator && (
|
|
|
|
|
<Tooltip title={scanlator} placement="right">
|
|
|
|
|
<TypographyMaxLines
|
|
|
|
|
lines={4}
|
|
|
|
|
variant="body2"
|
|
|
|
|
component="h3"
|
|
|
|
|
color="textDisabled"
|
|
|
|
|
sx={{ textAlign: 'center' }}
|
|
|
|
|
>
|
|
|
|
|
{scanlator}
|
|
|
|
|
</TypographyMaxLines>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
)}
|
2024-10-03 04:02:59 +02:00
|
|
|
</Stack>
|
|
|
|
|
);
|