Must use Closure since MenuItem does not leverage Concerns (#1181)

* Must use `Closure` since `MenuItem` does not leverage Concerns

* Translate `Profile` in `ServerPanelProvider`

Co-authored-by: Boy132 <Boy132@users.noreply.github.com>

---------

Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
This commit is contained in:
MartinOscar 2025-03-28 12:50:34 +01:00 committed by GitHub
parent db3b16e609
commit c39c29e50b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -40,9 +40,11 @@ class AdminPanelProvider extends PanelProvider
->maxContentWidth(config('panel.filament.display-width', 'screen-2xl')) ->maxContentWidth(config('panel.filament.display-width', 'screen-2xl'))
->login(Login::class) ->login(Login::class)
->userMenuItems([ ->userMenuItems([
'profile' => MenuItem::make()->label(trans('filament-panels::pages.auth.edit-profile.label'))->url(fn () => EditProfile::getUrl(panel: 'app')), 'profile' => MenuItem::make()
->label(fn () => trans('filament-panels::pages/auth/edit-profile.label'))
->url(fn () => EditProfile::getUrl(panel: 'app')),
MenuItem::make() MenuItem::make()
->label(trans('profile.exit_admin')) ->label(fn () => trans('profile.exit_admin'))
->url('/') ->url('/')
->icon('tabler-arrow-back') ->icon('tabler-arrow-back')
->sort(24), ->sort(24),

View File

@ -43,7 +43,9 @@ class ServerPanelProvider extends PanelProvider
->maxContentWidth(config('panel.filament.display-width', 'screen-2xl')) ->maxContentWidth(config('panel.filament.display-width', 'screen-2xl'))
->login(Login::class) ->login(Login::class)
->userMenuItems([ ->userMenuItems([
'profile' => MenuItem::make()->label('Profile')->url(fn () => EditProfile::getUrl(panel: 'app')), 'profile' => MenuItem::make()
->label(fn () => trans('filament-panels::pages/auth/edit-profile.label'))
->url(fn () => EditProfile::getUrl(panel: 'app')),
MenuItem::make() MenuItem::make()
->label('Server List') ->label('Server List')
->icon('tabler-brand-docker') ->icon('tabler-brand-docker')