From 120187ebfd362e4966d9516bdf04ef6d5d4bd1bb Mon Sep 17 00:00:00 2001 From: Harsh Mahajan <127186841+HarshMN2345@users.noreply.github.com> Date: Tue, 23 Sep 2025 02:08:00 +0530 Subject: [PATCH 001/186] feat: implement email verification flow with route guard and modal --- .../account/sendVerificationEmailModal.svelte | 169 ++++++++++++++---- src/routes/(console)/+layout.svelte | 4 +- .../(console)/verify-email/+page.svelte | 150 ++++++++++++++++ src/routes/(console)/verify-email/+page.ts | 9 + src/routes/+layout.ts | 10 ++ 5 files changed, 309 insertions(+), 33 deletions(-) create mode 100644 src/routes/(console)/verify-email/+page.svelte create mode 100644 src/routes/(console)/verify-email/+page.ts diff --git a/src/lib/components/account/sendVerificationEmailModal.svelte b/src/lib/components/account/sendVerificationEmailModal.svelte index bbe676142..259782ed3 100644 --- a/src/lib/components/account/sendVerificationEmailModal.svelte +++ b/src/lib/components/account/sendVerificationEmailModal.svelte @@ -1,32 +1,99 @@ - - - - - To continue using Appwrite Cloud, please verify your email address. An email will be - sent to {get(user)?.email} - - - +
+ + + + + To continue using Appwrite Cloud, please verify your email address. An email + will be sent to {email || get(user)?.email} + + + + logout(false)}>Switch account + + + {#if emailSent && resendTimer > 0} + + Didn't get the email? Try again in {resendTimer}s + + {/if} + + - - - - + + + + +
+ + diff --git a/src/routes/(console)/+layout.svelte b/src/routes/(console)/+layout.svelte index a8e6e30c7..d3a77a8c4 100644 --- a/src/routes/(console)/+layout.svelte +++ b/src/routes/(console)/+layout.svelte @@ -45,7 +45,7 @@ import { headerAlert } from '$lib/stores/headerAlert'; import { UsageRates } from '$lib/components/billing'; import { canSeeProjects } from '$lib/stores/roles'; - import { BottomModalAlert, EmailVerificationBanner } from '$lib/components'; + import { BottomModalAlert } from '$lib/components'; import { IconAnnotation, IconBookOpen, @@ -346,8 +346,6 @@