diff --git a/frontend/src/lib/components/CollectionCard.svelte b/frontend/src/lib/components/CollectionCard.svelte index 18dd58f..ee221ed 100644 --- a/frontend/src/lib/components/CollectionCard.svelte +++ b/frontend/src/lib/components/CollectionCard.svelte @@ -14,6 +14,7 @@ import Plus from '~icons/mdi/plus'; import { json } from '@sveltejs/kit'; + import DeleteWarning from './DeleteWarning.svelte'; const dispatch = createEventDispatcher(); @@ -60,8 +61,21 @@ console.log('Error deleting adventure'); } } + + let isWarningModalOpen: boolean = false; +{#if isWarningModalOpen} + (isWarningModalOpen = false)} + on:confirm={deleteCollection} + /> +{/if} +
@@ -90,7 +104,7 @@
{#if type != 'link'} - {#if !collection.is_archived} diff --git a/frontend/src/lib/components/DeleteWarning.svelte b/frontend/src/lib/components/DeleteWarning.svelte new file mode 100644 index 0000000..e6623d3 --- /dev/null +++ b/frontend/src/lib/components/DeleteWarning.svelte @@ -0,0 +1,44 @@ + + + + + + +