Merge pull request #327 from naturallaw777/copilot/remove-restart-sidebar-action
Move Reboot from sidebar to compact header button
This commit is contained in:
@@ -91,3 +91,30 @@
|
|||||||
border-color: var(--accent-color);
|
border-color: var(--accent-color);
|
||||||
color: var(--accent-color);
|
color: var(--accent-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Header reboot button ───────────────────────────────────────── */
|
||||||
|
|
||||||
|
.btn-header-reboot {
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid rgba(184, 125, 0, 0.35);
|
||||||
|
color: #c98d08;
|
||||||
|
font-size: 0.78rem;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 4px 12px;
|
||||||
|
border-radius: var(--radius-btn);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: border-color 0.15s, color 0.15s, background-color 0.15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-header-reboot:hover {
|
||||||
|
border-color: #b87d00;
|
||||||
|
color: #e0a010;
|
||||||
|
background-color: rgba(184, 125, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.btn-header-reboot {
|
||||||
|
padding: 4px 8px;
|
||||||
|
font-size: 0.72rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -84,21 +84,6 @@
|
|||||||
margin: 16px 0;
|
margin: 16px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Sidebar restart button (amber/muted treatment) ─────────────── */
|
|
||||||
|
|
||||||
.sidebar-restart-btn {
|
|
||||||
border-color: rgba(184, 125, 0, 0.25);
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-restart-btn:hover {
|
|
||||||
border-color: #b87d00;
|
|
||||||
background-color: rgba(184, 125, 0, 0.08);
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-restart-btn .sidebar-restart-hint {
|
|
||||||
color: #c98d08;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ── Upgrade modal ──────────────────────────────────────────────── */
|
/* ── Upgrade modal ──────────────────────────────────────────────── */
|
||||||
|
|
||||||
.upgrade-dialog {
|
.upgrade-dialog {
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ if ($upgradeModal) $upgradeModal.addEventListener("click", function(e) { if (e.t
|
|||||||
if ($restartConfirmCancel) $restartConfirmCancel.addEventListener("click", closeRestartConfirmDialog);
|
if ($restartConfirmCancel) $restartConfirmCancel.addEventListener("click", closeRestartConfirmDialog);
|
||||||
if ($restartConfirmModal) $restartConfirmModal.addEventListener("click", function(e) { if (e.target === $restartConfirmModal) 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(); });
|
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) $restartConfirmOk.addEventListener("click", function() {
|
||||||
if ($restartConfirmOk.disabled) return;
|
if ($restartConfirmOk.disabled) return;
|
||||||
$restartConfirmOk.disabled = true;
|
$restartConfirmOk.disabled = true;
|
||||||
|
|||||||
@@ -110,5 +110,8 @@ const $restartConfirmOk = document.getElementById("restart-confirm-ok-btn");
|
|||||||
const $restartConfirmCancel = document.getElementById("restart-confirm-cancel-btn");
|
const $restartConfirmCancel = document.getElementById("restart-confirm-cancel-btn");
|
||||||
const $restartConflictBox = document.getElementById("restart-conflict-box");
|
const $restartConflictBox = document.getElementById("restart-conflict-box");
|
||||||
|
|
||||||
|
// Header reboot button
|
||||||
|
const $headerRebootBtn = document.getElementById("btn-header-reboot");
|
||||||
|
|
||||||
// System status banner
|
// System status banner
|
||||||
// (removed — health is now shown per-tile via the composite health field)
|
// (removed — health is now shown per-tile via the composite health field)
|
||||||
@@ -133,23 +133,6 @@ function renderSidebarSupport(supportServices) {
|
|||||||
var hr = document.createElement("hr");
|
var hr = document.createElement("hr");
|
||||||
hr.className = "sidebar-divider";
|
hr.className = "sidebar-divider";
|
||||||
$sidebarSupport.appendChild(hr);
|
$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) {
|
function buildTile(svc) {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
<span class="title">Sovran_SystemsOS Hub</span>
|
<span class="title">Sovran_SystemsOS Hub</span>
|
||||||
<div class="header-buttons">
|
<div class="header-buttons">
|
||||||
<span class="role-badge" id="role-badge">Loading…</span>
|
<span class="role-badge" id="role-badge">Loading…</span>
|
||||||
|
<button class="btn btn-header-reboot" id="btn-header-reboot" title="Restart the entire computer">Reboot</button>
|
||||||
<button class="btn btn-logout" id="btn-logout" title="Sign out">Sign Out</button>
|
<button class="btn btn-logout" id="btn-logout" title="Sign out">Sign Out</button>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
Reference in New Issue
Block a user