more boilerplate and dev environment
This commit is contained in:
@@ -1,2 +1,25 @@
|
||||
<h1>Welcome to SvelteKit</h1>
|
||||
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
|
||||
<script>
|
||||
import { goto } from '$app/navigation';
|
||||
import { auth } from '$lib/stores/auth.js';
|
||||
|
||||
let userId = $state('');
|
||||
|
||||
function enterApp() {
|
||||
if (userId.trim()) {
|
||||
auth.login(userId.trim());
|
||||
goto('/dashboard');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<h1>OwOrganizer</h1>
|
||||
|
||||
<p>Enter your user ID to open the app.</p>
|
||||
|
||||
<form onsubmit={(e) => { e.preventDefault(); enterApp(); }}>
|
||||
<label>
|
||||
User ID
|
||||
<input type="text" bind:value={userId} placeholder="e.g., alice" />
|
||||
</label>
|
||||
<button type="submit">Open App</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user