ifnex/04_Laravel/app/Filament/Pages/Auth/Login.php
Kazem Alghasi 91984dbde3 feat(ui): redesign admin dashboard with layered grid and custom branding
Implement a comprehensive overhaul of the Filament admin dashboard,
introducing a structured 12-column responsive grid layout and enhanced
visual identity.

Key changes include:
- Redesigned Dashboard layout with a 4-layer progressive disclosure
  architecture (KPIs, Exchange Rates, Data Tables, and Trends).
- Introduced custom IFNEX design tokens via CSS, including branded
  stat cards, status badges, and improved sidebar typography.
- Enhanced FinanceOverviewWidget with real-time trend analysis and
  sparkline-ready data structures.
- Refactored RecentShipments and RecentTransactions widgets to use
  custom Blade templates for a more polished, consistent UI.
- Integrated brand assets including the company logo and custom
  authentication pages.
- Added global number formatting helpers and integrated them into
  financial widgets.
- Updated AdminPanelProvider to support custom login pages and
  brand-specific header/footer hooks.
2026-10-03 11:08:50 +03:30

65 lines
2.6 KiB
PHP

<?php
namespace App\Filament\Pages\Auth;
use Filament\Actions\Action;
use Filament\Forms\Components\Checkbox;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Pages\Auth\Login as BaseLogin;
/**
* پیج سفارشی ورود به فیلمنت با هویت بصری IFNEX.
*
* این کلاس فقط نمای سفارشی `filament.pages.auth.login` را به کلاس پایه
* اتصال می‌دهد و اسکمای فرم را برای افزودن پیشوندهای آیکون (آدرس ایمیل
* و قفل) و همچنین دکمهٔ «ورود به سیستم» بازنویسی می‌کند. هیچ‌یک از
* عملکردهای احراز هویت پایه تغییر نکرده است.
*/
class Login extends BaseLogin
{
protected static string $view = 'filament.pages.auth.login';
/**
* بازنویسی اسکمای فرم برای افزودن پیشوند آیکون به فیلدها
* و حفظ دکمهٔ چشم برای نمایش/مخفی کردن رمز عبور.
*/
public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('email')
->label(__('filament-panels::pages/auth/login.form.email.label'))
->email()
->required()
->autocomplete()
->prefixIcon('heroicon-o-at-symbol')
->extraInputAttributes(['class' => 'ifnex-login-input']),
TextInput::make('password')
->label(__('filament-panels::pages/auth/login.form.password.label'))
->password()
->revealable()
->required()
->autocomplete('current-password')
->prefixIcon('heroicon-o-lock-closed')
->extraInputAttributes(['class' => 'ifnex-login-input']),
Checkbox::make('remember')
->label(__('filament-panels::pages/auth/login.form.remember.label'))
->extraAttributes(['class' => 'ifnex-login-remember']),
])
->statePath('data');
}
/**
* بازنویسی متن دکمهٔ submit به «ورود به سیستم» و افزودن کلاس
* سفارشی برای استایل گرادیان آمبر.
*/
protected function getAuthenticateFormAction(): Action
{
return parent::getAuthenticateFormAction()
->label('ورود به سیستم')
->extraAttributes(['class' => 'ifnex-login-submit w-full']);
}
}