feat: add user admin status and profile management
- Updated user schema to include isAdmin field. - Enhanced authentication hooks to fetch and set user admin status. - Created ProfileButton component for user profile actions. - Implemented profile and password update functionality. - Added session management for user accounts. - Developed login and signup pages with form handling. - Introduced layout server for user session data. - Updated daily page to reflect character changes.
This commit is contained in:
@@ -1,9 +1,23 @@
|
||||
<script lang="ts">
|
||||
import './layout.css';
|
||||
import favicon from '$lib/assets/favicon.svg';
|
||||
import ProfileButton from '$lib/components/ProfileButton.svelte';
|
||||
|
||||
let { children } = $props();
|
||||
let { children, data } = $props();
|
||||
</script>
|
||||
|
||||
<svelte:head><link rel="icon" href={favicon} /></svelte:head>
|
||||
{@render children()}
|
||||
|
||||
<div class="min-h-screen bg-slate-950">
|
||||
<header class="fixed top-0 right-0 left-0 z-50 border-b border-white/5 bg-slate-950/95 backdrop-blur">
|
||||
<div class="mx-auto flex max-w-7xl items-center justify-between px-6 py-4">
|
||||
<a href="/" class="text-lg font-black uppercase tracking-[0.15em] text-amber-50 transition hover:text-amber-100">
|
||||
OnePieceDle
|
||||
</a>
|
||||
<ProfileButton user={data.user} />
|
||||
</div>
|
||||
</header>
|
||||
<main class="pt-20">
|
||||
{@render children()}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user