From af5b0905cfa9300ced9d29c1e8b133b5b33e24ef Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 9 Nov 2021 18:30:51 +0100 Subject: [PATCH] adding check for delete app --- packages/builder/src/components/common/ConfirmDialog.svelte | 2 ++ packages/builder/src/pages/builder/portal/apps/index.svelte | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/packages/builder/src/components/common/ConfirmDialog.svelte b/packages/builder/src/components/common/ConfirmDialog.svelte index cf2bf989b9..ece20fe102 100644 --- a/packages/builder/src/components/common/ConfirmDialog.svelte +++ b/packages/builder/src/components/common/ConfirmDialog.svelte @@ -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} diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index 2c8cbb1097..d465f7b978 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -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 {selectedApp?.name}? + +

Please enter the app name below to confirm.

+