Skip to content

Commit

Permalink
Add config value for display width to other pages (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy132 authored Dec 6, 2024
1 parent 066bdbd commit b50acfd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/Filament/Pages/Installer/PanelInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class PanelInstaller extends SimplePage implements HasForms

public function getMaxWidth(): MaxWidth|string
{
return MaxWidth::SevenExtraLarge;
return config('panel.filament.display-width', 'screen-2xl');
}

public static function isInstalled(): bool
Expand Down
5 changes: 3 additions & 2 deletions app/Filament/Resources/UserResource/Pages/EditProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use Filament\Forms\Components\TextInput;
use Filament\Forms\Get;
use Filament\Notifications\Notification;
use Filament\Pages\Auth\EditProfile as BaseEditProfile;
use Filament\Support\Enums\MaxWidth;
use Filament\Support\Exceptions\Halt;
use Illuminate\Database\Eloquent\Builder;
Expand All @@ -42,7 +43,7 @@
/**
* @method User getUser()
*/
class EditProfile extends \Filament\Pages\Auth\EditProfile
class EditProfile extends BaseEditProfile
{
private ToggleTwoFactorService $toggleTwoFactorService;

Expand All @@ -53,7 +54,7 @@ public function boot(ToggleTwoFactorService $toggleTwoFactorService): void

public function getMaxWidth(): MaxWidth|string
{
return MaxWidth::SevenExtraLarge;
return config('panel.filament.display-width', 'screen-2xl');
}

protected function getForms(): array
Expand Down
3 changes: 1 addition & 2 deletions app/Providers/Filament/ServerPanelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Filament\Navigation\NavigationItem;
use Filament\Panel;
use Filament\PanelProvider;
use Filament\Support\Enums\MaxWidth;
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
use Illuminate\Cookie\Middleware\EncryptCookies;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
Expand All @@ -40,7 +39,7 @@ public function panel(Panel $panel): Panel
->brandLogoHeight('2rem')
->favicon(config('app.favicon', '/pelican.ico'))
->topNavigation(config('panel.filament.top-navigation', true))
->maxContentWidth(MaxWidth::ScreenTwoExtraLarge)
->maxContentWidth(config('panel.filament.display-width', 'screen-2xl'))
->login(Login::class)
->userMenuItems([
'profile' => MenuItem::make()->label('Profile')->url(fn () => EditProfile::getUrl(panel: 'app')),
Expand Down

0 comments on commit b50acfd

Please sign in to comment.