From 66056cbf0bc119f1b3001b9d9f6534b60878feb1 Mon Sep 17 00:00:00 2001 From: Badri Sunderarajan Date: Fri, 28 May 2021 21:37:22 +0530 Subject: [PATCH] Add "Hit send" button The button doesn't actually do anything yet, but hopefully it will, very soon! --- src/App.svelte | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 4660976..8725c29 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -191,6 +191,10 @@ function next() { step += 1 } + + function prev() { + step -= 1 + }
@@ -198,8 +202,8 @@

Chip Choc

Cookie-cutter emails made easy.

- {#if step != 0} -

Step {step}

+ {#if step >= 1} +

Step 1

{/if} {#if step == 0} @@ -224,6 +228,7 @@ {/if} {#if step >= 2} +

Step 1

Now, fill in the fields for each user. (You can also copy-paste rows and columns directly from Air, if the ordering is right!)

@@ -239,11 +244,39 @@
- {#if step == 2 && !!cookiePreviewText} + {#if step >= 2 && !!cookiePreviewData}

Preview

- + + + +

Step 3

+ + {#if step == 2} +
+

If everything looks okay, then we're done! Click on the button below to put the cutter in action.

+
+ + {/if} + + {#if step == 3} +
+

Are you sure you want to send them out?

+

Are you ready?

+

Did you look through all the previews?

+

Have you double-checked the names and email IDs to make sure they match?

+
+ + {/if} + {/if}