From 0cb7d34bcffcaf749f597b4e97bc25c7b7c94cf8 Mon Sep 17 00:00:00 2001 From: Mason Payne Date: Wed, 10 Apr 2024 23:20:48 -0600 Subject: [PATCH] finish the wizard UI --- src/assets/main.css | 7 +- src/components/enter-details-modal.vue | 19 +- src/components/wizard-questions.vue | 293 ++++++++++++++++--------- src/views/WizardView.vue | 5 +- 4 files changed, 204 insertions(+), 120 deletions(-) diff --git a/src/assets/main.css b/src/assets/main.css index 6119f28..3a74009 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -6,9 +6,10 @@ /*padding: 2rem;*/ /*font-weight: normal;*/ height: 100vh; - display: flex; - flex-direction: column; - justify-content: center; + width: 100vw; + /*display: flex;*/ + /*flex-direction: column;*/ + /*justify-content: center;*/ padding: 1rem; } diff --git a/src/components/enter-details-modal.vue b/src/components/enter-details-modal.vue index 749c16f..4d3aa7c 100644 --- a/src/components/enter-details-modal.vue +++ b/src/components/enter-details-modal.vue @@ -16,6 +16,7 @@ const lastName = ref(''); const email = ref(''); const newsletterConsent = ref(true); const isOpen = ref(true); +const formSubmitted = ref(false); function submitForm() { console.log('Form submitted'); console.log('First name:', firstName.value); @@ -32,6 +33,7 @@ function submitForm() { }).catch((e) => { console.error('Error submitting email:', e); }).finally(() => { + formSubmitted.value = true; closeModal(); }); } @@ -57,6 +59,9 @@ async function submitEmail() { }); } function closeModal() { + if (!formSubmitted.value) { + return; + } isOpen.value = false } function openModal() { @@ -66,13 +71,13 @@ function openModal() {