diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/delete.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/delete.svelte index 2f17e0848..4f565c56d 100644 --- a/src/routes/(console)/project-[project]/databases/database-[database]/delete.svelte +++ b/src/routes/(console)/project-[project]/databases/database-[database]/delete.svelte @@ -4,7 +4,7 @@ import { page } from '$app/stores'; import { Submit, trackError, trackEvent } from '$lib/actions/analytics'; import { Modal } from '$lib/components'; - import { Button, FormList, InputText, InputCheckbox } from '$lib/elements/forms'; + import { Button, FormList, InputCheckbox } from '$lib/elements/forms'; import { addNotification } from '$lib/stores/notifications'; import { sdk } from '$lib/stores/sdk'; import { database } from './store'; @@ -19,13 +19,13 @@ } from '$lib/elements/table'; import { toLocaleDate } from '$lib/helpers/date'; import { type Models, Query } from '@appwrite.io/console'; + const databaseId = $page.params.database; export let showDelete = false; let confirmedDeletion = false; let error = null; - let databaseName: string = null; let isLoadingDocumentsCount = false; /* enable overflow-x */ @@ -96,7 +96,6 @@ /* reset data on modal close */ $: if (!showDelete) { collections = null; - databaseName = null; collectionItems = []; } @@ -114,16 +113,15 @@
Are you sure you want to delete {$database.name}?
{:else if collectionItems.length > 0}- The following collections and all data associated with {$database.name} - will be permanently deleted. This includes backups. - This action is irreversible. + The following collections and all data associated with {$database.name}, + will be permanently deleted.
Are you sure you want to delete {$database.name}? @@ -183,17 +172,29 @@ {/if} {/await} + {#if !isLoadingDocumentsCount} +
+ + Once deleted, this database and its backups cannot be restored. This action is + irreversible. + +
+ +