adding check for delete app

This commit is contained in:
Martin McKeaveney 2021-11-09 18:30:51 +01:00
parent 878fe986b6
commit 8683a74b2d
2 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,7 @@
export let onOk = undefined
export let onCancel = undefined
export let warning = true
export let disabled
let modal
@ -26,6 +27,7 @@
confirmText={okText}
{cancelText}
{warning}
{disabled}
>
<Body size="S">
{body}

View File

@ -6,6 +6,7 @@
ActionButton,
ActionGroup,
ButtonGroup,
Input,
Select,
Modal,
Page,
@ -36,6 +37,7 @@
let loaded = false
let searchTerm = ""
let cloud = $admin.cloud
let appName = ""
$: enrichedApps = enrichApps($apps, $auth.user, sortBy)
$: filteredApps = enrichedApps.filter(app =>
@ -296,8 +298,12 @@
title="Confirm deletion"
okText="Delete app"
onOk={confirmDeleteApp}
disabled={appName !== selectedApp?.name}
>
Are you sure you want to delete the app <b>{selectedApp?.name}</b>?
<p>Please enter the app name below to confirm.</p>
<Input bind:value={appName} />
</ConfirmDialog>
<ConfirmDialog
bind:this={unpublishModal}