Public index.json now exposes every admin-set channel name (not just a hardcoded "stable"), matching Next's real repository protocol - the in-app UI lists whatever channel names a repo defines. Admin panel now reads from a new /api/admin/state endpoint (full override + channel + site data) instead of /index.json, which only ever carried the public-facing fields - fixes fields appearing blank on reload. Channel editing is now a free-form name+version input instead of a single "promote to stable" button. Also: color accents, drifting background blobs, a few floating decorative icons (pride flag included), and a custom cursor follower on desktop, applied site-wide via the shared theme shell.
7 lines
111 B
TypeScript
7 lines
111 B
TypeScript
export function guard<T>(fn: () => T, fallback: T): T {
|
|
try {
|
|
return fn()
|
|
} catch {
|
|
return fallback
|
|
}
|
|
}
|