1// The relay's own page. One document, no framework: the markup, styles and2// script are the three files in src/console, folded into src/gen/console.ts3// by npm run build:console.4//5// Front of house, for everyone: what this relay is, how to connect, who is6// here, fuel, and the NIP-11 reference behind a disclosure. The owner's7// console sits below as seven tabs, one per job: People, Moderation,8// Rules, Identity, Data, Health, Owner. Every action is a NIP-86 call signed with a NIP-079// extension, so the page is a client of the same API scripts use.10//11// Subtext rule: a line of copy earns its place by warning or informing.12import { page } from "./ui.ts";13import { SIGNER_HASH } from "./gen/signer.ts";14import { CONSOLE_CSS, CONSOLE_HTML, CONSOLE_JS } from "./gen/console.ts";1516// The NIP-46 client library is fetched only when someone picks a remote17// signer; the hash in its URL lets the long cache header be safe.18export function dashboard(): string {19 return page("relay", CONSOLE_HTML + '<script>window.SIGNER_URL = "/signer.js?v=' + SIGNER_HASH + '";</script><script>' + CONSOLE_JS + "</script>", CONSOLE_CSS);20}