Skip to content

Commit

Permalink
Touchup the login page
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc committed Feb 14, 2025
1 parent 6fa28de commit 0410bd8
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/routes/login/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
import TextInput from '$lib/components/input/TextInput.svelte';
import Turnstile from '$lib/components/Turnstile.svelte';
import { Button } from '$lib/components/ui/button';
import * as Card from '$lib/components/ui/card';
import { CardContent, CardHeader, CardTitle } from '$lib/components/ui/card';
import { handleApiError } from '$lib/errorhandling/apiErrorHandling';
import { UserStore } from '$lib/stores/UserStore';
let usernameOrEmail = $state<string>('');
let password = $state<string>('');
let turnstileResponse = $state<string | null>(null);
function handleSubmission(ev: SubmitEvent) {
function handleSubmission(e: SubmitEvent) {
e.preventDefault();
if (!usernameOrEmail || !password || !turnstileResponse) {
return;
}
Expand All @@ -33,10 +35,10 @@
</script>

<div class="container my-8">
<Card.Header>
<Card.Title class="text-3xl">Login</Card.Title>
</Card.Header>
<Card.Content>
<CardHeader>
<CardTitle class="text-3xl">Login</CardTitle>
</CardHeader>
<CardContent>
<form class="flex flex-col space-y-4" onsubmit={handleSubmission}>
<TextInput
label="Username or Email"
Expand All @@ -55,5 +57,5 @@

<Button type="submit" disabled={!canSubmit}>Log In</Button>
</form>
</Card.Content>
</CardContent>
</div>

0 comments on commit 0410bd8

Please sign in to comment.