Initial commit. Working login, example UI with prototype and demo, connections to DB and DAV, local and prod setups.

This commit is contained in:
2025-10-12 22:13:19 +01:00
commit 708b741a32
138 changed files with 7797 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
<script lang="ts">
import '../app.css';
import favicon from '$lib/assets/favicon.svg';
import NavBar from '$lib/components/layout/NavBar.svelte';
import { Toaster } from '$lib/components/ui/sonner/index.js';
import { authStore } from '$lib/stores/auth.svelte';
let { children } = $props();
// Verify email address
async function verify_email() {
alert('Verifying email address...');
const response = await fetch('/api/verify-email', {
method: 'POST'
});
if (response.ok) {
window.location.reload();
} else {
alert('Failed to verify email address');
}
}
</script>
<svelte:head>
<link rel="icon" href={favicon} />
</svelte:head>
<NavBar />
<Toaster position="bottom-center" />
<main class="pt-16">
{#if authStore.currentUser?.role === 'unverified_email'}
<div class="w-full bg-red-600 py-2 pl-8 pr-8 text-center text-sm font-medium text-white">
Please verify your email address to continue. Didn't recieve the email? Check your spam
folder, or <button
type="button"
onclick={verify_email}
class="cursor-pointer border-0 bg-transparent p-0 text-white underline"
>
click here
</button>
to resend it.
</div>
{/if}
{@render children?.()}
</main>