diff --git a/app.js b/app.js index ebda20c..1af6ffb 100644 --- a/app.js +++ b/app.js @@ -454,8 +454,6 @@ function populateDemoShell() { + Add Agent`; @@ -507,12 +505,14 @@ function populateDemoShell() { // Contract const demoDot = document.getElementById("contract-status-dot"); - demoDot.className = "contract-dot contract-dot--green"; + demoDot.className = "contract-dot contract-dot--red"; demoDot.style.visibility = "visible"; document.getElementById("contract-body").innerHTML = `
- Junior \u2013 Monthly + Trainee \u2013 Monthly + expires 2026-07-10 + Resubscribe →
`; @@ -589,19 +589,11 @@ function renderAgentTabs() { const dotClass = hasExpiry ? "agent-tab-dot agent-tab-dot--red" : "agent-tab-dot"; - const expiredText = hasExpiry - ? `expires ${escHtml(expires)}` - : ""; - const portalLink = hasExpiry - ? `Resubscribe →` - : ""; return ` `; @@ -1553,25 +1545,38 @@ function renderContract(data) { return; } - headerDot.className = "contract-dot contract-dot--green"; - headerDot.style.visibility = "visible"; - const item = data[0]; const product = stripQuotes(item.product || ""); const period = stripQuotes(item.period || ""); const type = stripQuotes(item.type || ""); + const expires = stripQuotes(item.expires || ""); + const hasExpiry = expires && expires !== "null" && expires !== ""; const label = product && period ? `${product} \u2013 ${period}` : product || period || type || "—"; - body.innerHTML = ` -
+ headerDot.className = hasExpiry + ? "contract-dot contract-dot--red" + : "contract-dot contract-dot--green"; + headerDot.style.visibility = "visible"; + + let html = `
- ${escHtml(label)} + ${escHtml(label)}`; + + if (hasExpiry) { + html += ` + expires ${escHtml(expires)} + Resubscribe →`; + } + + html += `
`; + + body.innerHTML = html; } /* ═══════════════════════════════════════════════════════════════ diff --git a/styles.css b/styles.css index a793c69..16a0044 100644 --- a/styles.css +++ b/styles.css @@ -714,30 +714,6 @@ body::after { box-shadow: 0 0 0 2px rgba(224, 82, 82, 0.25); } -.agent-tab-expires { - font-size: 10px; - color: var(--danger); - font-weight: 500; - margin-left: 3px; -} - -.agent-tab-resub { - font-size: 10px; - font-weight: 600; - color: var(--accent); - text-decoration: none; - margin-left: 4px; - padding: 1px 6px; - border: 1px solid var(--accent); - border-radius: 4px; - line-height: normal; - transition: background 0.15s; -} - -.agent-tab-resub:hover { - background: var(--accent-dim); -} - .agent-tab-badge { font-size: 10px; font-weight: 600;