Add loading state to setup and signup pages

This commit is contained in:
Sean Morley
2024-04-26 23:42:04 +00:00
parent 15b1395870
commit 3299855f86
2 changed files with 7 additions and 3 deletions

View File

@@ -2,6 +2,10 @@
import { enhance } from "$app/forms";
let loading = false;
function toggleLoad() {
loading = !loading;
}
</script>
<h1 class="text-center font-bold text-4xl">AdventureLog Setup</h1>
@@ -16,7 +20,7 @@
<h2 class="text-center font-bold text-2xl mt-6">Create Admin User</h2>
<div class="flex justify-center">
<form method="post" use:enhance class="w-full max-w-xs">
<form method="post" use:enhance={toggleLoad} class="w-full max-w-xs">
<label for="username">Username</label>
<input
name="username"
@@ -59,4 +63,4 @@
name="description"
content="Setup AdventureLog with your admin account"
/>
</svelte:head>;
</svelte:head>

View File

@@ -61,4 +61,4 @@
name="description"
content="Signup for AdventureLog to start logging your adventures!"
/>
</svelte:head>;
</svelte:head>