fixes as suggested by coderabbit

This commit is contained in:
Harsh Mahajan
2025-09-22 17:12:47 +05:30
parent 90190301e4
commit ed7273684d
3 changed files with 13 additions and 8 deletions
@@ -108,8 +108,8 @@
}
}
function onSubmit() {
// This is required by the Modal component but we handle clicks directly
async function onSubmit() {
await sendVerificationEmail();
}
async function updateEmailVerification() {
@@ -159,7 +159,7 @@
dismissible={false}
autoClose={false}>
<Card.Base variant="secondary" padding="s">
<Layout.Stack gap="s">
<Layout.Stack gap="xxs">
<Typography.Text gap="m">
To continue using Appwrite Cloud, please verify your email address. An email
will be sent to <Typography.Text
@@ -167,8 +167,11 @@
color="neutral-secondary"
style="display: inline;">{get(user)?.email}</Typography.Text>
</Typography.Text>
<Layout.Stack direction="row" gap="xxs">
<Link variant="default" on:click={() => logout(false)}>Switch account</Link>
<Layout.Stack class="u-margin-block-start-4 u-margin-block-end-24">
<Layout.Stack direction="row">
<Link variant="default" on:click={() => logout(false)}
>Switch account</Link>
</Layout.Stack>
</Layout.Stack>
{#if emailSent && resendTimer > 0}
<Typography.Text color="neutral-secondary">
@@ -179,7 +182,7 @@
</Card.Base>
<svelte:fragment slot="footer">
<Button on:click={sendVerificationEmail} disabled={creating || resendTimer > 0}>
<Button submit disabled={creating || resendTimer > 0}>
{emailSent ? 'Resend email' : 'Send email'}
</Button>
</svelte:fragment>
+3 -1
View File
@@ -367,4 +367,6 @@
{/if}
<BottomModalAlert />
<SendVerificationEmailModal />
{#if !page.url.pathname.includes('/console/verify-email')}
<SendVerificationEmailModal />
{/if}
@@ -116,7 +116,7 @@
}
const interval = setInterval(async () => {
await invalidate('user');
await invalidate(Dependencies.ACCOUNT);
checkEmailVerification();
}, 2000);