diff --git a/app.js b/app.js index 1af6ffb..4860af2 100644 --- a/app.js +++ b/app.js @@ -512,8 +512,8 @@ function populateDemoShell() {
+ Resubscribe → `; // Backups @@ -1549,7 +1549,10 @@ function renderContract(data) { const product = stripQuotes(item.product || ""); const period = stripQuotes(item.period || ""); const type = stripQuotes(item.type || ""); - const expires = stripQuotes(item.expires || ""); + + // Look up expires from the agent data (new field in agents list API) + const agent = agents.find((a) => (a.UUID || a.uuid) === activeUUID); + const expires = agent ? stripQuotes(agent.expires || "") : ""; const hasExpiry = expires && expires !== "null" && expires !== ""; const label = @@ -1568,12 +1571,18 @@ function renderContract(data) { if (hasExpiry) { html += ` - expires ${escHtml(expires)} - Resubscribe →`; + expires ${escHtml(expires)}`; + } + + html += ` + `; + + if (hasExpiry) { + html += ` + Resubscribe →`; } html += ` - `; body.innerHTML = html; diff --git a/styles.css b/styles.css index 16a0044..fcc45ff 100644 --- a/styles.css +++ b/styles.css @@ -2182,11 +2182,12 @@ body.auth-layout #signin-btn { .contract-extend-link { display: inline-block; - margin-top: 5px; + margin-left: auto; font-size: 12px; font-weight: 600; color: var(--danger); text-decoration: none; + flex-shrink: 0; } .contract-extend-link:hover {