Major UI revamp, follow standard scheme
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
import { goto } from '$app/navigation';
|
||||
import { page } from '$app/state';
|
||||
import { Button } from '$lib/components/ui/button/index.js';
|
||||
import * as Card from '$lib/components/ui/card/index.js';
|
||||
import { Input } from '$lib/components/ui/input/index.js';
|
||||
import { Label } from '$lib/components/ui/label/index.js';
|
||||
|
||||
@@ -40,33 +39,26 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<Card.Root class="w-[350px]">
|
||||
<form on:submit={login}>
|
||||
<Card.Header>
|
||||
<Card.Title>Login to Account</Card.Title>
|
||||
<Card.Description>Please enter your credentials below to login.</Card.Description>
|
||||
<Card.Description>You will be redirected to .</Card.Description>
|
||||
</Card.Header>
|
||||
<Card.Content>
|
||||
<!-- Display success or error message -->
|
||||
{#if successMessage}
|
||||
<p class="text-green-500 mb-4">{successMessage}</p>
|
||||
{:else if errorMessage}
|
||||
<p class="text-red-500 mb-4">{errorMessage}</p>
|
||||
{/if}
|
||||
<Label for="email">Email:</Label>
|
||||
<Input id="email" type="email" bind:value={email} required />
|
||||
<form class=" gap-4 flex flex-col h-full" on:submit|preventDefault={login}>
|
||||
<div class="mb-4">
|
||||
<h1 class="text-2xl font-bold">Welcome back</h1>
|
||||
<h3 class="text-sm">Please login to your account to access the application</h3>
|
||||
</div>
|
||||
<!-- Display success or error message -->
|
||||
{#if successMessage}
|
||||
<p class="text-green-500 mb-4">{successMessage}</p>
|
||||
{:else if errorMessage}
|
||||
<p class="text-red-500 mb-4">{errorMessage}</p>
|
||||
{/if}
|
||||
<Label for="email">Email:</Label>
|
||||
<Input id="email" type="email" bind:value={email} required />
|
||||
|
||||
<Label for="password">Password:</Label>
|
||||
<Input id="password" type="password" bind:value={password} required />
|
||||
<Label for="password">Password:</Label>
|
||||
<Input id="password" type="password" bind:value={password} required />
|
||||
|
||||
<!-- Submit button within the form -->
|
||||
</Card.Content>
|
||||
<Card.Footer class="flex justify-between">
|
||||
<Button variant="outline" on:click={() => goto(`/register?redirect=${redirectUrl}`)}
|
||||
>Register</Button
|
||||
>
|
||||
<Button type="submit">Login</Button>
|
||||
</Card.Footer>
|
||||
</form>
|
||||
</Card.Root>
|
||||
<!-- Submit button within the form -->
|
||||
<Button class="mt-auto" type="submit">Login</Button>
|
||||
<Button variant="outline" on:click={() => goto(`/register?redirect=${redirectUrl}`)}
|
||||
>Register</Button
|
||||
>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user