Show "ContinueReadButton" on in library

This commit is contained in:
schroda
2024-05-08 18:59:01 +02:00
parent 4d3889532e
commit 23ea896524
3 changed files with 10 additions and 3 deletions

View File

@@ -29,6 +29,7 @@ const getMangaLinkTo = (
switch (mode) {
case 'default':
case 'source':
case 'duplicate':
return `/manga/${mangaId}/`;
case 'migrate.search':
return `/migrate/source/${sourceId}/manga/${mangaId}/search?query=${mangaTitle}`;
@@ -106,7 +107,7 @@ export const MangaCard = (props: MangaCardProps) => {
const continueReadingButton = useMemo(
() => (
<ContinueReadingButton
showContinueReadingButton={showContinueReadingButton}
showContinueReadingButton={showContinueReadingButton && mode === 'default'}
isLatestChapterRead={isLatestChapterRead}
nextChapterIndexToRead={nextChapterIndexToRead}
mangaLinkTo={mangaLinkTo}

View File

@@ -13,7 +13,7 @@ import { GridLayout } from '@/components/context/LibraryOptionsContext.tsx';
import { SelectableCollectionReturnType } from '@/components/collection/useSelectableCollection.ts';
import { useManageMangaLibraryState } from '@/components/manga/useManageMangaLibraryState.tsx';
export type MangaCardMode = 'default' | 'source' | 'migrate.search' | 'migrate.select';
export type MangaCardMode = 'default' | 'source' | 'migrate.search' | 'migrate.select' | 'duplicate';
export interface MangaCardProps {
manga: TPartialManga;

View File

@@ -171,7 +171,12 @@ export const LibraryDuplicates = () => {
)}
itemContent={(index) => (
<Box key={duplicatedMangas[index].id} sx={{ px: 1, pb: 1 }}>
<MangaCard manga={duplicatedMangas[index]} gridLayout={gridLayout} selected={null} />
<MangaCard
manga={duplicatedMangas[index]}
gridLayout={gridLayout}
selected={null}
mode="duplicate"
/>
</Box>
)}
/>
@@ -190,6 +195,7 @@ export const LibraryDuplicates = () => {
isLoading={false}
gridLayout={gridLayout}
horizontal
mode="duplicate"
/>
</Box>
));