Fix Restart application button doing nothing after confirmation (v0.16.23)

This commit is contained in:
marvin
2026-09-19 12:40:40 -04:00
parent ededa5a76f
commit 5ac088025a
5 changed files with 8 additions and 5 deletions
+2 -1
View File
@@ -604,8 +604,9 @@ function renderSystemPanel() {
finally { button.disabled = false; button.textContent = original; }
});
panel.querySelector("#system-restart").addEventListener("click", async event => {
const button = event.currentTarget;
if (!await themedConfirm("Restart Site Gateway?", "The application will stop and restart. This takes a few seconds and briefly interrupts hosted sites and the dashboard.", "Restart")) return;
const button = event.currentTarget; button.disabled = true; button.textContent = "Restarting\u2026";
button.disabled = true; button.textContent = "Restarting\u2026";
try { await api("/api/system/restart", { method: "POST" }); toast("Restarting \u2014 this dashboard will be unavailable briefly."); }
catch (error) { toast(error.message, "error"); button.disabled = false; button.textContent = "Restart application"; }
});
+2 -2
View File
@@ -8,7 +8,7 @@
<title>Site Gateway</title>
<meta name="description" content="Host sites, proxy services, and manage HTTPS from one simple dashboard.">
<link rel="icon" type="image/png" href="/site-gateway-icon-approved.png">
<link rel="stylesheet" href="/styles.css?v=0.16.22">
<link rel="stylesheet" href="/styles.css?v=0.16.23">
</head>
<!-- ================================================================
@@ -434,6 +434,6 @@
<div id="toast" class="toast" role="status"></div>
<div id="update-banner" class="update-banner hidden" role="status"><span>A new version of Site Gateway is available.</span><div class="update-banner-actions"><button id="update-banner-refresh" class="button primary">Refresh</button><button id="update-banner-dismiss" class="text-button">Dismiss</button></div></div>
<!-- App scripts: core (app.js) then extended views/admin (features.js) -->
<script src="/app.js?v=0.16.22" defer></script><script src="/features.js?v=0.16.22" defer></script><script src="/select-enhance.js?v=0.16.22" defer></script>
<script src="/app.js?v=0.16.23" defer></script><script src="/features.js?v=0.16.23" defer></script><script src="/select-enhance.js?v=0.16.23" defer></script>
</body>
</html>