id('admin') ->path('jabali-admin') ->authGuard('admin') ->login(AdminLogin::class) ->passwordReset() ->defaultAvatarProvider(InitialsAvatarProvider::class) ->colors([ 'primary' => Color::Red, ]) ->darkMode() ->brandName(fn () => $this->getAdminBrandName()) ->brandLogo(fn () => ($logo = DnsSetting::get('custom_logo')) ? asset('storage/'.$logo) : asset('images/jabali_logo.svg')) ->darkModeBrandLogo(fn () => ($logo = DnsSetting::get('custom_logo')) ? asset('storage/'.$logo) : asset('images/jabali_logo_dark.svg')) ->brandLogoHeight('2rem') ->favicon(asset('favicon.ico')) ->renderHook( PanelsRenderHook::HEAD_END, fn () => $this->getOpenGraphTags($this->getAdminBrandName(), 'Server administration panel for Jabali - Manage your hosting infrastructure'). \Illuminate\Support\Facades\Vite::useBuildDirectory('build')->withEntryPoints(['resources/css/app.css', 'resources/js/server-charts.js'])->toHtml(). $this->getRtlScript() ) ->renderHook( PanelsRenderHook::BODY_START, fn () => request()->routeIs('filament.admin.auth.login') ? $this->getLoginWordCloud() : '' ) ->renderHook( PanelsRenderHook::FOOTER, fn () => view('vendor.filament-panels.components.footer') ) ->renderHook( PanelsRenderHook::USER_MENU_BEFORE, fn () => view('components.language-switcher') ) ->discoverResources(in: app_path('Filament/Admin/Resources'), for: 'App\\Filament\\Admin\\Resources') ->discoverPages(in: app_path('Filament/Admin/Pages'), for: 'App\\Filament\\Admin\\Pages') ->pages([ Dashboard::class, ]) ->discoverWidgets(in: app_path('Filament/Admin/Widgets'), for: 'App\\Filament\\Admin\\Widgets') ->widgets([ AccountWidget::class, ]) ->middleware([ EncryptCookies::class, AddQueuedCookiesToResponse::class, StartSession::class, AuthenticateSession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, SubstituteBindings::class, DisableBladeIconComponents::class, DispatchServingFilamentEvent::class, SetLocale::class, ]) ->authMiddleware([ Authenticate::class, ]); } protected function getRtlScript(): string { $locale = app()->getLocale(); $direction = config("languages.supported.{$locale}.direction", 'ltr'); if ($direction === 'rtl') { return ''; } return ''; } protected function getAdminBrandName(): string { $brandName = DnsSetting::get('panel_name', 'Jabali'); $cleaned = trim((string) preg_replace('/\\s*Admin\\s*$/i', '', $brandName)); return $cleaned !== '' ? $cleaned : 'Jabali'; } protected function getOpenGraphTags(string $title, string $description): string { $url = url()->current(); $image = asset('images/og-image.png'); $siteName = DnsSetting::get('panel_name', 'Jabali'); return << HTML; } protected function getLoginWordCloud(): string { // "Administrator" in panel supported languages (from lang/*.json) $words = [ 'Administrator', // English 'Administrador', // Spanish & Portuguese 'Administrateur', // French 'Администратор', // Russian 'מנהל', // Hebrew 'مشرف', // Arabic ]; // Generate rows with randomized words for varied pattern $rows = ''; for ($row = 0; $row < 50; $row++) { $rowContent = ''; $shuffled = $words; shuffle($shuffled); for ($col = 0; $col < 20; $col++) { $word = $shuffled[$col % count($shuffled)]; if ($col % 3 === 0) { shuffle($shuffled); } // Re-shuffle periodically $rowContent .= $word.' · '; } $rows .= "
{$rowContent}
"; } return << .word-pattern-container { position: fixed; top: 50%; left: 50%; width: 300vw; height: 300vh; overflow: visible; pointer-events: none; z-index: -1; transform: translate(-50%, -50%) rotate(-25deg); display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0.08; } .pattern-row { white-space: nowrap; font-size: 16px; font-weight: 700; color: #dc2626; font-family: "Segoe UI", Arial, "Noto Sans", "Noto Sans Arabic", "Noto Sans Hebrew", sans-serif; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.5; } .pattern-row:nth-child(even) { margin-left: 120px; } .fi-simple-layout { position: relative; z-index: 1; } .fi-simple-main { position: relative; z-index: 10; } .fi-simple-main-ctn { position: relative; z-index: 10; }
{$rows}
HTML; } }