feat: move Reboot button from sidebar to header, between role badge and Sign Out

This commit is contained in:
copilot-swe-agent[bot]
2026-07-15 18:58:10 +00:00
committed by GitHub
parent 599405ce18
commit 59b734995b
6 changed files with 34 additions and 32 deletions
@@ -48,6 +48,9 @@ if ($upgradeModal) $upgradeModal.addEventListener("click", function(e) { if (e.t
if ($restartConfirmCancel) $restartConfirmCancel.addEventListener("click", closeRestartConfirmDialog);
if ($restartConfirmModal) $restartConfirmModal.addEventListener("click", function(e) { if (e.target === $restartConfirmModal) closeRestartConfirmDialog(); });
if ($restartConfirmModal) $restartConfirmModal.addEventListener("keydown", function(e) { if (e.key === "Escape") closeRestartConfirmDialog(); });
// Header Reboot button
if ($headerRebootBtn) $headerRebootBtn.addEventListener("click", function() { openRestartConfirmDialog(); });
if ($restartConfirmOk) $restartConfirmOk.addEventListener("click", function() {
if ($restartConfirmOk.disabled) return;
$restartConfirmOk.disabled = true;
@@ -110,5 +110,8 @@ const $restartConfirmOk = document.getElementById("restart-confirm-ok-btn");
const $restartConfirmCancel = document.getElementById("restart-confirm-cancel-btn");
const $restartConflictBox = document.getElementById("restart-conflict-box");
// Header reboot button
const $headerRebootBtn = document.getElementById("btn-header-reboot");
// System status banner
// (removed — health is now shown per-tile via the composite health field)
@@ -133,23 +133,6 @@ function renderSidebarSupport(supportServices) {
var hr = document.createElement("hr");
hr.className = "sidebar-divider";
$sidebarSupport.appendChild(hr);
// ── Restart Entire System button (bottom, visually separated)
var restartDivider = document.createElement("hr");
restartDivider.className = "sidebar-divider";
$sidebarSupport.appendChild(restartDivider);
var restartBtn = document.createElement("button");
restartBtn.className = "sidebar-support-btn sidebar-restart-btn";
restartBtn.id = "sidebar-btn-restart";
restartBtn.innerHTML =
'<span class="sidebar-support-icon sidebar-restart-icon" aria-hidden="true">\u21BB</span>' +
'<span class="sidebar-support-text">' +
'<span class="sidebar-support-title">Restart Entire System</span>' +
'<span class="sidebar-support-hint sidebar-restart-hint">Restarts the computer, desktop, and all services</span>' +
'</span>';
restartBtn.addEventListener("click", function() { openRestartConfirmDialog(); });
$sidebarSupport.appendChild(restartBtn);
}
function buildTile(svc) {