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:
co-authored by
arena-agent
parent
dec0aebc95
commit
310731b3e0
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user