Add developer API, Prometheus metrics, and community links

This commit is contained in:
2026-10-12 19:59:37 +05:00
parent 3cc3136762
commit 018be5049e
50 changed files with 4087 additions and 31 deletions

View File

@@ -24,6 +24,7 @@ export function Dashboard() {
[token, setToken] = useState(""),
[busy, setBusy] = useState(false);
const router = useRouter();
const [loaded, setLoaded] = useState(false);
const load = useCallback(async () => {
try {
const [m, t] = await Promise.all([
@@ -34,6 +35,7 @@ export function Dashboard() {
]);
setMaps(m.maps);
setTokens(t.tokens);
setLoaded(true);
setError("");
} catch (e) {
setError((e as Error).message);
@@ -98,10 +100,22 @@ export function Dashboard() {
</div>
{error && (
<p role="alert" className="error-message">
{t(error)}
{t(error)}{" "}
<button
type="button"
className="text-link"
onClick={() => void load()}
>
{t("Retry")}
</button>
</p>
)}
{!maps.length && (
{!loaded && !error && (
<p role="status" className="muted">
{t("Loading…")}
</p>
)}
{loaded && !maps.length && (
<div className="empty-state">
<h2>{t("A blank map is a beginning.")}</h2>
<p>