From 310731b3e0fe3ec1471c8e4327c19c5418f4167b Mon Sep 17 00:00:00 2001 From: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> Date: Wed, 29 Jul 2026 14:17:29 +0000 Subject: [PATCH] Expose and beautifully render service version badges next to modal window titles Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> --- app/sovran_systemsos_web/static/css/modals.css | 13 +++++++++++++ .../static/js/service-detail.js | 14 ++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/app/sovran_systemsos_web/static/css/modals.css b/app/sovran_systemsos_web/static/css/modals.css index 2161741..1345a53 100644 --- a/app/sovran_systemsos_web/static/css/modals.css +++ b/app/sovran_systemsos_web/static/css/modals.css @@ -200,6 +200,19 @@ button.btn-reboot:hover:not(:disabled) { gap: 10px; } +.creds-title-version-badge { + background-color: rgba(255, 255, 255, 0.06); + color: var(--text-secondary); + font-size: 0.72rem; + font-weight: 600; + padding: 2px 10px; + border-radius: 12px; + border: 1px solid rgba(255, 255, 255, 0.08); + letter-spacing: 0.02em; + display: inline-flex; + align-items: center; +} + .creds-title-icon { width: 28px; height: 28px; diff --git a/app/sovran_systemsos_web/static/js/service-detail.js b/app/sovran_systemsos_web/static/js/service-detail.js index da7e7d9..643c6de 100644 --- a/app/sovran_systemsos_web/static/js/service-detail.js +++ b/app/sovran_systemsos_web/static/js/service-detail.js @@ -623,6 +623,20 @@ async function openServiceDetailModal(unit, name, icon) { if (icon) url += "?icon=" + encodeURIComponent(icon); var data = await apiFetch(url); + // Append version badge next to title if version is detected + var serviceVersion = data.version || data.bitcoin_version || ''; + if (serviceVersion && $credsTitle) { + var existingBadge = $credsTitle.querySelector(".creds-title-version-badge"); + if (existingBadge) { + existingBadge.textContent = serviceVersion; + } else { + var badge = document.createElement("span"); + badge.className = "creds-title-version-badge"; + badge.textContent = serviceVersion; + $credsTitle.appendChild(badge); + } + } + // Two content buckets. For most services everything lands in `html` and is // rendered as one column, exactly as before. For Lightning Wallet // Connections the day-to-day wallet manager (html) is split away from the