Repo rebuild

This commit is contained in:
Mark Gregory
2026-09-15 12:33:28 +01:00
commit be28c4feec
5629 changed files with 317074 additions and 0 deletions
@@ -0,0 +1,44 @@
<x-layouts::auth :title="__('Confirm password')">
<section
class="mx-auto w-full max-w-md overflow-hidden rounded-2xl border border-zinc-200 bg-white shadow-xl shadow-zinc-900/10 dark:border-zinc-800 dark:bg-zinc-950">
<div class="h-1.5 bg-gradient-to-r from-emerald-500 via-sky-500 to-blue-600"></div>
<div class="space-y-7 p-6 sm:p-8">
<div class="space-y-5 text-center">
<div
class="mx-auto flex h-14 w-14 items-center justify-center rounded-2xl bg-zinc-950 text-sm font-black text-white dark:bg-white dark:text-zinc-950">
WMS</div>
<div class="space-y-2">
<p class="text-xs font-semibold uppercase tracking-[0.24em] text-sky-700 dark:text-sky-300">
{{ __('Protected area') }}</p>
<h1 class="text-2xl font-bold tracking-tight text-zinc-950 dark:text-white">
{{ __('Confirm password') }}</h1>
<p class="text-sm leading-6 text-zinc-600 dark:text-zinc-400">
{{ __('Confirm your identity before continuing to this secure WMS workflow.') }}</p>
</div>
</div>
<div class="rounded-2xl border border-zinc-200 bg-zinc-50 p-5 dark:border-zinc-800 dark:bg-zinc-900/60">
<x-auth-session-status
class="mb-5 rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-center text-sm text-emerald-800 dark:border-emerald-900/60 dark:bg-emerald-950/40 dark:text-emerald-200"
:status="session('status')" />
<div class="mb-5">
<x-passkey-verify options-route="passkey.confirm-options" submit-route="passkey.confirm"
:label="__('Confirm with passkey')" :loading-label="__('Confirming...')" :separator="__('Or confirm with password')" />
</div>
<form method="POST" action="{{ route('password.confirm.store') }}" class="flex flex-col gap-5">
@csrf
<flux:input name="password" :label="__('Password')" type="password" required
autocomplete="current-password" :placeholder="__('Password')" viewable />
<flux:button variant="primary" type="submit" class="w-full" data-test="confirm-password-button">
{{ __('Confirm') }}
</flux:button>
</form>
</div>
</div>
</section>
</x-layouts::auth>
@@ -0,0 +1,47 @@
<x-layouts::auth :title="__('Forgot password')">
<section
class="mx-auto w-full max-w-md overflow-hidden rounded-2xl border border-zinc-200 bg-white shadow-xl shadow-zinc-900/10 dark:border-zinc-800 dark:bg-zinc-950">
<div class="h-1.5 bg-gradient-to-r from-emerald-500 via-sky-500 to-blue-600"></div>
<div class="space-y-7 p-6 sm:p-8">
<div class="space-y-5 text-center">
<div
class="mx-auto flex h-14 w-14 items-center justify-center rounded-2xl bg-zinc-950 text-sm font-black text-white dark:bg-white dark:text-zinc-950">
WMS</div>
<div class="space-y-2">
<p class="text-xs font-semibold uppercase tracking-[0.24em] text-sky-700 dark:text-sky-300">
{{ __('Account recovery') }}</p>
<h1 class="text-2xl font-bold tracking-tight text-zinc-950 dark:text-white">
{{ __('Warehouse Management System') }}</h1>
<p class="text-sm leading-6 text-zinc-600 dark:text-zinc-400">
{{ __('Request a secure reset link for your WMS account.') }}</p>
</div>
</div>
<div class="rounded-2xl border border-zinc-200 bg-zinc-50 p-5 dark:border-zinc-800 dark:bg-zinc-900/60">
<x-auth-header :title="__('Forgot password')" :description="__('Enter your email address and we will send you a password reset link.')" />
<x-auth-session-status
class="mt-5 rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-center text-sm text-emerald-800 dark:border-emerald-900/60 dark:bg-emerald-950/40 dark:text-emerald-200"
:status="session('status')" />
<form method="POST" action="{{ route('password.email') }}" class="mt-6 flex flex-col gap-5">
@csrf
<flux:input name="email" :label="__('Email address')" type="email" required autofocus
placeholder="email@example.com" />
<flux:button variant="primary" type="submit" class="w-full"
data-test="email-password-reset-link-button">
{{ __('Email password reset link') }}
</flux:button>
</form>
</div>
<div class="text-center text-sm text-zinc-600 dark:text-zinc-400">
<span>{{ __('Remember your password?') }}</span>
<flux:link :href="route('login')" wire:navigate>{{ __('Log in') }}</flux:link>
</div>
</div>
</section>
</x-layouts::auth>
@@ -0,0 +1,95 @@
<x-layouts::auth :title="__('Log in')">
<section
class="mx-auto w-full max-w-md overflow-hidden rounded-2xl border border-zinc-200 bg-white shadow-xl shadow-zinc-900/10 dark:border-zinc-800 dark:bg-zinc-950">
<div class="h-1.5 bg-gradient-to-r from-emerald-500 via-sky-500 to-blue-600"></div>
<div class="space-y-7 p-6 sm:p-8">
<div class="space-y-5 text-center">
<div
class="mx-auto flex h-14 w-14 items-center justify-center rounded-2xl bg-zinc-950 text-sm font-black tracking-tight text-white shadow-lg shadow-zinc-900/20 dark:bg-white dark:text-zinc-950">
WMS
</div>
<div class="space-y-2">
<p class="text-xs font-semibold uppercase tracking-[0.24em] text-sky-700 dark:text-sky-300">MPBA
Limited</p>
<h1 class="text-2xl font-bold tracking-tight text-zinc-950 dark:text-white">
{{ __('Warehouse Management System') }}</h1>
<p class="text-sm leading-6 text-zinc-600 dark:text-zinc-400">
{{ __('Secure access for tenant workspaces, warehouse operations, support, licences, and dashboards.') }}
</p>
</div>
</div>
<div class="rounded-2xl border border-zinc-200 bg-zinc-50 p-5 dark:border-zinc-800 dark:bg-zinc-900/60">
<div class="mb-6 space-y-1 text-center">
<p class="text-xs font-semibold uppercase tracking-[0.22em] text-sky-700 dark:text-sky-300">
{{ __('Secure sign in') }}</p>
<h2 class="text-xl font-bold text-zinc-950 dark:text-white">{{ __('Log in to your account') }}</h2>
<p class="text-sm text-zinc-600 dark:text-zinc-400">
{{ __('Enter your email and password to continue.') }}</p>
</div>
<x-auth-session-status
class="mb-5 rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-center text-sm text-emerald-800 dark:border-emerald-900/60 dark:bg-emerald-950/40 dark:text-emerald-200"
:status="session('status')" />
<div class="mb-5">
<x-passkey-verify />
</div>
<form method="POST" action="{{ route('login.store') }}" class="flex flex-col gap-5">
@csrf
<div class="grid gap-2">
<label for="email"
class="text-sm font-semibold text-zinc-800 dark:text-zinc-200">{{ __('Email address') }}</label>
<input id="email" name="email" type="email" value="{{ old('email') }}" required
autofocus autocomplete="email" placeholder="email@example.com"
class="w-full rounded-xl border border-zinc-300 bg-white px-4 py-3 text-sm text-zinc-950 shadow-sm outline-none transition placeholder:text-zinc-400 focus:border-sky-500 focus:ring-4 focus:ring-sky-100 dark:border-zinc-700 dark:bg-zinc-950 dark:text-white dark:placeholder:text-zinc-500 dark:focus:border-sky-400 dark:focus:ring-sky-950" />
@error('email')
<p class="text-sm font-medium text-red-600 dark:text-red-400">{{ $message }}</p>
@enderror
</div>
<div class="grid gap-2">
<div class="flex items-center justify-between gap-3">
<label for="password"
class="text-sm font-semibold text-zinc-800 dark:text-zinc-200">{{ __('Password') }}</label>
@if (Route::has('password.request'))
<a class="text-sm font-semibold text-sky-700 underline underline-offset-4 hover:text-sky-900 dark:text-sky-300"
href="{{ route('password.request') }}"
wire:navigate>{{ __('Forgot password?') }}</a>
@endif
</div>
<input id="password" name="password" type="password" required autocomplete="current-password"
placeholder="{{ __('Password') }}"
class="w-full rounded-xl border border-zinc-300 bg-white px-4 py-3 text-sm text-zinc-950 shadow-sm outline-none transition placeholder:text-zinc-400 focus:border-sky-500 focus:ring-4 focus:ring-sky-100 dark:border-zinc-700 dark:bg-zinc-950 dark:text-white dark:placeholder:text-zinc-500 dark:focus:border-sky-400 dark:focus:ring-sky-950" />
@error('password')
<p class="text-sm font-medium text-red-600 dark:text-red-400">{{ $message }}</p>
@enderror
</div>
<label
class="flex items-center gap-3 rounded-xl border border-zinc-200 bg-white px-4 py-3 text-sm text-zinc-700 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-300">
<input name="remember" type="checkbox" value="1" @checked(old('remember'))
class="rounded border-zinc-300 text-sky-600 focus:ring-sky-500 dark:border-zinc-700 dark:bg-zinc-950" />
<span>{{ __('Remember this device') }}</span>
</label>
<button type="submit"
class="w-full rounded-xl bg-zinc-950 px-4 py-3 text-sm font-bold text-white shadow-sm transition hover:bg-zinc-800 focus:outline-none focus:ring-4 focus:ring-sky-200 dark:bg-white dark:text-zinc-950 dark:hover:bg-zinc-200 dark:focus:ring-sky-950"
data-test="login-button">
{{ __('Log in') }}
</button>
</form>
</div>
<div class="text-center text-sm text-zinc-600 dark:text-zinc-400">
<span>{{ __('Need access?') }}</span>
<a href="{{ route('register') }}" wire:navigate
class="font-semibold text-sky-700 underline underline-offset-4 hover:text-sky-900 dark:text-sky-300">{{ __('Create an account') }}</a>
</div>
</div>
</section>
</x-layouts::auth>
@@ -0,0 +1,87 @@
<x-layouts::auth :title="__('Register')">
<section
class="mx-auto w-full max-w-md overflow-hidden rounded-2xl border border-zinc-200 bg-white shadow-xl shadow-zinc-900/10 dark:border-zinc-800 dark:bg-zinc-950">
<div class="h-1.5 bg-gradient-to-r from-emerald-500 via-sky-500 to-blue-600"></div>
<div class="space-y-7 p-6 sm:p-8">
<div class="space-y-5 text-center">
<div
class="mx-auto flex h-14 w-14 items-center justify-center rounded-2xl bg-zinc-950 text-sm font-black tracking-tight text-white shadow-lg shadow-zinc-900/20 dark:bg-white dark:text-zinc-950">
WMS
</div>
<div class="space-y-2">
<p class="text-xs font-semibold uppercase tracking-[0.24em] text-sky-700 dark:text-sky-300">
{{ __('MPBA Limited') }}</p>
<h1 class="text-2xl font-bold tracking-tight text-zinc-950 dark:text-white">
{{ __('Create your WMS account') }}</h1>
<p class="text-sm leading-6 text-zinc-600 dark:text-zinc-400">
{{ __('Register for secure access to your company workspace and warehouse operations.') }}</p>
</div>
</div>
<div class="rounded-2xl border border-zinc-200 bg-zinc-50 p-5 dark:border-zinc-800 dark:bg-zinc-900/60">
<x-auth-session-status
class="mb-5 rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-center text-sm text-emerald-800 dark:border-emerald-900/60 dark:bg-emerald-950/40 dark:text-emerald-200"
:status="session('status')" />
<form method="POST" action="{{ route('register.store') }}" class="flex flex-col gap-5">
@csrf
<div class="grid gap-2">
<label for="name"
class="text-sm font-semibold text-zinc-800 dark:text-zinc-200">{{ __('Name') }}</label>
<input id="name" name="name" type="text" value="{{ old('name') }}" required
autofocus autocomplete="name" placeholder="{{ __('Full name') }}"
class="w-full rounded-xl border border-zinc-300 bg-white px-4 py-3 text-sm text-zinc-950 shadow-sm outline-none transition placeholder:text-zinc-400 focus:border-sky-500 focus:ring-4 focus:ring-sky-100 dark:border-zinc-700 dark:bg-zinc-950 dark:text-white dark:placeholder:text-zinc-500 dark:focus:border-sky-400 dark:focus:ring-sky-950" />
@error('name')
<p class="text-sm font-medium text-red-600 dark:text-red-400">{{ $message }}</p>
@enderror
</div>
<div class="grid gap-2">
<label for="email"
class="text-sm font-semibold text-zinc-800 dark:text-zinc-200">{{ __('Email address') }}</label>
<input id="email" name="email" type="email" value="{{ old('email') }}" required
autocomplete="email" placeholder="email@example.com"
class="w-full rounded-xl border border-zinc-300 bg-white px-4 py-3 text-sm text-zinc-950 shadow-sm outline-none transition placeholder:text-zinc-400 focus:border-sky-500 focus:ring-4 focus:ring-sky-100 dark:border-zinc-700 dark:bg-zinc-950 dark:text-white dark:placeholder:text-zinc-500 dark:focus:border-sky-400 dark:focus:ring-sky-950" />
@error('email')
<p class="text-sm font-medium text-red-600 dark:text-red-400">{{ $message }}</p>
@enderror
</div>
<div class="grid gap-2">
<label for="password"
class="text-sm font-semibold text-zinc-800 dark:text-zinc-200">{{ __('Password') }}</label>
<input id="password" name="password" type="password" required autocomplete="new-password"
placeholder="{{ __('Password') }}"
class="w-full rounded-xl border border-zinc-300 bg-white px-4 py-3 text-sm text-zinc-950 shadow-sm outline-none transition placeholder:text-zinc-400 focus:border-sky-500 focus:ring-4 focus:ring-sky-100 dark:border-zinc-700 dark:bg-zinc-950 dark:text-white dark:placeholder:text-zinc-500 dark:focus:border-sky-400 dark:focus:ring-sky-950" />
@error('password')
<p class="text-sm font-medium text-red-600 dark:text-red-400">{{ $message }}</p>
@enderror
</div>
<div class="grid gap-2">
<label for="password_confirmation"
class="text-sm font-semibold text-zinc-800 dark:text-zinc-200">{{ __('Confirm password') }}</label>
<input id="password_confirmation" name="password_confirmation" type="password" required
autocomplete="new-password" placeholder="{{ __('Confirm password') }}"
class="w-full rounded-xl border border-zinc-300 bg-white px-4 py-3 text-sm text-zinc-950 shadow-sm outline-none transition placeholder:text-zinc-400 focus:border-sky-500 focus:ring-4 focus:ring-sky-100 dark:border-zinc-700 dark:bg-zinc-950 dark:text-white dark:placeholder:text-zinc-500 dark:focus:border-sky-400 dark:focus:ring-sky-950" />
</div>
<button type="submit"
class="w-full rounded-xl bg-zinc-950 px-4 py-3 text-sm font-bold text-white shadow-sm transition hover:bg-zinc-800 focus:outline-none focus:ring-4 focus:ring-sky-200 dark:bg-white dark:text-zinc-950 dark:hover:bg-zinc-200 dark:focus:ring-sky-950"
data-test="register-user-button">
{{ __('Create account') }}
</button>
</form>
</div>
<div class="text-center text-sm text-zinc-600 dark:text-zinc-400">
<span>{{ __('Already have access?') }}</span>
<a href="{{ route('login') }}" wire:navigate
class="font-semibold text-sky-700 underline underline-offset-4 hover:text-sky-900 dark:text-sky-300">{{ __('Log in') }}</a>
</div>
</div>
</section>
</x-layouts::auth>
@@ -0,0 +1,50 @@
<x-layouts::auth :title="__('Reset password')">
<section
class="mx-auto w-full max-w-md overflow-hidden rounded-2xl border border-zinc-200 bg-white shadow-xl shadow-zinc-900/10 dark:border-zinc-800 dark:bg-zinc-950">
<div class="h-1.5 bg-gradient-to-r from-emerald-500 via-sky-500 to-blue-600"></div>
<div class="space-y-7 p-6 sm:p-8">
<div class="space-y-5 text-center">
<div
class="mx-auto flex h-14 w-14 items-center justify-center rounded-2xl bg-zinc-950 text-sm font-black text-white dark:bg-white dark:text-zinc-950">
WMS</div>
<div class="space-y-2">
<p class="text-xs font-semibold uppercase tracking-[0.24em] text-sky-700 dark:text-sky-300">
{{ __('Password reset') }}</p>
<h1 class="text-2xl font-bold tracking-tight text-zinc-950 dark:text-white">
{{ __('Secure account recovery') }}</h1>
<p class="text-sm leading-6 text-zinc-600 dark:text-zinc-400">
{{ __('Create a new password for your WMS account.') }}</p>
</div>
</div>
<div class="rounded-2xl border border-zinc-200 bg-zinc-50 p-5 dark:border-zinc-800 dark:bg-zinc-900/60">
<x-auth-session-status
class="mb-5 rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-center text-sm text-emerald-800 dark:border-emerald-900/60 dark:bg-emerald-950/40 dark:text-emerald-200"
:status="session('status')" />
<form method="POST" action="{{ route('password.update') }}" class="flex flex-col gap-5">
@csrf
<input type="hidden" name="token" value="{{ request()->route('token') }}">
<flux:input name="email" value="{{ request('email') }}" :label="__('Email')" type="email"
required autocomplete="email" />
<flux:input name="password" :label="__('Password')" type="password" required
autocomplete="new-password" :placeholder="__('Password')"
passwordrules="{{ \Illuminate\Validation\Rules\Password::defaults()->toPasswordRulesString() }}"
viewable />
<flux:input name="password_confirmation" :label="__('Confirm password')" type="password" required
autocomplete="new-password" :placeholder="__('Confirm password')"
passwordrules="{{ \Illuminate\Validation\Rules\Password::defaults()->toPasswordRulesString() }}"
viewable />
<flux:button type="submit" variant="primary" class="w-full" data-test="reset-password-button">
{{ __('Reset password') }}
</flux:button>
</form>
</div>
</div>
</section>
</x-layouts::auth>
@@ -0,0 +1,101 @@
<x-layouts::auth :title="__('Two-factor authentication')">
<section
class="mx-auto w-full max-w-md overflow-hidden rounded-2xl border border-zinc-200 bg-white shadow-xl shadow-zinc-900/10 dark:border-zinc-800 dark:bg-zinc-950">
<div class="h-1.5 bg-gradient-to-r from-emerald-500 via-sky-500 to-blue-600"></div>
<div class="space-y-7 p-6 sm:p-8">
<div class="space-y-5 text-center">
<div
class="mx-auto flex h-14 w-14 items-center justify-center rounded-2xl bg-zinc-950 text-sm font-black text-white dark:bg-white dark:text-zinc-950">
WMS</div>
<div class="space-y-2">
<p class="text-xs font-semibold uppercase tracking-[0.24em] text-sky-700 dark:text-sky-300">
{{ __('Multi-factor security') }}</p>
<h1 class="text-2xl font-bold tracking-tight text-zinc-950 dark:text-white">
{{ __('Verify your sign in') }}</h1>
<p class="text-sm leading-6 text-zinc-600 dark:text-zinc-400">
{{ __('Complete the security challenge to continue into WMS.') }}</p>
</div>
</div>
<div class="rounded-2xl border border-zinc-200 bg-zinc-50 p-5 dark:border-zinc-800 dark:bg-zinc-900/60">
<div class="relative w-full h-auto" x-cloak x-data="{
showRecoveryInput: @js($errors->has('recovery_code')),
code: '',
recovery_code: '',
focusOtp() {
this.$nextTick(() => this.$refs.otp?.querySelector('input')?.focus());
},
init() {
if (!this.showRecoveryInput) {
this.focusOtp();
}
},
toggleInput() {
this.showRecoveryInput = !this.showRecoveryInput;
this.code = '';
this.recovery_code = '';
$nextTick(() => {
this.showRecoveryInput ?
this.$refs.recovery_code?.focus() :
this.focusOtp();
});
},
}">
<div x-show="!showRecoveryInput">
<x-auth-header :title="__('Authentication code')" :description="__('Enter the authentication code provided by your authenticator application.')" />
</div>
<div x-show="showRecoveryInput">
<x-auth-header :title="__('Recovery code')" :description="__(
'Please confirm access to your account by entering one of your emergency recovery codes.',
)" />
</div>
<form method="POST" action="{{ route('two-factor.login.store') }}" class="mt-6">
@csrf
<div class="space-y-5 text-center">
<div x-show="!showRecoveryInput">
<div class="my-5 flex items-center justify-center" x-ref="otp">
<flux:otp x-model="code" length="6" name="code" label="OTP Code"
label:sr-only class="mx-auto" />
</div>
</div>
<div x-show="showRecoveryInput">
<div class="my-5">
<flux:input type="text" name="recovery_code" x-ref="recovery_code"
x-bind:required="showRecoveryInput" autocomplete="one-time-code"
x-model="recovery_code" />
</div>
@error('recovery_code')
<flux:text color="red">
{{ $message }}
</flux:text>
@enderror
</div>
<flux:button variant="primary" type="submit" class="w-full">
{{ __('Continue') }}
</flux:button>
</div>
<div class="mt-5 text-center text-sm leading-5 text-zinc-600 dark:text-zinc-400">
<span>{{ __('or you can') }}</span>
<button type="button"
class="inline font-semibold text-sky-700 underline underline-offset-4 hover:text-sky-900 dark:text-sky-300"
@click="toggleInput()">
<span x-show="!showRecoveryInput">{{ __('login using a recovery code') }}</span>
<span x-show="showRecoveryInput">{{ __('login using an authentication code') }}</span>
</button>
</div>
</form>
</div>
</div>
</div>
</section>
</x-layouts::auth>
@@ -0,0 +1,52 @@
<x-layouts::auth :title="__('Email verification')">
<section
class="mx-auto w-full max-w-md overflow-hidden rounded-2xl border border-zinc-200 bg-white shadow-xl shadow-zinc-900/10 dark:border-zinc-800 dark:bg-zinc-950">
<div class="h-1.5 bg-gradient-to-r from-emerald-500 via-sky-500 to-blue-600"></div>
<div class="space-y-7 p-6 sm:p-8">
<div class="space-y-5 text-center">
<div
class="mx-auto flex h-14 w-14 items-center justify-center rounded-2xl bg-zinc-950 text-sm font-black text-white dark:bg-white dark:text-zinc-950">
WMS</div>
<div class="space-y-2">
<p class="text-xs font-semibold uppercase tracking-[0.24em] text-sky-700 dark:text-sky-300">
{{ __('Email verification') }}</p>
<h1 class="text-2xl font-bold tracking-tight text-zinc-950 dark:text-white">
{{ __('Confirm your account') }}</h1>
<p class="text-sm leading-6 text-zinc-600 dark:text-zinc-400">
{{ __('Verify your email address before accessing the WMS dashboard.') }}</p>
</div>
</div>
<div class="rounded-2xl border border-zinc-200 bg-zinc-50 p-5 dark:border-zinc-800 dark:bg-zinc-900/60">
<flux:text class="text-center leading-6">
{{ __('Please verify your email address by clicking on the link we just emailed to you.') }}
</flux:text>
@if (session('status') == 'verification-link-sent')
<div
class="mt-5 rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-center text-sm font-semibold text-emerald-800 dark:border-emerald-900/60 dark:bg-emerald-950/40 dark:text-emerald-200">
{{ __('A new verification link has been sent to the email address you provided during registration.') }}
</div>
@endif
<div class="mt-6 flex flex-col gap-3">
<form method="POST" action="{{ route('verification.send') }}">
@csrf
<flux:button type="submit" variant="primary" class="w-full">
{{ __('Resend verification email') }}
</flux:button>
</form>
<form method="POST" action="{{ route('logout') }}">
@csrf
<flux:button variant="ghost" type="submit" class="w-full cursor-pointer text-sm"
data-test="logout-button">
{{ __('Log out') }}
</flux:button>
</form>
</div>
</div>
</div>
</section>
</x-layouts::auth>
@@ -0,0 +1,13 @@
<section class="w-full">
@include('partials.settings-heading')
<flux:heading class="sr-only">{{ __('Appearance settings') }}</flux:heading>
<x-settings.layout :heading="__('Appearance')" :subheading="__('Update the appearance settings for your account')">
<flux:radio.group x-data variant="segmented" x-model="$flux.appearance">
<flux:radio value="light" icon="sun">{{ __('Light') }}</flux:radio>
<flux:radio value="dark" icon="moon">{{ __('Dark') }}</flux:radio>
<flux:radio value="system" icon="computer-desktop">{{ __('System') }}</flux:radio>
</flux:radio.group>
</x-settings.layout>
</section>
@@ -0,0 +1,35 @@
<section class="mt-10 space-y-6">
<div class="relative mb-5">
<flux:heading>{{ __('Delete account') }}</flux:heading>
<flux:subheading>{{ __('Delete your account and all of its resources') }}</flux:subheading>
</div>
<flux:modal.trigger name="confirm-user-deletion">
<flux:button variant="danger" x-data=""
x-on:click.prevent="$dispatch('open-modal', 'confirm-user-deletion')">
{{ __('Delete account') }}
</flux:button>
</flux:modal.trigger>
<flux:modal name="confirm-user-deletion" :show="$errors->isNotEmpty()" focusable class="max-w-lg">
<form method="POST" wire:submit="deleteUser" class="space-y-6">
<div>
<flux:heading size="lg">{{ __('Are you sure you want to delete your account?') }}</flux:heading>
<flux:subheading>
{{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.') }}
</flux:subheading>
</div>
<flux:input wire:model="password" :label="__('Password')" type="password" viewable />
<div class="flex justify-end space-x-2 rtl:space-x-reverse">
<flux:modal.close>
<flux:button variant="filled">{{ __('Cancel') }}</flux:button>
</flux:modal.close>
<flux:button variant="danger" type="submit">{{ __('Delete account') }}</flux:button>
</div>
</form>
</flux:modal>
</section>
@@ -0,0 +1,37 @@
<section class="w-full">
@include('partials.settings-heading')
<flux:heading class="sr-only">{{ __('Profile settings') }}</flux:heading>
<x-settings.layout :heading="__('Profile')" :subheading="__('Update your name and email address')">
<form wire:submit="updateProfileInformation" class="my-6 w-full space-y-6">
<flux:input wire:model="name" :label="__('Name')" type="text" required autofocus autocomplete="name" />
<div>
<flux:input wire:model="email" :label="__('Email')" type="email" required autocomplete="email" />
@if ($this->hasUnverifiedEmail)
<div>
<flux:text class="mt-4">
{{ __('Your email address is unverified.') }}
<flux:link class="text-sm cursor-pointer"
wire:click.prevent="resendVerificationNotification">
{{ __('Click here to re-send the verification email.') }}
</flux:link>
</flux:text>
</div>
@endif
</div>
<div class="flex items-center gap-4">
<flux:button variant="primary" type="submit">{{ __('Save') }}</flux:button>
</div>
</form>
@if ($this->showDeleteUser)
<livewire:settings.delete-user-form />
@endif
</x-settings.layout>
</section>
@@ -0,0 +1,266 @@
<section class="w-full">
@include('partials.settings-heading')
<flux:heading class="sr-only">{{ __('Security settings') }}</flux:heading>
<x-settings.layout :heading="__('Update password')" :subheading="__('Ensure your account is using a long, random password to stay secure')">
<form method="POST" wire:submit="updatePassword" class="mt-6 space-y-6">
<flux:input wire:model="current_password" :label="__('Current password')" type="password" required
autocomplete="current-password" viewable />
<flux:input wire:model="password" :label="__('New password')" type="password" required
autocomplete="new-password"
passwordrules="{{ \Illuminate\Validation\Rules\Password::defaults()->toPasswordRulesString() }}"
viewable />
<flux:input wire:model="password_confirmation" :label="__('Confirm password')" type="password" required
autocomplete="new-password"
passwordrules="{{ \Illuminate\Validation\Rules\Password::defaults()->toPasswordRulesString() }}"
viewable />
<div class="flex items-center gap-4">
<flux:button variant="primary" type="submit" data-test="update-password-button">{{ __('Save') }}
</flux:button>
</div>
</form>
@if ($canManageTwoFactor)
<section class="mt-12">
<flux:heading>{{ __('Two-factor authentication') }}</flux:heading>
<flux:subheading>{{ __('Manage your two-factor authentication settings') }}</flux:subheading>
<div class="flex flex-col w-full mx-auto space-y-6 text-sm" wire:cloak>
@if ($twoFactorEnabled)
<div class="space-y-4">
<flux:text>
{{ __('You will be prompted for a secure, random pin during login, which you can retrieve from the TOTP-supported application on your phone.') }}
</flux:text>
<div class="flex justify-start">
<flux:button variant="danger" wire:click="disable">
{{ __('Disable 2FA') }}
</flux:button>
</div>
<livewire:settings.two-factor.recovery-codes :$requiresConfirmation />
</div>
@else
<div class="space-y-4">
<flux:text variant="subtle">
{{ __('When you enable two-factor authentication, you will be prompted for a secure pin during login. This pin can be retrieved from a TOTP-supported application on your phone.') }}
</flux:text>
<flux:button variant="primary" wire:click="enable">
{{ __('Enable 2FA') }}
</flux:button>
</div>
@endif
</div>
</section>
@endif
@if ($canManageTwoFactor)
<flux:modal name="two-factor-setup-modal" class="max-w-md md:min-w-md" @close="closeModal"
wire:model="showModal">
<div class="space-y-6">
<div class="flex flex-col items-center space-y-4">
<div
class="p-0.5 w-auto rounded-full border border-stone-100 dark:border-stone-600 bg-white dark:bg-stone-800 shadow-sm">
<div
class="p-2.5 rounded-full border border-stone-200 dark:border-stone-600 overflow-hidden bg-stone-100 dark:bg-stone-200 relative">
<div
class="flex items-stretch absolute inset-0 w-full h-full divide-x [&>div]:flex-1 divide-stone-200 dark:divide-stone-300 justify-around opacity-50">
@for ($i = 1; $i <= 5; $i++)
<div></div>
@endfor
</div>
<div
class="flex flex-col items-stretch absolute w-full h-full divide-y [&>div]:flex-1 inset-0 divide-stone-200 dark:divide-stone-300 justify-around opacity-50">
@for ($i = 1; $i <= 5; $i++)
<div></div>
@endfor
</div>
<flux:icon.qr-code class="relative z-20 dark:text-accent-foreground" />
</div>
</div>
<div class="space-y-2 text-center">
<flux:heading size="lg">{{ $this->modalConfig['title'] }}</flux:heading>
<flux:text>{{ $this->modalConfig['description'] }}</flux:text>
</div>
</div>
@if ($showVerificationStep)
<div class="space-y-6">
<div class="flex flex-col items-center space-y-3 justify-center" x-data
x-init="$nextTick(() => $el.querySelector('input')?.focus())">
<flux:otp name="code" wire:model="code" length="6" label="OTP Code" label:sr-only
class="mx-auto" />
</div>
<div class="flex items-center space-x-3">
<flux:button variant="outline" class="flex-1" wire:click="resetVerification">
{{ __('Back') }}
</flux:button>
<flux:button variant="primary" class="flex-1" wire:click="confirmTwoFactor"
x-bind:disabled="$wire.code.length < 6">
{{ __('Confirm') }}
</flux:button>
</div>
</div>
@else
@error('setupData')
<flux:callout variant="danger" icon="x-circle" heading="{{ $message }}" />
@enderror
<div class="flex justify-center">
<div
class="relative w-64 overflow-hidden border rounded-lg border-stone-200 dark:border-stone-700 aspect-square">
@empty($qrCodeSvg)
<div
class="absolute inset-0 flex items-center justify-center bg-white dark:bg-stone-700 animate-pulse">
<flux:icon.loading />
</div>
@else
<div x-data class="flex items-center justify-center h-full p-4">
<div class="bg-white p-3 rounded"
:style="($flux.appearance === 'dark' || ($flux.appearance === 'system' && $flux
.dark)) ? 'filter: invert(1) brightness(1.5)' : ''">
{!! $qrCodeSvg !!}
</div>
</div>
@endempty
</div>
</div>
<div>
<flux:button :disabled="$errors->has('setupData')" variant="primary" class="w-full"
wire:click="showVerificationIfNecessary">
{{ $this->modalConfig['buttonText'] }}
</flux:button>
</div>
<div class="space-y-4">
<div class="relative flex items-center justify-center w-full">
<div class="absolute inset-0 w-full h-px top-1/2 bg-stone-200 dark:bg-stone-600"></div>
<span
class="relative px-2 text-sm bg-white dark:bg-stone-800 text-stone-600 dark:text-stone-400">
{{ __('or, enter the code manually') }}
</span>
</div>
<div class="flex items-center space-x-2" x-data="{
copied: false,
async copy() {
try {
await navigator.clipboard.writeText('{{ $manualSetupKey }}');
this.copied = true;
setTimeout(() => this.copied = false, 1500);
} catch (e) {
console.warn('Could not copy to clipboard');
}
}
}">
<div class="flex items-stretch w-full border rounded-xl dark:border-stone-700">
@empty($manualSetupKey)
<div
class="flex items-center justify-center w-full p-3 bg-stone-100 dark:bg-stone-700">
<flux:icon.loading variant="mini" />
</div>
@else
<input type="text" readonly value="{{ $manualSetupKey }}"
class="w-full p-3 bg-transparent outline-none text-stone-900 dark:text-stone-100" />
<button @click="copy()"
class="px-3 transition-colors border-l cursor-pointer border-stone-200 dark:border-stone-600">
<flux:icon.document-duplicate x-show="!copied" variant="outline"></flux:icon>
<flux:icon.check x-show="copied" variant="solid" class="text-green-500">
</flux:icon>
</button>
@endempty
</div>
</div>
</div>
@endif
</div>
</flux:modal>
@endif
@if ($canManagePasskeys)
<section class="mt-12">
<flux:heading>{{ __('Passkeys') }}</flux:heading>
<flux:subheading>{{ __('Manage your passkeys for passwordless sign-in') }}</flux:subheading>
<div class="mt-6 flex flex-col w-full mx-auto space-y-6 text-sm" wire:cloak>
<div class="border rounded-lg border-zinc-200 dark:border-zinc-700 overflow-hidden">
@forelse ($passkeys as $passkey)
<div
class="flex items-center justify-between p-4 {{ !$loop->last ? 'border-b border-zinc-200 dark:border-zinc-700' : '' }}">
<div class="flex items-center gap-4">
<div
class="flex size-10 shrink-0 items-center justify-center rounded-xl bg-zinc-100 dark:bg-zinc-800">
<flux:icon.key class="size-5 text-zinc-500 dark:text-zinc-400" />
</div>
<div class="space-y-1">
<div class="flex items-center gap-2.5">
<p class="font-medium tracking-tight">{{ $passkey['name'] }}</p>
@if ($passkey['authenticator'])
<flux:badge size="sm">{{ $passkey['authenticator'] }}
</flux:badge>
@endif
</div>
<p class="text-zinc-500 dark:text-zinc-400 text-xs">
{{ __('Added :time', ['time' => $passkey['created_at_diff']]) }}
@if ($passkey['last_used_at_diff'])
<span class="opacity-50 mx-1">/</span>
{{ __('Last used :time', ['time' => $passkey['last_used_at_diff']]) }}
@endif
</p>
</div>
</div>
<flux:button variant="ghost" size="sm" icon="trash" icon:variant="outline"
wire:click="confirmDelete({{ $passkey['id'] }})"
class="text-red-500 hover:text-red-600 hover:bg-red-50 dark:hover:bg-red-950/50" />
</div>
@empty
<div class="p-8 text-center">
<div
class="mx-auto mb-4 flex size-14 items-center justify-center rounded-2xl bg-zinc-100 dark:bg-zinc-800">
<flux:icon.key class="size-7 text-zinc-400 dark:text-zinc-500" />
</div>
<p class="font-medium">{{ __('No passkeys yet') }}</p>
<flux:text class="mt-1">{{ __('Add a passkey to sign in without a password') }}
</flux:text>
</div>
@endforelse
</div>
<x-passkey-registration />
</div>
</section>
@endif
</x-settings.layout>
<flux:modal name="delete-passkey-modal" class="max-w-md md:min-w-md" @close="closeDeleteModal"
wire:model="showDeleteModal">
<div class="space-y-6">
<div class="space-y-2">
<flux:heading size="lg">{{ __('Remove passkey') }}</flux:heading>
<flux:text>
{{ __('Are you sure you want to remove the passkey ":name"? You will no longer be able to use it to sign in.', ['name' => $deletingPasskeyName]) }}
</flux:text>
</div>
<div class="flex gap-3 justify-end">
<flux:button variant="outline" wire:click="closeDeleteModal">
{{ __('Cancel') }}
</flux:button>
<flux:button variant="danger" wire:click="deletePasskey">
{{ __('Remove passkey') }}
</flux:button>
</div>
</div>
</flux:modal>
</section>
@@ -0,0 +1,56 @@
<div class="py-6 space-y-6 border shadow-sm rounded-xl border-zinc-200 dark:border-white/10" wire:cloak
x-data="{ showRecoveryCodes: false }">
<div class="px-6 space-y-2">
<div class="flex items-center gap-2">
<flux:icon.lock-closed variant="outline" class="size-4" />
<flux:heading size="lg" level="3">{{ __('2FA recovery codes') }}</flux:heading>
</div>
<flux:text variant="subtle">
{{ __('Recovery codes let you regain access if you lose your 2FA device. Store them in a secure password manager.') }}
</flux:text>
</div>
<div class="px-6">
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
<flux:button x-show="!showRecoveryCodes" icon="eye" icon:variant="outline" variant="primary"
@click="showRecoveryCodes = true;" aria-expanded="false" aria-controls="recovery-codes-section">
{{ __('View recovery codes') }}
</flux:button>
<flux:button x-show="showRecoveryCodes" icon="eye-slash" icon:variant="outline" variant="primary"
@click="showRecoveryCodes = false" aria-expanded="true" aria-controls="recovery-codes-section">
{{ __('Hide recovery codes') }}
</flux:button>
@if (filled($recoveryCodes))
<flux:button x-show="showRecoveryCodes" icon="arrow-path" variant="filled"
wire:click="regenerateRecoveryCodes">
{{ __('Regenerate codes') }}
</flux:button>
@endif
</div>
<div x-show="showRecoveryCodes" x-transition id="recovery-codes-section" class="relative overflow-hidden"
x-bind:aria-hidden="!showRecoveryCodes">
<div class="mt-3 space-y-3">
@error('recoveryCodes')
<flux:callout variant="danger" icon="x-circle" heading="{{ $message }}" />
@enderror
@if (filled($recoveryCodes))
<div class="grid gap-1 p-4 font-mono text-sm rounded-lg bg-zinc-100 dark:bg-white/5" role="list"
aria-label="{{ __('Recovery codes') }}">
@foreach ($recoveryCodes as $code)
<div role="listitem" class="select-text" wire:loading.class="opacity-50 animate-pulse">
{{ $code }}
</div>
@endforeach
</div>
<flux:text variant="subtle" class="text-xs">
{{ __('Each recovery code can be used once to access your account and will be removed after use. If you need more, click Regenerate codes above.') }}
</flux:text>
@endif
</div>
</div>
</div>
</div>