update Tue 07/14/2026 11:38:16.92

This commit is contained in:
2026-07-14 11:38:17 +10:00
commit b2b555ef16
38 changed files with 7348 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<title>Client Errors — Newbury Exhibit</title></head>
<body>
<div id="app"></div>
<script type="module">
import { api, requireAuth, styles, nav } from './admin.js';
document.head.insertAdjacentHTML('beforeend', `<style>${styles}
main{max-width:900px;margin:16px auto;padding:0 16px}
.err{background:#111730;border-radius:8px;padding:10px 12px;margin:8px 0;font:12px monospace;white-space:pre-wrap}
.err .meta{opacity:.55;margin-bottom:4px}
</style>`);
await requireAuth();
const app = document.getElementById('app');
async function render() {
const errs = await api('/api/client-errors');
app.innerHTML = `${nav('errors')}<main>
<div style="display:flex;align-items:center;gap:12px;margin:12px 0">
<h2 style="margin:0;font-size:1rem">Client errors (${errs.length})</h2>
<button id="refresh">Refresh</button>
</div>
${errs.slice().reverse().map(e => `<div class="err">
<div class="meta">${new Date(e.t).toLocaleString()} · ${e.page || '?'} · ${(e.ua || '').slice(0, 80)}</div>
[${e.kind}] ${e.msg}${e.src ? ` (${e.src}:${e.line})` : ''}</div>`).join('') ||
'<em style="opacity:.6">No errors reported. Lovely.</em>'}
</main>`;
document.getElementById('refresh').onclick = render;
}
render();
</script>
</body></html>