Remove add/remove library button in migration mode from manga cards (#730)
This commit is contained in:
@@ -120,6 +120,7 @@ export const MangaCard = (props: MangaCardProps) => {
|
||||
unread={unreadCount}
|
||||
downloadCount={downloadCount}
|
||||
updateLibraryState={updateLibraryState}
|
||||
mode={mode}
|
||||
/>
|
||||
),
|
||||
[inLibraryIndicator, isInLibrary, unreadCount, downloadCount, updateLibraryState],
|
||||
|
||||
@@ -11,6 +11,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import Button from '@mui/material/Button/Button';
|
||||
import Typography from '@mui/material/Typography/Typography';
|
||||
import { useLibraryOptionsContext } from '@/components/context/LibraryOptionsContext.tsx';
|
||||
import { MangaCardMode } from '@/components/manga/MangaCard.types.tsx';
|
||||
|
||||
const BadgeContainer = styled('div')({
|
||||
display: 'flex',
|
||||
@@ -31,12 +32,14 @@ export const MangaBadges = ({
|
||||
isInLibrary,
|
||||
unread,
|
||||
downloadCount,
|
||||
mode,
|
||||
}: {
|
||||
inLibraryIndicator?: boolean;
|
||||
updateLibraryState: () => void;
|
||||
isInLibrary: boolean;
|
||||
unread?: number;
|
||||
downloadCount?: number;
|
||||
mode: MangaCardMode;
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -46,7 +49,7 @@ export const MangaBadges = ({
|
||||
|
||||
return (
|
||||
<BadgeContainer>
|
||||
{inLibraryIndicator && (
|
||||
{inLibraryIndicator && mode === 'source' && (
|
||||
<Button
|
||||
className="source-manga-library-state-button"
|
||||
component="div"
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface MangaCardProps {
|
||||
mode?: MangaCardMode;
|
||||
}
|
||||
|
||||
export type SpecificMangaCardProps = Omit<MangaCardProps, 'mode'> &
|
||||
export type SpecificMangaCardProps = MangaCardProps &
|
||||
Pick<ReturnType<typeof useManageMangaLibraryState>, 'isInLibrary'> & {
|
||||
longPressBind: LongPressResult<LongPressPointerHandlers>;
|
||||
popupState: PopupState;
|
||||
|
||||
@@ -56,6 +56,7 @@ export const MangaGridCard = ({
|
||||
handleSelection,
|
||||
continueReadingButton,
|
||||
mangaBadges,
|
||||
mode,
|
||||
}: SpecificMangaCardProps) => {
|
||||
const optionButtonRef = useRef<HTMLButtonElement>(null);
|
||||
|
||||
@@ -88,7 +89,7 @@ export const MangaGridCard = ({
|
||||
display: isMobile ? 'none' : 'inline-flex',
|
||||
},
|
||||
'&:hover .source-manga-library-state-indicator': {
|
||||
display: 'none',
|
||||
display: mode === 'source' ? 'none' : 'flex',
|
||||
},
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -34,6 +34,7 @@ export const MangaListCard = ({
|
||||
handleSelection,
|
||||
continueReadingButton,
|
||||
mangaBadges,
|
||||
mode,
|
||||
}: SpecificMangaCardProps) => {
|
||||
const optionButtonRef = useRef<HTMLButtonElement>(null);
|
||||
|
||||
@@ -58,7 +59,7 @@ export const MangaListCard = ({
|
||||
display: isMobile ? 'none' : 'inline-flex',
|
||||
},
|
||||
'&:hover .source-manga-library-state-indicator': {
|
||||
display: 'none',
|
||||
display: mode === 'source' ? 'none' : 'inline-flex',
|
||||
},
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user