- Dark indigo header and tinted page background; the mobile main menu gets its own row, in the same order as the keyboard reaches it. - Page titles with an icon chip (x-page-title, x-page, x-page-header) and card sections (x-panel, the card utility); x-table styled as a card with an indigo header row in AppServiceProvider::styleTables(). - Job and task statuses, late work, unapproved hours and stock states as badges with icon and text (x-status-badge, x-jobs.status, x-jobs.task-status), never colour alone. - Empty lists as x-empty-state; dashboard quick link tiles, week hour bars and trend arrows; Kanban columns and task cards edged by status; calendar today column and bar accents; quick sale, reports and machine console restyled; signed-out pages show the app name. - Focus rings use the primary colour in both themes (white in the header). - Document the components in CLAUDE.md; test the status badges. Co-Authored-By: Claude Opus 5.5 <[email protected]>
74 lines
2.2 KiB
PHP
74 lines
2.2 KiB
PHP
<?php
|
|
|
|
use App\Modules\Users\Application\UseCases\CheckLoginAllowed;
|
|
use App\Modules\Users\Presentation\Livewire\Concerns\SignsInWithPassword;
|
|
use Livewire\Component;
|
|
|
|
new class extends Component
|
|
{
|
|
use SignsInWithPassword;
|
|
|
|
public bool $remember = false;
|
|
|
|
/**
|
|
* Set when EnsureAccountIsUsable ended the session. Passed in the URL,
|
|
* not flashed: a Livewire request that gets redirected here would
|
|
* consume a flash message before the browser shows the page.
|
|
*/
|
|
public bool $accessEnded = false;
|
|
|
|
public function mount(): void
|
|
{
|
|
$this->accessEnded = request()->query('access') === 'ended';
|
|
}
|
|
|
|
public function login(CheckLoginAllowed $checkLoginAllowed): void
|
|
{
|
|
$this->signInWithPassword($checkLoginAllowed, $this->remember);
|
|
|
|
$this->redirectIntended(route('home'));
|
|
}
|
|
|
|
public function render(): mixed
|
|
{
|
|
return $this->view()->title(__('auth.login_title'));
|
|
}
|
|
};
|
|
?>
|
|
|
|
<div class="mx-auto max-w-md space-y-6 p-4 sm:p-6 sm:pt-16">
|
|
@include('partials.guest-brand')
|
|
|
|
<h1 class=\"text-2xl font-semibold\">{{ __('auth.login_title') }}</h1>
|
|
|
|
@if ($accessEnded)
|
|
<x-alert role="status" color="yellow" light icon="exclamation-triangle" :text="__('auth.account_disabled')" />
|
|
@elseif (session('status'))
|
|
<x-alert role="status" color="green" light icon="information-circle" :text="session('status')" />
|
|
@endif
|
|
|
|
<form wire:submit="login" class="card space-y-6" novalidate>
|
|
<x-input
|
|
wire:model="email"
|
|
type="email"
|
|
:label="__('auth.email')"
|
|
autocomplete="username"
|
|
required
|
|
/>
|
|
|
|
<x-password-field
|
|
wire:model="password"
|
|
:label="__('auth.password_label')"
|
|
autocomplete="current-password"
|
|
required
|
|
/>
|
|
|
|
<x-checkbox wire:model="remember" :label="__('auth.remember')" />
|
|
|
|
<div class="flex flex-wrap items-center justify-between gap-4">
|
|
<x-button submit :text="__('auth.login')" />
|
|
<x-link :href="route('password.request')" navigate :text="__('auth.forgot_password')" />
|
|
</div>
|
|
</form>
|
|
</div>
|