init commit
This commit is contained in:
commit
c9d982669a
461 changed files with 30317 additions and 0 deletions
56
resources/js/pages/auth/ConfirmPassword.svelte
Normal file
56
resources/js/pages/auth/ConfirmPassword.svelte
Normal file
|
@ -0,0 +1,56 @@
|
|||
<script lang="ts">
|
||||
import InputError from '@/components/InputError.svelte';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import AuthLayout from '@/layouts/AuthLayout.svelte';
|
||||
import { useForm } from '@inertiajs/svelte';
|
||||
import { LoaderCircle } from 'lucide-svelte';
|
||||
|
||||
const form = useForm({
|
||||
password: '',
|
||||
});
|
||||
|
||||
const submit = (e: Event) => {
|
||||
e.preventDefault();
|
||||
$form.post(route('password.confirm'), {
|
||||
onFinish: () => {
|
||||
$form.reset();
|
||||
},
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Confirm Password</title>
|
||||
</svelte:head>
|
||||
|
||||
<AuthLayout title="Confirm your password" description="This is a secure area of the application. Please confirm your password before continuing.">
|
||||
<form onsubmit={submit}>
|
||||
<div class="space-y-6">
|
||||
<div class="grid gap-2">
|
||||
<Label for="password">Password</Label>
|
||||
<Input
|
||||
id="password"
|
||||
type="password"
|
||||
class="mt-1 block w-full"
|
||||
bind:value={$form.password}
|
||||
required
|
||||
autocomplete="current-password"
|
||||
autofocus
|
||||
/>
|
||||
|
||||
<InputError message={$form.errors.password} />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center">
|
||||
<Button type="submit" class="w-full" disabled={$form.processing}>
|
||||
{#if $form.processing}
|
||||
<LoaderCircle class="h-4 w-4 animate-spin" />
|
||||
{/if}
|
||||
Confirm Password
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</AuthLayout>
|
61
resources/js/pages/auth/ForgotPassword.svelte
Normal file
61
resources/js/pages/auth/ForgotPassword.svelte
Normal file
|
@ -0,0 +1,61 @@
|
|||
<script lang="ts">
|
||||
import InputError from '@/components/InputError.svelte';
|
||||
import TextLink from '@/components/TextLink.svelte';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import AuthLayout from '@/layouts/AuthLayout.svelte';
|
||||
import { useForm } from '@inertiajs/svelte';
|
||||
import { LoaderCircle } from 'lucide-svelte';
|
||||
|
||||
interface Props {
|
||||
status?: string;
|
||||
}
|
||||
|
||||
const form = useForm({
|
||||
email: '',
|
||||
});
|
||||
|
||||
const submit = (e: Event) => {
|
||||
e.preventDefault();
|
||||
$form.post(route('password.email'));
|
||||
};
|
||||
|
||||
let { status }: Props = $props();
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Forgot Password</title>
|
||||
</svelte:head>
|
||||
|
||||
<AuthLayout title="Forgot password" description="Enter your email to receive a password reset link">
|
||||
{#if status}
|
||||
<div class="mb-4 text-center text-sm font-medium text-green-600">
|
||||
{status}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="space-y-6">
|
||||
<form onsubmit={submit}>
|
||||
<div class="grid gap-2">
|
||||
<Label for="email">Email address</Label>
|
||||
<Input id="email" type="email" name="email" autocomplete="off" bind:value={$form.email} autofocus placeholder="email@example.com" />
|
||||
<InputError message={$form.errors.email} />
|
||||
</div>
|
||||
|
||||
<div class="my-6 flex items-center justify-start">
|
||||
<Button type="submit" class="w-full" disabled={$form.processing}>
|
||||
{#if $form.processing}
|
||||
<LoaderCircle class="h-4 w-4 animate-spin" />
|
||||
{/if}
|
||||
Email password reset link
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="space-x-1 text-center text-sm text-muted-foreground">
|
||||
<span>Or, return to</span>
|
||||
<TextLink href={route('login')}>log in</TextLink>
|
||||
</div>
|
||||
</div>
|
||||
</AuthLayout>
|
100
resources/js/pages/auth/Login.svelte
Normal file
100
resources/js/pages/auth/Login.svelte
Normal file
|
@ -0,0 +1,100 @@
|
|||
<script lang="ts">
|
||||
import InputError from '@/components/InputError.svelte';
|
||||
import TextLink from '@/components/TextLink.svelte';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import AuthBase from '@/layouts/AuthLayout.svelte';
|
||||
import { useForm } from '@inertiajs/svelte';
|
||||
import { LoaderCircle } from 'lucide-svelte';
|
||||
|
||||
interface Props {
|
||||
status?: string;
|
||||
canResetPassword: boolean;
|
||||
}
|
||||
|
||||
const form = useForm({
|
||||
email: '',
|
||||
password: '',
|
||||
remember: false,
|
||||
});
|
||||
|
||||
let { status, canResetPassword }: Props = $props();
|
||||
|
||||
const submit = (e: Event) => {
|
||||
e.preventDefault();
|
||||
$form.post(route('login'), {
|
||||
onFinish: () => $form.reset('password'),
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Login</title>
|
||||
</svelte:head>
|
||||
|
||||
<AuthBase title="Log in to your account" description="Enter your email and password below to log in">
|
||||
{#if status}
|
||||
<div class="mb-4 text-center text-sm font-medium text-green-600">
|
||||
{status}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<form onsubmit={submit} class="flex flex-col gap-6">
|
||||
<div class="grid gap-6">
|
||||
<div class="grid gap-2">
|
||||
<Label for="email">Email address</Label>
|
||||
<Input
|
||||
id="email"
|
||||
type="email"
|
||||
required
|
||||
autofocus
|
||||
tabindex={1}
|
||||
autocomplete="email"
|
||||
bind:value={$form.email}
|
||||
placeholder="email@example.com"
|
||||
/>
|
||||
<InputError message={$form.errors.email} />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-2">
|
||||
<div class="flex items-center justify-between">
|
||||
<Label for="password">Password</Label>
|
||||
{#if canResetPassword}
|
||||
<TextLink href={route('password.request')} class="text-sm" tabindex={5}>Forgot password?</TextLink>
|
||||
{/if}
|
||||
</div>
|
||||
<Input
|
||||
id="password"
|
||||
type="password"
|
||||
required
|
||||
tabindex={2}
|
||||
autocomplete="current-password"
|
||||
bind:value={$form.password}
|
||||
placeholder="Password"
|
||||
/>
|
||||
<InputError message={$form.errors.password} />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between">
|
||||
<Label for="remember" class="flex items-center space-x-3">
|
||||
<Checkbox id="remember" bind:checked={$form.remember} tabindex={3} />
|
||||
<span>Remember me</span>
|
||||
</Label>
|
||||
</div>
|
||||
|
||||
<Button type="submit" class="mt-4 w-full" tabindex={4} disabled={$form.processing}>
|
||||
{#if $form.processing}
|
||||
<LoaderCircle class="h-4 w-4 animate-spin" />
|
||||
{/if}
|
||||
Log in
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div class="text-center text-sm text-muted-foreground">
|
||||
Don't have an account?
|
||||
<TextLink href={route('register')} tabindex={5}>Sign up</TextLink>
|
||||
</div>
|
||||
</form>
|
||||
</AuthBase>
|
86
resources/js/pages/auth/Register.svelte
Normal file
86
resources/js/pages/auth/Register.svelte
Normal file
|
@ -0,0 +1,86 @@
|
|||
<script lang="ts">
|
||||
import InputError from '@/components/InputError.svelte';
|
||||
import TextLink from '@/components/TextLink.svelte';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import AuthBase from '@/layouts/AuthLayout.svelte';
|
||||
import { useForm } from '@inertiajs/svelte';
|
||||
import { LoaderCircle } from 'lucide-svelte';
|
||||
|
||||
const form = useForm({
|
||||
name: '',
|
||||
email: '',
|
||||
password: '',
|
||||
password_confirmation: '',
|
||||
});
|
||||
|
||||
const submit = (e: Event) => {
|
||||
e.preventDefault();
|
||||
$form.post(route('register'), {
|
||||
onFinish: () => $form.reset('password', 'password_confirmation'),
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Register</title>
|
||||
</svelte:head>
|
||||
|
||||
<AuthBase title="Create an account" description="Enter your details below to create your account">
|
||||
<form onsubmit={submit} class="flex flex-col gap-6">
|
||||
<div class="grid gap-6">
|
||||
<div class="grid gap-2">
|
||||
<Label for="name">Name</Label>
|
||||
<Input id="name" type="text" required autofocus tabindex={1} autocomplete="name" bind:value={$form.name} placeholder="Full name" />
|
||||
<InputError message={$form.errors.name} />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-2">
|
||||
<Label for="email">Email address</Label>
|
||||
<Input id="email" type="email" required tabindex={2} autocomplete="email" bind:value={$form.email} placeholder="email@example.com" />
|
||||
<InputError message={$form.errors.email} />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-2">
|
||||
<Label for="password">Password</Label>
|
||||
<Input
|
||||
id="password"
|
||||
type="password"
|
||||
required
|
||||
tabindex={3}
|
||||
autocomplete="new-password"
|
||||
bind:value={$form.password}
|
||||
placeholder="Password"
|
||||
/>
|
||||
<InputError message={$form.errors.password} />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-2">
|
||||
<Label for="password_confirmation">Confirm password</Label>
|
||||
<Input
|
||||
id="password_confirmation"
|
||||
type="password"
|
||||
required
|
||||
tabindex={4}
|
||||
autocomplete="new-password"
|
||||
bind:value={$form.password_confirmation}
|
||||
placeholder="Confirm password"
|
||||
/>
|
||||
<InputError message={$form.errors.password_confirmation} />
|
||||
</div>
|
||||
|
||||
<Button type="submit" class="mt-2 w-full" tabindex={5} disabled={$form.processing}>
|
||||
{#if $form.processing}
|
||||
<LoaderCircle class="h-4 w-4 animate-spin" />
|
||||
{/if}
|
||||
Create account
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div class="text-center text-sm text-muted-foreground">
|
||||
Already have an account?
|
||||
<TextLink href={route('login')} class="underline underline-offset-4" tabindex={6}>Log in</TextLink>
|
||||
</div>
|
||||
</form>
|
||||
</AuthBase>
|
84
resources/js/pages/auth/ResetPassword.svelte
Normal file
84
resources/js/pages/auth/ResetPassword.svelte
Normal file
|
@ -0,0 +1,84 @@
|
|||
<script lang="ts">
|
||||
import InputError from '@/components/InputError.svelte';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import AuthLayout from '@/layouts/AuthLayout.svelte';
|
||||
import { useForm } from '@inertiajs/svelte';
|
||||
import { LoaderCircle } from 'lucide-svelte';
|
||||
|
||||
interface Props {
|
||||
token: string;
|
||||
email: string;
|
||||
}
|
||||
|
||||
let { token, email }: Props = $props();
|
||||
|
||||
const form = useForm({
|
||||
token: token,
|
||||
email: email,
|
||||
password: '',
|
||||
password_confirmation: '',
|
||||
});
|
||||
|
||||
const submit = (e: Event) => {
|
||||
e.preventDefault();
|
||||
$form.post(route('password.store'), {
|
||||
onFinish: () => {
|
||||
$form.reset('password', 'password_confirmation');
|
||||
},
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Reset Password</title>
|
||||
</svelte:head>
|
||||
|
||||
<AuthLayout title="Reset password" description="Please enter your new password below">
|
||||
<form onsubmit={submit}>
|
||||
<div class="grid gap-6">
|
||||
<div class="grid gap-2">
|
||||
<Label for="email">Email</Label>
|
||||
<Input id="email" type="email" name="email" autocomplete="email" bind:value={$form.email} class="mt-1 block w-full" readonly />
|
||||
<InputError message={$form.errors.email} class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-2">
|
||||
<Label for="password">Password</Label>
|
||||
<Input
|
||||
id="password"
|
||||
type="password"
|
||||
name="password"
|
||||
autocomplete="new-password"
|
||||
bind:value={$form.password}
|
||||
class="mt-1 block w-full"
|
||||
autofocus
|
||||
placeholder="Password"
|
||||
/>
|
||||
<InputError message={$form.errors.password} />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-2">
|
||||
<Label for="password_confirmation">Confirm Password</Label>
|
||||
<Input
|
||||
id="password_confirmation"
|
||||
type="password"
|
||||
name="password_confirmation"
|
||||
autocomplete="new-password"
|
||||
bind:value={$form.password_confirmation}
|
||||
class="mt-1 block w-full"
|
||||
placeholder="Confirm password"
|
||||
/>
|
||||
<InputError message={$form.errors.password_confirmation} />
|
||||
</div>
|
||||
|
||||
<Button type="submit" class="mt-4 w-full" disabled={$form.processing}>
|
||||
{#if $form.processing}
|
||||
<LoaderCircle class="h-4 w-4 animate-spin" />
|
||||
{/if}
|
||||
Reset password
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
</AuthLayout>
|
42
resources/js/pages/auth/VerifyEmail.svelte
Normal file
42
resources/js/pages/auth/VerifyEmail.svelte
Normal file
|
@ -0,0 +1,42 @@
|
|||
<script lang="ts">
|
||||
import TextLink from '@/components/TextLink.svelte';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import AuthLayout from '@/layouts/AuthLayout.svelte';
|
||||
import { useForm } from '@inertiajs/svelte';
|
||||
import { LoaderCircle } from 'lucide-svelte';
|
||||
|
||||
interface Props {
|
||||
status?: string;
|
||||
}
|
||||
let { status }: Props = $props();
|
||||
|
||||
const form = useForm({});
|
||||
|
||||
const submit = (e: Event) => {
|
||||
e.preventDefault();
|
||||
$form.post(route('verification.send'));
|
||||
};
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Verify Email</title>
|
||||
</svelte:head>
|
||||
|
||||
<AuthLayout title="Verify email" description="Please verify your email address by clicking on the link we just emailed to you.">
|
||||
{#if status === 'verification-link-sent'}
|
||||
<div class="mb-4 text-center text-sm font-medium text-green-600">
|
||||
A new verification link has been sent to the email address you provided during registration.
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<form onsubmit={submit} class="space-y-6 text-center">
|
||||
<Button type="submit" disabled={$form.processing} variant="secondary">
|
||||
{#if $form.processing}
|
||||
<LoaderCircle class="h-4 w-4 animate-spin" />
|
||||
{/if}
|
||||
Resend verification email
|
||||
</Button>
|
||||
|
||||
<TextLink href={route('logout')} method="post" as="button" class="mx-auto block text-sm">Log out</TextLink>
|
||||
</form>
|
||||
</AuthLayout>
|
Loading…
Add table
Add a link
Reference in a new issue