fix settings on mobile (#1336)

This commit is contained in:
Charles 2025-05-04 09:15:12 -04:00 committed by GitHub
parent a5ffff8c8c
commit 03ec20e3a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -137,8 +137,7 @@ class Settings extends Page implements HasForms
->placeholder('/pelican.ico'), ->placeholder('/pelican.ico'),
]), ]),
Group::make() Group::make()
->columnSpan(2) ->columns(2)
->columns(4)
->schema([ ->schema([
Toggle::make('APP_DEBUG') Toggle::make('APP_DEBUG')
->label(trans('admin/setting.general.debug_mode')) ->label(trans('admin/setting.general.debug_mode'))
@ -160,6 +159,10 @@ class Settings extends Page implements HasForms
->formatStateUsing(fn ($state): bool => (bool) $state) ->formatStateUsing(fn ($state): bool => (bool) $state)
->afterStateUpdated(fn ($state, Set $set) => $set('FILAMENT_TOP_NAVIGATION', (bool) $state)) ->afterStateUpdated(fn ($state, Set $set) => $set('FILAMENT_TOP_NAVIGATION', (bool) $state))
->default(env('FILAMENT_TOP_NAVIGATION', config('panel.filament.top-navigation'))), ->default(env('FILAMENT_TOP_NAVIGATION', config('panel.filament.top-navigation'))),
]),
Group::make()
->columns(2)
->schema([
Select::make('FILAMENT_AVATAR_PROVIDER') Select::make('FILAMENT_AVATAR_PROVIDER')
->label(trans('admin/setting.general.avatar_provider')) ->label(trans('admin/setting.general.avatar_provider'))
->native(false) ->native(false)
@ -198,6 +201,12 @@ class Settings extends Page implements HasForms
->formatStateUsing(fn ($state): int => (int) $state) ->formatStateUsing(fn ($state): int => (int) $state)
->afterStateUpdated(fn ($state, Set $set) => $set('APP_2FA_REQUIRED', (int) $state)) ->afterStateUpdated(fn ($state, Set $set) => $set('APP_2FA_REQUIRED', (int) $state))
->default(env('APP_2FA_REQUIRED', config('panel.auth.2fa_required'))), ->default(env('APP_2FA_REQUIRED', config('panel.auth.2fa_required'))),
Select::make('FILAMENT_WIDTH')
->label(trans('admin/setting.general.display_width'))
->native(false)
->options(MaxWidth::class)
->selectablePlaceholder(false)
->default(env('FILAMENT_WIDTH', config('panel.filament.display-width'))),
TagsInput::make('TRUSTED_PROXIES') TagsInput::make('TRUSTED_PROXIES')
->label(trans('admin/setting.general.trusted_proxies')) ->label(trans('admin/setting.general.trusted_proxies'))
->separator() ->separator()
@ -238,12 +247,6 @@ class Settings extends Page implements HasForms
$set('TRUSTED_PROXIES', $ips->values()->all()); $set('TRUSTED_PROXIES', $ips->values()->all());
}), }),
]), ]),
Select::make('FILAMENT_WIDTH')
->label(trans('admin/setting.general.display_width'))
->native(false)
->options(MaxWidth::class)
->selectablePlaceholder(false)
->default(env('FILAMENT_WIDTH', config('panel.filament.display-width'))),
]; ];
} }