Replace missed occurrences with "ListCardContent"

This commit is contained in:
schroda
2025-05-03 11:56:09 +02:00
parent c24d7ca2ef
commit 736e556ccd
4 changed files with 12 additions and 38 deletions

View File

@@ -13,12 +13,12 @@ import DeleteIcon from '@mui/icons-material/Delete';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import Box from '@mui/material/Box'; import Box from '@mui/material/Box';
import Card from '@mui/material/Card'; import Card from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
import Stack from '@mui/material/Stack'; import Stack from '@mui/material/Stack';
import Typography from '@mui/material/Typography'; import Typography from '@mui/material/Typography';
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx'; import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
import { requestManager } from '@/lib/requests/RequestManager.ts'; import { requestManager } from '@/lib/requests/RequestManager.ts';
import { CategoryType } from '@/lib/graphql/generated/graphql.ts'; import { CategoryType } from '@/lib/graphql/generated/graphql.ts';
import { ListCardContent } from '@/modules/core/components/cards/list/ListCardContent.tsx';
export const CategorySettingsCard = ({ export const CategorySettingsCard = ({
category, category,
@@ -36,18 +36,7 @@ export const CategorySettingsCard = ({
return ( return (
<Box sx={{ p: 1, pb: 0 }}> <Box sx={{ p: 1, pb: 0 }}>
<Card> <Card>
<CardContent <ListCardContent sx={{ gap: 2 }}>
sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
padding: 1.5,
'&:last-child': {
paddingBottom: 1.5,
},
gap: 2,
}}
>
<DragHandleIcon /> <DragHandleIcon />
<Typography sx={{ flexGrow: 1 }} variant="h6" component="h2"> <Typography sx={{ flexGrow: 1 }} variant="h6" component="h2">
{category.name} {category.name}
@@ -64,7 +53,7 @@ export const CategorySettingsCard = ({
</IconButton> </IconButton>
</CustomTooltip> </CustomTooltip>
</Stack> </Stack>
</CardContent> </ListCardContent>
</Card> </Card>
</Box> </Box>
); );

View File

@@ -12,7 +12,6 @@ import CardActionArea from '@mui/material/CardActionArea';
import Checkbox from '@mui/material/Checkbox'; import Checkbox from '@mui/material/Checkbox';
import Stack from '@mui/material/Stack'; import Stack from '@mui/material/Stack';
import Card from '@mui/material/Card'; import Card from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
import IconButton from '@mui/material/IconButton'; import IconButton from '@mui/material/IconButton';
import { useTheme } from '@mui/material/styles'; import { useTheme } from '@mui/material/styles';
import React, { memo, MouseEvent, TouchEvent, useRef } from 'react'; import React, { memo, MouseEvent, TouchEvent, useRef } from 'react';
@@ -39,6 +38,7 @@ import {
import { applyStyles } from '@/modules/core/utils/ApplyStyles.ts'; import { applyStyles } from '@/modules/core/utils/ApplyStyles.ts';
import { ChapterCardMetadata } from '@/modules/chapter/components/cards/ChapterCardMetadata.tsx'; import { ChapterCardMetadata } from '@/modules/chapter/components/cards/ChapterCardMetadata.tsx';
import { MUIUtil } from '@/lib/mui/MUI.util.ts'; import { MUIUtil } from '@/lib/mui/MUI.util.ts';
import { ListCardContent } from '@/modules/core/components/cards/list/ListCardContent.tsx';
type TChapter = ChapterIdInfo & type TChapter = ChapterIdInfo &
ChapterMangaInfo & ChapterMangaInfo &
@@ -129,15 +129,7 @@ export const ChapterCard = memo((props: IProps) => {
onClick={(e) => handleClick(e)} onClick={(e) => handleClick(e)}
{...longPressBind(popupState.open)} {...longPressBind(popupState.open)}
> >
<CardContent <ListCardContent>
sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
padding: 1.5,
'&:last-child': { pb: 1.5 },
}}
>
<ChapterCardMetadata <ChapterCardMetadata
title={ title={
showChapterNumber showChapterNumber
@@ -210,7 +202,7 @@ export const ChapterCard = memo((props: IProps) => {
</CustomTooltip> </CustomTooltip>
)} )}
</Stack> </Stack>
</CardContent> </ListCardContent>
</CardActionArea> </CardActionArea>
</Card> </Card>
{!isSelecting && popupState.isOpen && ( {!isSelecting && popupState.isOpen && (

View File

@@ -16,6 +16,9 @@ export const ListCardContent = ({ children, ...props }: CardContentProps) => (
alignItems: 'center', alignItems: 'center',
gap: 1, gap: 1,
p: 1.5, p: 1.5,
'&:last-child': {
paddingBottom: 1.5,
},
...props.sx, ...props.sx,
}} }}
> >

View File

@@ -9,7 +9,6 @@
import Box from '@mui/material/Box'; import Box from '@mui/material/Box';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import Card from '@mui/material/Card'; import Card from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
import Typography from '@mui/material/Typography'; import Typography from '@mui/material/Typography';
import IconButton from '@mui/material/IconButton'; import IconButton from '@mui/material/IconButton';
import SettingsIcon from '@mui/icons-material/Settings'; import SettingsIcon from '@mui/icons-material/Settings';
@@ -29,6 +28,7 @@ import { translateExtensionLanguage } from '@/modules/extension/Extensions.utils
import { StyledGroupItemWrapper } from '@/modules/core/components/virtuoso/StyledGroupItemWrapper.tsx'; import { StyledGroupItemWrapper } from '@/modules/core/components/virtuoso/StyledGroupItemWrapper.tsx';
import { TExtension } from '@/modules/extension/Extensions.types.ts'; import { TExtension } from '@/modules/extension/Extensions.types.ts';
import { Sources } from '@/modules/source/services/Sources.ts'; import { Sources } from '@/modules/source/services/Sources.ts';
import { ListCardContent } from '@/modules/core/components/cards/list/ListCardContent.tsx';
interface IExtensionOptions { interface IExtensionOptions {
extensionId: TExtension['pkgName'] | undefined; extensionId: TExtension['pkgName'] | undefined;
@@ -73,17 +73,7 @@ export function ExtensionOptions({ extensionId, closeDialog }: IExtensionOptions
{relevantSources?.map((source) => ( {relevantSources?.map((source) => (
<StyledGroupItemWrapper key={source.id} sx={{ px: 0 }}> <StyledGroupItemWrapper key={source.id} sx={{ px: 0 }}>
<Card> <Card>
<CardContent <ListCardContent>
sx={{
display: 'flex',
alignItems: 'center',
gap: 1,
p: 1.5,
'&:last-child': {
paddingBottom: 1.5,
},
}}
>
<Typography variant="h6" component="h3" sx={{ flexGrow: 1 }}> <Typography variant="h6" component="h3" sx={{ flexGrow: 1 }}>
{translateExtensionLanguage(Sources.getLanguage(source))} {translateExtensionLanguage(Sources.getLanguage(source))}
</Typography> </Typography>
@@ -101,7 +91,7 @@ export function ExtensionOptions({ extensionId, closeDialog }: IExtensionOptions
</IconButton> </IconButton>
</CustomTooltip> </CustomTooltip>
)} )}
</CardContent> </ListCardContent>
</Card> </Card>
</StyledGroupItemWrapper> </StyledGroupItemWrapper>
))} ))}