default() ->id('jabali') ->path('jabali-panel') ->login(Login::class) // ->registration() ->passwordReset() ->profile() ->defaultAvatarProvider(InitialsAvatarProvider::class) ->colors([ 'primary' => Color::Blue, ]) ->darkMode() ->brandName(fn () => DnsSetting::get('panel_name', 'Jabali')) ->favicon(asset('favicon.ico')) ->renderHook( PanelsRenderHook::HEAD_END, fn () => $this->getOpenGraphTags('Jabali Panel', 'Web hosting control panel - Manage your domains, emails, databases and more'). ''. \Illuminate\Support\Facades\Vite::useBuildDirectory('build')->withEntryPoints(['resources/js/server-charts.js'])->toHtml(). $this->getRtlScript() ) ->renderHook( PanelsRenderHook::BODY_START, fn () => (request()->routeIs('filament.jabali.auth.login') ? $this->getLoginWordCloud() : '').$this->renderImpersonationNotice() ) ->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/Jabali/Resources'), for: 'App\\Filament\\Jabali\\Resources') ->discoverPages(in: app_path('Filament/Jabali/Pages'), for: 'App\\Filament\\Jabali\\Pages') ->pages([]) ->discoverWidgets(in: app_path('Filament/Jabali/Widgets'), for: 'App\\Filament\\Jabali\\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, RedirectAdminFromUserPanel::class, ]); } protected function getRtlScript(): string { $locale = app()->getLocale(); $direction = config("languages.supported.{$locale}.direction", 'ltr'); if ($direction === 'rtl') { return ''; } return ''; } protected function renderImpersonationNotice(): string { if (! session()->has('impersonated_by')) { return ''; } $adminId = session()->get('impersonated_by'); $admin = User::find($adminId); $currentUser = auth()->user(); if (! $admin || ! $currentUser) { return ''; } $stopUrl = url('/impersonate/stop'); return << You are logged in as: {$currentUser->name} ({$currentUser->username}) Return to Admin HTML; } 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 { // "Client Dashboard" in panel supported languages (using lang/*.json Dashboard translations) $words = [ 'Client Dashboard', // English 'Panel de Cliente', // Spanish 'Painel de Controle Cliente', // Portuguese 'Tableau de bord Client', // 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); } $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: #2563eb; 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; } }