Files
2026-11-04 16:47:55 +00:00

9 lines
1.9 KiB
PHP

<x-layout title="Account · Tarnax"><div class="max-w-md mx-auto card"><p class="eyebrow mb-4">Your Tarnax account</p><h2>{{ ucwords(str_replace('-',' ',$mode)) }}</h2><form method="post" action="{{ ['login'=>'/login','register'=>'/register','forgot-password'=>'/forgot-password','reset-password'=>'/reset-password','confirm-password'=>'/user/confirm-password','two-factor-challenge'=>'/two-factor-challenge'][$mode] }}" class="space-y-4">@csrf
@if($mode==='register')<label>Name<input name="name" value="{{ old('name') }}" required autocomplete="name"></label>@endif
@if(in_array($mode,['login','register','forgot-password','reset-password']))<label>Email<input type="email" name="email" value="{{ old('email',$request->email??'') }}" required autocomplete="email"></label>@endif
@if(in_array($mode,['login','register','reset-password','confirm-password']))<label>Password<input type="password" name="password" required autocomplete="{{ in_array($mode,['register','reset-password'])?'new-password':'current-password' }}"></label>@endif
@if(in_array($mode,['register','reset-password']))<label>Confirm password<input type="password" name="password_confirmation" required autocomplete="new-password"></label>@endif
@if($mode==='reset-password')<input type="hidden" name="token" value="{{ $request->route('token') }}">@endif
@if($mode==='two-factor-challenge')<label>Authenticator code<input name="code" inputmode="numeric" autocomplete="one-time-code"></label><label>Or recovery code<input name="recovery_code"></label>@endif
@if($mode==='register')<p class="muted text-sm">By registering, you agree to the <a class="underline" href="{{ route('page','terms') }}">terms</a>. Read our <a class="underline" href="{{ route('page','privacy') }}">privacy notice</a>.</p>@endif
<button class="button w-full">Continue →</button></form><div class="flex gap-4 text-sm mt-5"><a href="/login">Sign in</a><a href="/register">Register</a><a href="/forgot-password">Reset password</a></div></div></x-layout>