| index 8e07402..0fe36cf 100644 |
| --- a/home/web/static/home.js |
| +++ b/home/web/static/home.js |
| @@ -464,10 +464,21 @@ function serverRow(s, sortable) { |
| // upgraded rows carry a quiet Supporter badge; free ones offer Upgrade. |
| const ledger = billingEnabled && provisioned ? provisioned[hostOf(s.url)] : null; |
| if (ledger && ledger.entitlement === "paid") { |
| + // The tier badge with Manage right beside it — the subscription's label |
| + // and its controls read as one unit. |
| + const row = document.createElement("span"); |
| + row.className = "badge-row"; |
| const badge = document.createElement("span"); |
| badge.className = "supporter-badge"; |
| badge.textContent = tierName(ledger.tier); |
| - main.append(badge); |
| + const manage = document.createElement("button"); |
| + manage.type = "button"; |
| + manage.className = "row-manage"; |
| + manage.textContent = "Manage"; |
| + manage.setAttribute("aria-label", "Manage the subscription for " + labelOf(s)); |
| + manage.addEventListener("click", () => openPortal(hostOf(s.url), manage)); |
| + row.append(badge, manage); |
| + main.append(row); |
| } |
| |
| // The storage meter's reading (spaces this account created; 0 = not yet |
| @@ -492,17 +503,6 @@ function serverRow(s, sortable) { |
| up.setAttribute("aria-label", "Upgrade " + labelOf(s)); |
| up.addEventListener("click", () => openUpgrade(s)); |
| li.append(up); |
| - } else if (ledger && ledger.entitlement === "paid") { |
| - // Manage the subscription behind this space — Stripe's hosted Billing |
| - // Portal (cancel, change card, invoices). Per-space by design: each |
| - // space is its own Stripe customer, so there's no cross-space portal. |
| - const manage = document.createElement("button"); |
| - manage.type = "button"; |
| - manage.className = "row-upgrade"; |
| - manage.textContent = "Manage"; |
| - manage.setAttribute("aria-label", "Manage the subscription for " + labelOf(s)); |
| - manage.addEventListener("click", () => openPortal(hostOf(s.url), manage)); |
| - li.append(manage); |
| } |
| |
| // Archive: a quiet box glyph that reveals on hover (like the grip). One tap |