display different success page when not requiring email verification

This commit is contained in:
Markus Brueckner 2024-12-26 23:56:41 +01:00
parent 27bb067779
commit 978929eb13
2 changed files with 18 additions and 2 deletions

View file

@ -0,0 +1,8 @@
import { config } from "$lib/configuration"
import type { PageServerLoad } from "../$types"
export const load: PageServerLoad = () => {
return {
showEmailNotice: !config.emailVerificationDisabled
}
}

View file

@ -1,9 +1,17 @@
<script> <script>
import Link from '$lib/components/Link.svelte';
import Navbar from '$lib/components/Navbar.svelte'; import Navbar from '$lib/components/Navbar.svelte';
const { data } = $props();
</script> </script>
<Navbar title="Registration successful" /> <Navbar title="Registration successful" />
<p class="mx-10"> <p class="mx-10">
Your account has been registered successfully. An email has been sent to your email address to Your account has been registered successfully.
activate the account. Please follow the instructions in the email to be able to log in. {#if data.showEmailNotice}
An email has been sent to your email address to activate the account. Please follow the
instructions in the email to be able to log in.
{:else}
Click <Link href="/login">here</Link> to log in.
{/if}
</p> </p>