Skip to content

Commit cf3d2a8

Browse files
authored
Merge pull request #2055 from appwrite/dat-567
2 parents d217a05 + 791861a commit cf3d2a8

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/routes/(console)/project-[region]-[project]/settings/deleteProject.svelte

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { goto, invalidate } from '$app/navigation';
33
import { base } from '$app/paths';
44
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
5-
import { BoxAvatar, Confirm, CardGrid } from '$lib/components';
5+
import { BoxAvatar, CardGrid, Modal } from '$lib/components';
66
import { Button, InputText } from '$lib/elements/forms';
77
import { toLocaleDateTime } from '$lib/helpers/date';
88
import { addNotification } from '$lib/stores/notifications';
@@ -11,7 +11,6 @@
1111
import { project, projectRegion } from '../store';
1212
import { organization } from '$lib/stores/organization';
1313
import { Dependencies } from '$lib/constants';
14-
1514
let error: string;
1615
let showDelete = false;
1716
let name: string = null;
@@ -62,21 +61,22 @@
6261
</svelte:fragment>
6362
</CardGrid>
6463

65-
<Confirm
66-
disabled={name !== $project.name}
67-
onSubmit={handleDelete}
68-
title="Delete project"
69-
bind:open={showDelete}
70-
bind:error>
71-
<p>
72-
<b>This project will be deleted</b>, along with all of its metadata, stats, and other
73-
resources. <b>This action is irreversible</b>.
74-
</p>
64+
<Modal size="s" bind:show={showDelete} title="Delete project" onSubmit={handleDelete} bind:error>
65+
<svelte:fragment slot="description">
66+
This project will be deleted along with all of its metadata, stats, and other resources.
67+
<b>This action is irreversible.</b>
68+
</svelte:fragment>
69+
7570
<InputText
7671
label={`Enter "${$project.name}" to continue`}
7772
placeholder="Enter name"
7873
id="project-name"
7974
autofocus
8075
required
8176
bind:value={name} />
82-
</Confirm>
77+
78+
<svelte:fragment slot="footer">
79+
<Button text on:click={() => (showDelete = false)}>Cancel</Button>
80+
<Button submissionLoader submit disabled={name !== $project.name}>Delete</Button>
81+
</svelte:fragment>
82+
</Modal>

0 commit comments

Comments
 (0)