mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-02 11:45:17 +02:00
Update user avatar component and settings page
This commit is contained in:
parent
f626370d3f
commit
e372ebbacc
3 changed files with 8 additions and 3 deletions
2
src/app.d.ts
vendored
2
src/app.d.ts
vendored
|
@ -3,7 +3,7 @@ declare global {
|
|||
interface Locals {
|
||||
user: import("lucia").User | null;
|
||||
session: import("lucia").Session | null;
|
||||
isServerSetup: boolean;
|
||||
isServerSetup: boolean | null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,12 @@
|
|||
<p class="text-lg ml-4 font-bold">Hi, {user.first_name} {user.last_name}</p>
|
||||
<li><a>Profile</a></li>
|
||||
<li><button on:click={navToLog}>My Log</button></li>
|
||||
<li><button on:click={navToSettings}>Settings</button></li>
|
||||
<li><button on:click={navToSettings}>User Settings</button></li>
|
||||
{#if user.role == "admin"}
|
||||
<li>
|
||||
<button on:click={() => goto("/settings/admin")}>Admin Settings</button>
|
||||
</li>
|
||||
{/if}
|
||||
<form method="post">
|
||||
<li><button formaction="/?/logout">Logout</button></li>
|
||||
</form>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<script>
|
||||
import { enhance } from "$app/forms";
|
||||
import AdventureCard from "$lib/components/AdventureCard.svelte";
|
||||
|
||||
export let data;
|
||||
let username = data.user?.username;
|
||||
|
@ -14,7 +15,6 @@
|
|||
<h1 class="text-center font-extrabold text-4xl mb-6">Settings Page</h1>
|
||||
|
||||
<h1 class="text-center font-extrabold text-xl">User Account Settings</h1>
|
||||
|
||||
<div class="flex justify-center">
|
||||
<form method="post" use:enhance class="w-full max-w-xs">
|
||||
<label for="username">Username</label>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue