mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-19 21:04:44 +02:00
Add config value for display width to other pages (#770)
This commit is contained in:
parent
066bdbdf78
commit
b50acfdba2
@ -42,7 +42,7 @@ class PanelInstaller extends SimplePage implements HasForms
|
|||||||
|
|
||||||
public function getMaxWidth(): MaxWidth|string
|
public function getMaxWidth(): MaxWidth|string
|
||||||
{
|
{
|
||||||
return MaxWidth::SevenExtraLarge;
|
return config('panel.filament.display-width', 'screen-2xl');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function isInstalled(): bool
|
public static function isInstalled(): bool
|
||||||
|
@ -29,6 +29,7 @@ use Filament\Forms\Components\Textarea;
|
|||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
use Filament\Forms\Get;
|
use Filament\Forms\Get;
|
||||||
use Filament\Notifications\Notification;
|
use Filament\Notifications\Notification;
|
||||||
|
use Filament\Pages\Auth\EditProfile as BaseEditProfile;
|
||||||
use Filament\Support\Enums\MaxWidth;
|
use Filament\Support\Enums\MaxWidth;
|
||||||
use Filament\Support\Exceptions\Halt;
|
use Filament\Support\Exceptions\Halt;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
@ -42,7 +43,7 @@ use Laravel\Socialite\Facades\Socialite;
|
|||||||
/**
|
/**
|
||||||
* @method User getUser()
|
* @method User getUser()
|
||||||
*/
|
*/
|
||||||
class EditProfile extends \Filament\Pages\Auth\EditProfile
|
class EditProfile extends BaseEditProfile
|
||||||
{
|
{
|
||||||
private ToggleTwoFactorService $toggleTwoFactorService;
|
private ToggleTwoFactorService $toggleTwoFactorService;
|
||||||
|
|
||||||
@ -53,7 +54,7 @@ class EditProfile extends \Filament\Pages\Auth\EditProfile
|
|||||||
|
|
||||||
public function getMaxWidth(): MaxWidth|string
|
public function getMaxWidth(): MaxWidth|string
|
||||||
{
|
{
|
||||||
return MaxWidth::SevenExtraLarge;
|
return config('panel.filament.display-width', 'screen-2xl');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getForms(): array
|
protected function getForms(): array
|
||||||
|
@ -16,7 +16,6 @@ use Filament\Navigation\MenuItem;
|
|||||||
use Filament\Navigation\NavigationItem;
|
use Filament\Navigation\NavigationItem;
|
||||||
use Filament\Panel;
|
use Filament\Panel;
|
||||||
use Filament\PanelProvider;
|
use Filament\PanelProvider;
|
||||||
use Filament\Support\Enums\MaxWidth;
|
|
||||||
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
||||||
use Illuminate\Cookie\Middleware\EncryptCookies;
|
use Illuminate\Cookie\Middleware\EncryptCookies;
|
||||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
|
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
|
||||||
@ -40,7 +39,7 @@ class ServerPanelProvider extends PanelProvider
|
|||||||
->brandLogoHeight('2rem')
|
->brandLogoHeight('2rem')
|
||||||
->favicon(config('app.favicon', '/pelican.ico'))
|
->favicon(config('app.favicon', '/pelican.ico'))
|
||||||
->topNavigation(config('panel.filament.top-navigation', true))
|
->topNavigation(config('panel.filament.top-navigation', true))
|
||||||
->maxContentWidth(MaxWidth::ScreenTwoExtraLarge)
|
->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('Profile')->url(fn () => EditProfile::getUrl(panel: 'app')),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user