Fix reboot button and overlay bugs on local machine and LAN

Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/c8d3bf30-c3ea-40e7-8da0-b4baa28eaf36

Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-13 23:41:33 +00:00
committed by GitHub
parent e33f4b570a
commit a6dc3fd647
3 changed files with 17 additions and 12 deletions

View File

@@ -157,14 +157,14 @@ function openSecurityModal() {
}
}, 1000);
rebootBtn.addEventListener("click", async function() {
rebootBtn.addEventListener("click", function() {
rebootBtn.disabled = true;
rebootBtn.textContent = "Rebooting\u2026";
try {
await apiFetch("/api/reboot", { method: "POST" });
} catch (_) {}
if ($rebootOverlay) $rebootOverlay.classList.add("visible");
setTimeout(waitForServerReboot, REBOOT_CHECK_INTERVAL);
setTimeout(waitForServerReboot, REBOOT_INITIAL_DELAY);
var rebootCtrl = new AbortController();
setTimeout(function() { rebootCtrl.abort(); }, REBOOT_REQUEST_TIMEOUT);
fetch("/api/reboot", { method: "POST", signal: rebootCtrl.signal }).catch(function() {});
}, { once: true });
}
} catch (err) {