Add redirect after clicking reinstall (#1126)

This commit is contained in:
Boy132 2025-03-18 17:35:01 +01:00 committed by GitHub
parent f8d119b458
commit 517f17cbcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -192,7 +192,7 @@ class Settings extends ServerFormPage
]), ]),
Section::make('Reinstall Server') Section::make('Reinstall Server')
->hidden(fn () => !auth()->user()->can(Permission::ACTION_SETTINGS_REINSTALL, $server)) ->hidden(fn () => !auth()->user()->can(Permission::ACTION_SETTINGS_REINSTALL, $server))
->collapsible()->collapsed() ->collapsible()
->footerActions([ ->footerActions([
Action::make('reinstall') Action::make('reinstall')
->color('danger') ->color('danger')
@ -226,6 +226,8 @@ class Settings extends ServerFormPage
->success() ->success()
->title('Server Reinstall started') ->title('Server Reinstall started')
->send(); ->send();
redirect(Console::getUrl());
}), }),
]) ])
->footerActionsAlignment(Alignment::Right) ->footerActionsAlignment(Alignment::Right)
@ -257,7 +259,6 @@ class Settings extends ServerFormPage
Notification::make() Notification::make()
->success() ->success()
->duration(5000) // 5 seconds
->title('Updated Server Name') ->title('Updated Server Name')
->body(fn () => $original . ' -> ' . $name) ->body(fn () => $original . ' -> ' . $name)
->send(); ->send();
@ -289,7 +290,6 @@ class Settings extends ServerFormPage
Notification::make() Notification::make()
->success() ->success()
->duration(5000) // 5 seconds
->title('Updated Server Description') ->title('Updated Server Description')
->body(fn () => $original . ' -> ' . $description) ->body(fn () => $original . ' -> ' . $description)
->send(); ->send();