diff --git a/adminsite/components/InstanceRecord.tsx b/adminsite/components/InstanceRecord.tsx index d3b4ba7..68f397f 100644 --- a/adminsite/components/InstanceRecord.tsx +++ b/adminsite/components/InstanceRecord.tsx @@ -32,23 +32,12 @@ const KEY = (id: string) => `vantage-hq-record-open:${id}`; * because the thing that needs you is the thing that should be open. A manual * toggle is remembered per instance and beats the default from then on. */ -export function InstanceRecord({ - instance, - license, - reapAfterDays, - defaultOpen = false, -}: { - instance: Instance; - license?: License; - reapAfterDays?: number; - defaultOpen?: boolean; -}) { +export function InstanceRecord({ instance, license, reapAfterDays, defaultOpen = false }: { instance: Instance; license?: License; reapAfterDays?: number; defaultOpen?: boolean }) { const state = licenceState(license?.expires_at, Boolean(license)); const days = license ? daysRemaining(license.expires_at) : 0; const cloud = instance.deployment === "cloud"; const termDays = instance.tier === "free" ? 30 : 365; - const deleteInDays = - license && reapAfterDays ? daysRemaining(license.expires_at) + reapAfterDays : null; + const deleteInDays = license && reapAfterDays ? daysRemaining(license.expires_at) + reapAfterDays : null; const [open, setOpen] = useState(defaultOpen); useEffect(() => { @@ -81,13 +70,7 @@ export function InstanceRecord({ const panelId = `record-${instance.instance_id}`; return ( -
+

{instance.name || "Unnamed instance"}

@@ -97,10 +80,7 @@ export function InstanceRecord({ {` · created ${formatDate(instance.created_at)}`}

{cloud && instance.slug && ( - + {instance.slug}.vantage.hostxtra.co.uk → )} @@ -116,10 +96,7 @@ export function InstanceRecord({ aria-label={open ? "Hide details" : "Show details"} className="grid h-[26px] w-[26px] place-items-center rounded-sm border border-rule bg-panel text-[0.6rem] text-ink-3 hover:border-accent hover:text-accent" > - + @@ -145,60 +122,36 @@ export function InstanceRecord({ {state === "expired" && (
-

- Servers and monitors are still running, and your agents keep their keys. - Changes are disabled until you renew. -

+

Servers and monitors are still running, and your agents keep their keys. Changes are disabled until you renew.

{deleteInDays !== null && (

- {deleteInDays <= 0 - ? "Scheduled for deletion." - : `Deleted in ${deleteInDays} ${deleteInDays === 1 ? "day" : "days"} unless renewed.`} + {deleteInDays <= 0 ? "Scheduled for deletion." : `Deleted in ${deleteInDays} ${deleteInDays === 1 ? "day" : "days"} unless renewed.`}

)}
)} - {state === "none" && ( -

- You have paid for this but it is not attached to an install yet, so no licence - has been issued. Linking takes a minute. -

- )} + {state === "none" &&

You have paid for this but it is not attached to an install yet, so no licence has been issued. Linking takes a minute.

} -
@@ -273,19 +206,8 @@ export function InstanceRecord({ function Stat({ n, label, quiet }: { n: string; label: string; quiet?: boolean }) { return (
- - {n} - - - {label} - + {n} + {label}
); } diff --git a/adminsite/components/LicenceDelivery.tsx b/adminsite/components/LicenceDelivery.tsx index 5746ea4..9bd5de1 100644 --- a/adminsite/components/LicenceDelivery.tsx +++ b/adminsite/components/LicenceDelivery.tsx @@ -52,7 +52,7 @@ export function LicenceDelivery({ {copied ? "Copied" : "Copy to clipboard"} -
+            
                 {blob}