Expose and beautifully render service version badges next to modal window titles

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
This commit is contained in:
naturallaw777
2026-07-29 14:17:29 +00:00
co-authored by arena-agent
parent dec0aebc95
commit 310731b3e0
2 changed files with 27 additions and 0 deletions
@@ -200,6 +200,19 @@ button.btn-reboot:hover:not(:disabled) {
gap: 10px; 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 { .creds-title-icon {
width: 28px; width: 28px;
height: 28px; height: 28px;
@@ -623,6 +623,20 @@ async function openServiceDetailModal(unit, name, icon) {
if (icon) url += "?icon=" + encodeURIComponent(icon); if (icon) url += "?icon=" + encodeURIComponent(icon);
var data = await apiFetch(url); 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 // Two content buckets. For most services everything lands in `html` and is
// rendered as one column, exactly as before. For Lightning Wallet // rendered as one column, exactly as before. For Lightning Wallet
// Connections the day-to-day wallet manager (html) is split away from the // Connections the day-to-day wallet manager (html) is split away from the