File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ protected function setUp(): void
4949
5050 $ this ->hintIcon (TablerIcon::Code, fn (StartupVariable $ component ) => implode ('| ' , $ component ->getVariableRules ()));
5151
52- $ this ->helperText (fn (StartupVariable $ component ) => ! $ component -> getVariableDesc () ? ' — ' : $ component ->getVariableDesc ());
52+ $ this ->helperText (fn (StartupVariable $ component ) => $ component ->getVariableDesc ());
5353
5454 $ this ->rules (fn (StartupVariable $ component ) => $ component ->getVariableRules ());
5555
@@ -70,7 +70,7 @@ public function getDefaultStateCasts(): array
7070 ],
7171 StartupVariableType::Toggle => [
7272 ...parent ::getDefaultStateCasts (),
73- new BooleanStateCast (false ),
73+ new BooleanStateCast (false , true ),
7474 ],
7575 default => parent ::getDefaultStateCasts ()
7676 };
Original file line number Diff line number Diff line change @@ -149,12 +149,16 @@ public static function canAccess(): bool
149149 return parent ::canAccess () && user ()?->can(SubuserPermission::StartupRead, Filament::getTenant ());
150150 }
151151
152- public function update (? string $ state , ServerVariable $ serverVariable ): void
152+ public function update (null | string | bool $ state , ServerVariable $ serverVariable ): void
153153 {
154154 if (!$ serverVariable ->variable ->user_editable ) {
155155 return ;
156156 }
157157
158+ if (is_bool ($ state )) {
159+ $ state = $ state ? '1 ' : '0 ' ;
160+ }
161+
158162 $ original = $ serverVariable ->variable_value ;
159163
160164 try {
You can’t perform that action at this time.
0 commit comments