Initial commit

This commit is contained in:
2026-01-12 08:17:17 -07:00
commit de5b6feef4
104 changed files with 12925 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
<script lang="ts">
import Header from '$lib/components/Header.svelte';
import Sidebar from '$lib/components/Sidebar.svelte';
import Toast from '$lib/components/Toast.svelte';
import { toast } from '$lib/stores/toast.js';
import { onMount } from 'svelte';
import { auth } from '$lib/stores/auth.js';
import '../app.css';
let sidebarOpen = false;
onMount(() => {
auth.init();
});
function toggleSidebar() {
sidebarOpen = !sidebarOpen;
}
</script>
<div class="min-h-screen bg-gray-50">
{#if $auth.isAuthenticated}
<!-- Internal Layout with Sidebar -->
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<Sidebar bind:open={sidebarOpen} />
<!-- Main content -->
<div class="flex-1 flex flex-col overflow-hidden">
<Header {toggleSidebar} />
<main class="flex-1 overflow-auto">
<slot />
</main>
</div>
</div>
{:else}
<!-- Login Layout -->
<main class="flex-1">
<slot />
</main>
{/if}
<!-- Toast notifications -->
{#each $toast.toasts as toastMessage (toastMessage.id)}
<Toast
type={toastMessage.type}
message={toastMessage.message}
duration={toastMessage.duration}
on:dismiss={() => toast.dismiss(toastMessage.id)}
/>
{/each}
</div>