From 25508a98c47b29a8d7b57d30b3398a614294f84c Mon Sep 17 00:00:00 2001 From: Arman Date: Thu, 23 May 2024 14:54:51 +0200 Subject: [PATCH] feat: add confimation exit modal to new flows --- src/lib/layout/wizardExitModal.svelte | 7 +++- src/lib/layout/wizardSecondaryHeader.svelte | 34 ++++++++++++++++++- .../console/create-organization/+page.svelte | 4 ++- .../change-plan/+page.svelte | 2 +- 4 files changed, 43 insertions(+), 4 deletions(-) diff --git a/src/lib/layout/wizardExitModal.svelte b/src/lib/layout/wizardExitModal.svelte index c73d2cd2e..b9fd150a2 100644 --- a/src/lib/layout/wizardExitModal.svelte +++ b/src/lib/layout/wizardExitModal.svelte @@ -4,6 +4,7 @@ import { createEventDispatcher } from 'svelte'; export let show = false; + export let href: string = null; const dispatch = createEventDispatcher(); function handleSubmit() { @@ -25,6 +26,10 @@

- + {#if href} + + {:else} + + {/if} diff --git a/src/lib/layout/wizardSecondaryHeader.svelte b/src/lib/layout/wizardSecondaryHeader.svelte index 91a5bda0e..00ee7cb3b 100644 --- a/src/lib/layout/wizardSecondaryHeader.svelte +++ b/src/lib/layout/wizardSecondaryHeader.svelte @@ -1,13 +1,32 @@
-
@@ -15,3 +34,16 @@

{/if}
+ +{#if show} + { + trackEvent('wizard_exit', { + from: 'prompt' + }); + }}> + this process + +{/if} diff --git a/src/routes/console/create-organization/+page.svelte b/src/routes/console/create-organization/+page.svelte index 58959c166..900d213f1 100644 --- a/src/routes/console/create-organization/+page.svelte +++ b/src/routes/console/create-organization/+page.svelte @@ -186,7 +186,9 @@ - Create organization + + Create organization +
diff --git a/src/routes/console/organization-[organization]/change-plan/+page.svelte b/src/routes/console/organization-[organization]/change-plan/+page.svelte index 0986933be..046b57013 100644 --- a/src/routes/console/organization-[organization]/change-plan/+page.svelte +++ b/src/routes/console/organization-[organization]/change-plan/+page.svelte @@ -253,7 +253,7 @@ - Change plan + Change plan