diff --git a/app/sovran_systemsos_web/static/css/layout.css b/app/sovran_systemsos_web/static/css/layout.css index 1e062b0..a295be6 100644 --- a/app/sovran_systemsos_web/static/css/layout.css +++ b/app/sovran_systemsos_web/static/css/layout.css @@ -358,11 +358,19 @@ .welcome-cards { display: grid; - grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + grid-template-columns: repeat(2, 1fr); + grid-auto-rows: 1fr; /* both rows share the taller height → uniform cards */ gap: 16px; margin-top: 34px; } +/* Three cards (Desktop-only role, no Bitcoin card) → one symmetric row */ +@media (min-width: 681px) { + .welcome-cards:not(:has(#w-btc)) { + grid-template-columns: repeat(3, 1fr); + } +} + /* wrappers whose children become grid items */ .welcome-dyn { display: contents; } @@ -384,7 +392,7 @@ } .w-network .ip-value { - font-size: 0.82rem; + font-size: 0.8rem; font-weight: 600; color: var(--text); } @@ -408,9 +416,11 @@ position: relative; overflow: hidden; min-width: 0; + min-height: 88px; /* uniform card height everywhere */ } .widget:hover { border-color: var(--border-strong); } +.widget.clickable:hover { transform: translateY(-1px); } .widget.clickable { cursor: pointer; } .widget.clickable:focus-visible { @@ -465,11 +475,10 @@ .widget .sub { margin-top: 4px; - font-size: 0.78rem; + font-size: 0.8rem; + line-height: 1.45; color: var(--text-2); - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; + overflow-wrap: anywhere; } .widget .sub b { color: var(--text); font-weight: 650; } @@ -491,22 +500,6 @@ transition: width 0.6s cubic-bezier(0.3, 0.7, 0.3, 1); } -.w-chev { - margin-left: auto; - width: 30px; - height: 30px; - border-radius: 50%; - display: grid; - place-items: center; - color: var(--text-3); - flex-shrink: 0; -} - -.w-chev svg { width: 15px; height: 15px; } -.widget.clickable:hover .w-chev { - color: var(--text-2); - background: rgba(255, 255, 255, 0.07); -} /* ── Tiles area ─────────────────────────────────────────────────── */ diff --git a/app/sovran_systemsos_web/static/js/dashboard.js b/app/sovran_systemsos_web/static/js/dashboard.js index 50a2e71..56a5c66 100644 --- a/app/sovran_systemsos_web/static/js/dashboard.js +++ b/app/sovran_systemsos_web/static/js/dashboard.js @@ -232,7 +232,6 @@ '
' + '
' + icon("g-pulse") + '
' + '

' + attentionTitle + '

' + sub + '
' + - '' + icon("g-chev") + '' + '
'; var wSys = document.getElementById("w-systems"); @@ -259,7 +258,6 @@ '

' + escHtml(btc.name) + ' — syncing timechain

' + '
' + '
Block ' + blocks + ' · ' + pct + '% · ' + escHtml(eta) + '
' + - '' + icon("g-chev") + '' + ''; } else { var btcDone = null; @@ -270,20 +268,31 @@ '
' + '
' + '

' + escHtml(btcDone.name) + '

Fully synced' + (blk ? ' · Block ' + blk + '' : '') + '
' + - '' + icon("g-chev") + '' + '
'; } } - /* Updates */ + /* Updates — mirror the sidebar's read of the update state, so the card + never claims "up to date" while an update failed or needs a restart */ var upd = (typeof window._lastUpdateCheck === "object" && window._lastUpdateCheck) ? window._lastUpdateCheck : null; - var hasUpdates = !!(upd && upd.available); + var updStatus = (upd && upd.status) || "idle"; + var updTitle, updSub, updChip; + if (updStatus === "failed") { + updTitle = "Update failed"; updSub = "Click to retry the update"; updChip = "chip-amber"; + } else if (updStatus === "reboot_required") { + updTitle = "Restart required"; updSub = "Click to restart and finish the update"; updChip = "chip-amber"; + } else if (updStatus === "running") { + updTitle = "Update in progress"; updSub = "Installing the new system generation"; updChip = "chip-amber"; + } else if (upd && upd.available) { + updTitle = "Updates available"; updSub = "Click to review and update"; updChip = "chip-amber"; + } else { + updTitle = "System is up to date"; updSub = "Sovran_SystemsOS keeps itself current"; updChip = "chip-green"; + } more += '
' + - '
' + icon("g-update") + '
' + - '

' + (hasUpdates ? "Updates available" : "System is up to date") + '

' + - '
' + (hasUpdates ? 'Click to review and update' : 'Sovran_SystemsOS keeps itself current') + '
' + - '' + icon("g-chev") + '' + + '
' + icon("g-update") + '
' + + '

' + updTitle + '

' + + '
' + updSub + '
' + '
'; $wcMore.innerHTML = more;