79 lines
3.7 KiB
PHP
79 lines
3.7 KiB
PHP
<?php
|
|
|
|
use App\Livewire\Forms\LoginForm;
|
|
use Illuminate\Support\Facades\Session;
|
|
use Livewire\Attributes\Layout;
|
|
use Livewire\Volt\Component;
|
|
|
|
new #[Layout('layouts.guest')] class extends Component
|
|
{
|
|
public LoginForm $form;
|
|
|
|
public function login(): void
|
|
{
|
|
$this->validate();
|
|
$this->form->authenticate();
|
|
Session::regenerate();
|
|
$this->redirectIntended(default: route('dashboard', absolute: false), navigate: true);
|
|
}
|
|
}; ?>
|
|
|
|
<div>
|
|
<x-auth-session-status class="mb-4" :status="session('status')" />
|
|
|
|
<h2 style="font-size:1.25rem;font-weight:600;color:#f0f0f5;margin-bottom:1.5rem;">Sign in to CluPilot</h2>
|
|
|
|
<form wire:submit="login">
|
|
<div>
|
|
<label for="email" style="display:block;font-size:0.875rem;color:#8888a0;margin-bottom:0.375rem;">Email</label>
|
|
<input wire:model="form.email" id="email" type="email" name="email" required autofocus autocomplete="username"
|
|
style="width:100%;padding:0.5rem 0.75rem;background-color:#111117;border:1px solid rgba(255,255,255,0.06);border-radius:0.5rem;color:#f0f0f5;outline:none;"
|
|
onfocus="this.style.borderColor='#4f8ef7'" onblur="this.style.borderColor='rgba(255,255,255,0.06)'" />
|
|
<x-input-error :messages="$errors->get('form.email')" class="mt-2" />
|
|
</div>
|
|
|
|
<div style="margin-top:1rem;">
|
|
<label for="password" style="display:block;font-size:0.875rem;color:#8888a0;margin-bottom:0.375rem;">Password</label>
|
|
<input wire:model="form.password" id="password" type="password" name="password" required autocomplete="current-password"
|
|
style="width:100%;padding:0.5rem 0.75rem;background-color:#111117;border:1px solid rgba(255,255,255,0.06);border-radius:0.5rem;color:#f0f0f5;outline:none;"
|
|
onfocus="this.style.borderColor='#4f8ef7'" onblur="this.style.borderColor='rgba(255,255,255,0.06)'" />
|
|
<x-input-error :messages="$errors->get('form.password')" class="mt-2" />
|
|
</div>
|
|
|
|
<div style="margin-top:1rem;">
|
|
<label for="remember" style="display:inline-flex;align-items:center;gap:0.5rem;font-size:0.875rem;color:#8888a0;">
|
|
<input wire:model="form.remember" id="remember" type="checkbox" name="remember"
|
|
style="border-radius:0.25rem;border-color:rgba(255,255,255,0.06);background-color:#111117;" />
|
|
Remember me
|
|
</label>
|
|
</div>
|
|
|
|
<div style="display:flex;align-items:center;justify-content:space-between;margin-top:1.5rem;">
|
|
@if (Route::has('password.request'))
|
|
<a href="{{ route('password.request') }}" wire:navigate
|
|
style="font-size:0.875rem;color:#4f8ef7;text-decoration:none;"
|
|
onmouseover="this.style.opacity='.8'" onmouseout="this.style.opacity='1'">
|
|
Forgot password?
|
|
</a>
|
|
@endif
|
|
|
|
<button type="submit"
|
|
style="padding:0.5rem 1.5rem;background-color:#4f8ef7;color:#fff;border:none;border-radius:0.5rem;font-weight:500;cursor:pointer;"
|
|
onmouseover="this.style.opacity='.9'" onmouseout="this.style.opacity='1'">
|
|
Sign in
|
|
</button>
|
|
</div>
|
|
</form>
|
|
|
|
@if (Route::has('register'))
|
|
<p style="margin-top:1.5rem;text-align:center;font-size:0.875rem;color:#8888a0;">
|
|
No account?
|
|
<a href="{{ route('register') }}" wire:navigate
|
|
style="color:#4f8ef7;text-decoration:none;"
|
|
onmouseover="this.style.opacity='.8'" onmouseout="this.style.opacity='1'">
|
|
Create one
|
|
</a>
|
|
</p>
|
|
@endif
|
|
</div>
|