1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-08-05 05:05:17 +02:00

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

View file

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