File tree Expand file tree Collapse file tree 12 files changed +94
-3
lines changed
Expand file tree Collapse file tree 12 files changed +94
-3
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,13 @@ public function render(): View
4141 ->layout (static ::$ layout , $ this ->getLayoutData ());
4242 }
4343
44+ protected function getMaxContentWidth (): string
45+ {
46+ $ settings = new GeneralSettings ();
47+
48+ return $ settings ->content_width ;
49+ }
50+
4451 protected function getActions (): array
4552 {
4653 return [
Original file line number Diff line number Diff line change @@ -26,6 +26,13 @@ class GeneralPage extends SettingsPage
2626
2727 protected static string $ settings = GeneralSettings::class;
2828
29+ protected function getMaxContentWidth (): string
30+ {
31+ $ settings = new GeneralSettings ();
32+
33+ return $ settings ->content_width ;
34+ }
35+
2936 protected function getFormSchema (): array
3037 {
3138 return [
@@ -53,6 +60,11 @@ protected function getFormSchema(): array
5360 ->placeholder ('M j, Y G:i:s ' )
5461 ->maxLength (25 )
5562 ->required (),
63+ Select::make ('content_width ' )
64+ ->options ([
65+ '7xl ' => 'Default width ' ,
66+ 'full ' => 'Full width ' ,
67+ ]),
5668 ])
5769 ->compact ()
5870 ->columns ([
Original file line number Diff line number Diff line change 22
33namespace App \Filament \Pages \Settings ;
44
5+ use App \Settings \GeneralSettings ;
56use App \Settings \InfluxDbSettings ;
67use Closure ;
78use Filament \Forms \Components \Grid ;
@@ -24,6 +25,13 @@ class InfluxDbPage extends SettingsPage
2425
2526 protected static string $ settings = InfluxDbSettings::class;
2627
28+ protected function getMaxContentWidth (): string
29+ {
30+ $ settings = new GeneralSettings ();
31+
32+ return $ settings ->content_width ;
33+ }
34+
2735 protected function getFormSchema (): array
2836 {
2937 return [
Original file line number Diff line number Diff line change 66use App \Forms \Components \TestMailNotification ;
77use App \Forms \Components \TestTelegramNotification ;
88use App \Mail \Test ;
9+ use App \Settings \GeneralSettings ;
910use App \Settings \NotificationSettings ;
1011use App \Telegram \TelegramNotification ;
1112use Closure ;
@@ -35,6 +36,13 @@ class NotificationPage extends SettingsPage
3536
3637 protected static string $ settings = NotificationSettings::class;
3738
39+ protected function getMaxContentWidth (): string
40+ {
41+ $ settings = new GeneralSettings ();
42+
43+ return $ settings ->content_width ;
44+ }
45+
3846 protected function getFormSchema (): array
3947 {
4048 return [
Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ class ThresholdsPage extends SettingsPage
2727
2828 protected static string $ settings = ThresholdSettings::class;
2929
30+ protected function getMaxContentWidth (): string
31+ {
32+ $ settings = new GeneralSettings ();
33+
34+ return $ settings ->content_width ;
35+ }
36+
3037 protected function getFormSchema (): array
3138 {
3239 return [
Original file line number Diff line number Diff line change 33namespace App \Filament \Resources \ResultResource \Pages ;
44
55use App \Filament \Resources \ResultResource ;
6+ use App \Settings \GeneralSettings ;
67use Filament \Resources \Pages \ListRecords ;
78
89class ListResults extends ListRecords
@@ -14,6 +15,13 @@ protected function getTablePollingInterval(): ?string
1415 return '5s ' ;
1516 }
1617
18+ protected function getMaxContentWidth (): string
19+ {
20+ $ settings = new GeneralSettings ();
21+
22+ return $ settings ->content_width ;
23+ }
24+
1725 protected function getHeaderWidgets (): array
1826 {
1927 return ResultResource::getWidgets ();
Original file line number Diff line number Diff line change 33namespace App \Filament \Resources \UserResource \Pages ;
44
55use App \Filament \Resources \UserResource ;
6+ use App \Settings \GeneralSettings ;
67use Filament \Resources \Pages \CreateRecord ;
78
89class CreateUser extends CreateRecord
910{
1011 protected static string $ resource = UserResource::class;
12+
13+ protected function getMaxContentWidth (): string
14+ {
15+ $ settings = new GeneralSettings ();
16+
17+ return $ settings ->content_width ;
18+ }
1119}
Original file line number Diff line number Diff line change 33namespace App \Filament \Resources \UserResource \Pages ;
44
55use App \Filament \Resources \UserResource ;
6+ use App \Settings \GeneralSettings ;
67use Filament \Pages \Actions ;
78use Filament \Resources \Pages \EditRecord ;
89use Illuminate \Support \Facades \Hash ;
@@ -11,6 +12,13 @@ class EditUser extends EditRecord
1112{
1213 protected static string $ resource = UserResource::class;
1314
15+ protected function getMaxContentWidth (): string
16+ {
17+ $ settings = new GeneralSettings ();
18+
19+ return $ settings ->content_width ;
20+ }
21+
1422 protected function getActions (): array
1523 {
1624 return [
Original file line number Diff line number Diff line change 33namespace App \Filament \Resources \UserResource \Pages ;
44
55use App \Filament \Resources \UserResource ;
6+ use App \Settings \GeneralSettings ;
67use Filament \Pages \Actions ;
78use Filament \Resources \Pages \ListRecords ;
89
910class ListUsers extends ListRecords
1011{
1112 protected static string $ resource = UserResource::class;
1213
14+ protected function getMaxContentWidth (): string
15+ {
16+ $ settings = new GeneralSettings ();
17+
18+ return $ settings ->content_width ;
19+ }
20+
1321 protected function getActions (): array
1422 {
1523 return [
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ class GeneralSettings extends Settings
88{
99 public bool $ auth_enabled ;
1010
11+ public string $ content_width ;
12+
1113 public ?string $ speedtest_schedule ;
1214
1315 /** @var string[] */
You can’t perform that action at this time.
0 commit comments