"use client";
import { useState } from "react";
import { Button } from "./Button";
/*
* A licence blob is signed public data, not a secret it is useless on any
* instance other than the one it names. So it is safe to show inline, and
* showing it is what stops a blocked download from blocking a paying customer.
*/
export function LicenceDelivery({ instanceId, blob, downloadUrl }: { instanceId: string; blob: string; downloadUrl: string }) {
const [copied, setCopied] = useState(false);
async function copy() {
await navigator.clipboard.writeText(blob);
setCopied(true);
setTimeout(() => setCopied(false), 2000);
}
const steps = [
<>
Open Settings → Licence on your install.
>,
<>Paste the licence into the box and save.>,
<>
The page reports Valid straight away no restart.
>,
];
return (
Your licence
{blob}
{steps.map((body, i) => (
-
{i + 1}
{body}
))}
);
}