Disable reinstall action during normal server status if "skip egg install scripts" setting is enabled (#5696)

### Description

You're able to enable a "skip egg install scripts" per server, while
still being able to reinstall a server. With this setting enabled,
reinstalling a server has no functional use, the server is locked and
shutdown, then simply unlocked immediately afterwards after a success
signal from wings. This PR disables the reinstall button when skip
install scripts is enabled for both the user and admin, with a little
component telling you why you cannot reinstall. The reinstall button is
not disabled if the server is in a status that reinstall could resolve
(eg. failed install).

### Resolved issues:
1. [x] resolves pterodactyl/panel#5306
This commit is contained in:
SkyMulley
2026-08-10 11:39:22 -04:00
committed by GitHub
parent 97ed7f2042
commit 850f2b9a4f
13 changed files with 269 additions and 2 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ class DisplayException extends PterodactylException implements HttpExceptionInte
*/
public function render(Request $request): JsonResponse|RedirectResponse
{
if ($request->expectsJson()) {
if ($request->expectsJson() || $request->is('api/*')) {
return response()->json(Handler::toArray($this), $this->getStatusCode(), $this->getHeaders());
}