Show "ContinueReadButton" on in library
This commit is contained in:
@@ -29,6 +29,7 @@ const getMangaLinkTo = (
|
|||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 'default':
|
case 'default':
|
||||||
case 'source':
|
case 'source':
|
||||||
|
case 'duplicate':
|
||||||
return `/manga/${mangaId}/`;
|
return `/manga/${mangaId}/`;
|
||||||
case 'migrate.search':
|
case 'migrate.search':
|
||||||
return `/migrate/source/${sourceId}/manga/${mangaId}/search?query=${mangaTitle}`;
|
return `/migrate/source/${sourceId}/manga/${mangaId}/search?query=${mangaTitle}`;
|
||||||
@@ -106,7 +107,7 @@ export const MangaCard = (props: MangaCardProps) => {
|
|||||||
const continueReadingButton = useMemo(
|
const continueReadingButton = useMemo(
|
||||||
() => (
|
() => (
|
||||||
<ContinueReadingButton
|
<ContinueReadingButton
|
||||||
showContinueReadingButton={showContinueReadingButton}
|
showContinueReadingButton={showContinueReadingButton && mode === 'default'}
|
||||||
isLatestChapterRead={isLatestChapterRead}
|
isLatestChapterRead={isLatestChapterRead}
|
||||||
nextChapterIndexToRead={nextChapterIndexToRead}
|
nextChapterIndexToRead={nextChapterIndexToRead}
|
||||||
mangaLinkTo={mangaLinkTo}
|
mangaLinkTo={mangaLinkTo}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { GridLayout } from '@/components/context/LibraryOptionsContext.tsx';
|
|||||||
import { SelectableCollectionReturnType } from '@/components/collection/useSelectableCollection.ts';
|
import { SelectableCollectionReturnType } from '@/components/collection/useSelectableCollection.ts';
|
||||||
import { useManageMangaLibraryState } from '@/components/manga/useManageMangaLibraryState.tsx';
|
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 {
|
export interface MangaCardProps {
|
||||||
manga: TPartialManga;
|
manga: TPartialManga;
|
||||||
|
|||||||
@@ -171,7 +171,12 @@ export const LibraryDuplicates = () => {
|
|||||||
)}
|
)}
|
||||||
itemContent={(index) => (
|
itemContent={(index) => (
|
||||||
<Box key={duplicatedMangas[index].id} sx={{ px: 1, pb: 1 }}>
|
<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>
|
</Box>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
@@ -190,6 +195,7 @@ export const LibraryDuplicates = () => {
|
|||||||
isLoading={false}
|
isLoading={false}
|
||||||
gridLayout={gridLayout}
|
gridLayout={gridLayout}
|
||||||
horizontal
|
horizontal
|
||||||
|
mode="duplicate"
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
));
|
));
|
||||||
|
|||||||
Reference in New Issue
Block a user