54 lines
1.7 KiB
PHP
54 lines
1.7 KiB
PHP
<x-filament-panels::page.simple>
|
|
|
|
@if (! $otpSent)
|
|
<form wire:submit="requestOtp">
|
|
<div class="grid gap-y-4">
|
|
<x-filament::input.wrapper>
|
|
<x-filament::input
|
|
type="email"
|
|
wire:model="email"
|
|
placeholder="Email address"
|
|
autofocus
|
|
required
|
|
/>
|
|
</x-filament::input.wrapper>
|
|
|
|
@error('email')
|
|
<p class="text-sm text-danger-600">{{ $message }}</p>
|
|
@enderror
|
|
|
|
<x-filament::button type="submit" class="w-full">
|
|
Send login code
|
|
</x-filament::button>
|
|
</div>
|
|
</form>
|
|
@else
|
|
<form wire:submit="authenticate">
|
|
<div class="grid gap-y-4">
|
|
<p class="text-sm text-gray-500">
|
|
A login code was sent to <strong>{{ $email }}</strong>.
|
|
</p>
|
|
|
|
<x-filament::input.wrapper>
|
|
<x-filament::input
|
|
type="text"
|
|
wire:model="otp"
|
|
placeholder="Enter your code"
|
|
autofocus
|
|
required
|
|
/>
|
|
</x-filament::input.wrapper>
|
|
|
|
@error('otp')
|
|
<p class="text-sm text-danger-600">{{ $message }}</p>
|
|
@enderror
|
|
|
|
<x-filament::button type="submit" class="w-full">
|
|
Sign in
|
|
</x-filament::button>
|
|
</div>
|
|
</form>
|
|
@endif
|
|
|
|
</x-filament-panels::page.simple>
|