2025-08-16 16:03:32 +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';
|
2026-01-10 19:45:02 +01:00
|
|
|
import { useLingui } from '@lingui/react/macro';
|
2026-03-11 00:11:29 +01:00
|
|
|
import type { TExtension } from '@/features/extension/Extensions.types.ts';
|
2025-08-16 16:03:32 +02:00
|
|
|
import { ExtensionMetadata } from '@/features/extension/info/components/ExtensionMetadata.tsx';
|
|
|
|
|
import { languageCodeToName } from '@/base/utils/Languages.ts';
|
2026-07-01 15:10:36 +02:00
|
|
|
import { isNsfw } from '@/features/extension/Extensions.utils.ts';
|
2025-08-16 16:03:32 +02:00
|
|
|
|
2026-07-01 15:10:36 +02:00
|
|
|
export const Meta = ({ versionName, lang, contentWarning }: TExtension) => {
|
2026-01-10 19:45:02 +01:00
|
|
|
const { t } = useLingui();
|
2025-08-16 16:03:32 +02:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Stack sx={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
|
2026-01-10 19:45:02 +01:00
|
|
|
<ExtensionMetadata title={t`Version`} value={versionName} />
|
|
|
|
|
<ExtensionMetadata title={t`Language`} value={languageCodeToName(lang)} />
|
2026-07-01 15:10:36 +02:00
|
|
|
{isNsfw(contentWarning) && (
|
|
|
|
|
<ExtensionMetadata title={t`Age rating`} value="18+" valueProps={{ color: 'error' }} />
|
|
|
|
|
)}
|
2025-08-16 16:03:32 +02:00
|
|
|
</Stack>
|
|
|
|
|
);
|
|
|
|
|
};
|