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