Add option to delete downloaded chapters on migration (#655)

This commit is contained in:
schroda
2024-03-16 13:45:54 +01:00
committed by GitHub
parent 31d53ed182
commit 318c4a5040
7 changed files with 29 additions and 7 deletions

View File

@@ -30,6 +30,7 @@ export const MigrateDialog = ({ mangaIdToMigrateTo, onClose }: { mangaIdToMigrat
const [includeChapters, setIncludeChapters] = useState(true);
const [includeCategories, setIncludeCategories] = useState(true);
const [deleteChapters, setDeleteChapters] = useState(true);
const [isMigrationInProcess, setIsMigrationInProcess] = useState(false);
@@ -47,6 +48,7 @@ export const MigrateDialog = ({ mangaIdToMigrateTo, onClose }: { mangaIdToMigrat
mode,
migrateChapters: includeChapters,
migrateCategories: includeCategories,
deleteChapters,
});
navigate(`/manga/${mangaIdToMigrateTo}`, { replace: true });
@@ -72,6 +74,12 @@ export const MigrateDialog = ({ mangaIdToMigrateTo, onClose }: { mangaIdToMigrat
checked={includeCategories}
onChange={(_, checked) => setIncludeCategories(checked)}
/>
<CheckboxInput
disabled={isMigrationInProcess}
label={t('migrate.dialog.label.delete_downloaded')}
checked={deleteChapters}
onChange={(_, checked) => setDeleteChapters(checked)}
/>
</FormGroup>
</DialogContent>
<DialogActions>