Clear progress on delete

This commit is contained in:
ZXY101
2023-10-03 12:55:20 +02:00
parent 316b99c20f
commit f09d48f702
3 changed files with 24 additions and 2 deletions

View File

@@ -3,9 +3,15 @@
import { db } from '$lib/catalog/db';
import { promptConfirmation } from '$lib/util';
import { goto } from '$app/navigation';
import { clearVolumes } from '$lib/settings';
function onConfirm() {
clearVolumes();
db.catalog.clear();
}
function onClear() {
promptConfirmation('Are you sure you want to clear your catalog?', () => db.catalog.clear());
promptConfirmation('Are you sure you want to clear your catalog?', onConfirm);
goto('/');
}
</script>