{{ __('Sign in to your panel account.') }}
{{ __("Don't have an account?") }} {{ __('Create one') }}
@endunless {{-- Demo quick-login (only in non-production / when demo mode is on) --}} {{-- OWNER panel only: on a reseller's storefront this would publish the system owner's credentials on a public page that isn't theirs. --}} @if (config('redfamosa.demo_mode', false) && ! current_panel()?->isReseller()) @php $demoPassword = (string) config('redfamosa.demo_password', 'demo1234'); // Resolved from the DATABASE, never a hard-coded list. The addresses // differ in every install — the administrator's is whatever was typed // into the installer, and the rest come from the demo seed — so a fixed // list produced buttons that filled in accounts which do not exist and // bounced off the login form. $demoAccounts = collect([ ['super_admin', __('Super Admin'), '#7c3aed'], ['staff', __('Staff / Support'), '#0891b2'], ['reseller_admin', __('Reseller Admin'), '#16a34a'], ['reseller_staff', __('Reseller Staff'), '#b45309'], ['client', __('Client'), '#e11d48'], ])->map(function (array $row) { [$role, $label, $colour] = $row; // A role that does not exist makes User::role() throw, and this is // the LOGIN page: an exception here locks the operator out of their // own panel with a 500 and no way back except editing files. A // missing role must cost its button, nothing more. try { $email = \App\Models\User::role($role)->orderBy('id')->value('email'); } catch (\Throwable) { return null; } return $email ? [$label, $email, $colour] : null; })->filter()->values(); @endphp @if ($demoAccounts->isNotEmpty()){{ __('Quick access — demo accounts') }}