d7c0cf89d3
One theme (the PWA's dark palette) for dash/history/trace/notifications/ tools/passkey via static/ui.css; shared nav template with active-page highlight; tables wrapped in .scroll so they pan on phones; PWA nav no longer clips the RU/EN toggle; dash 'updated' timestamp fixed (selector matched nothing). AGENTS.md documents the local preview/screenshot recipe. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ASstMtsZWLSRcD1Tq8T68Q
31 lines
1.6 KiB
HTML
31 lines
1.6 KiB
HTML
<!doctype html><meta charset=utf-8>
|
|
<meta name=viewport content="width=device-width,initial-scale=1">
|
|
<title>maven · dash</title>
|
|
<link rel=stylesheet href=/ui.css>
|
|
{{template "nav" "dash"}}
|
|
<h2>presence</h2>
|
|
<p><span class={{.Presence.Bucket}}>{{.Presence.Bucket}}</span> — score {{printf "%.2f" .Presence.Score}} ({{ago .Presence.Updated}})</p>
|
|
<div class=updated id=updated>обновляется каждые 10с</div>
|
|
<h2>nudges</h2>
|
|
<div class=scroll><table class=mono id=nudges><tr><th>when<th>rule<th>chan<th>outcome<th>message</tr>
|
|
{{range .Nudges}}<tr><td>{{ago .Ts}}<td>{{.Rule}}<td><span class=badge>{{.Channel}}</span><td class={{.Outcome}}>{{.Outcome}}<td>{{.Message}}</tr>{{end}}
|
|
</table></div>
|
|
<h2>facts</h2>
|
|
<div class=scroll><table class=mono id=facts><tr><th>when<th>kind<th>key<th>value<th>source<th>conf</tr>
|
|
{{range .Facts}}<tr><td>{{ago .Ts}}<td>{{.Kind}}<td class=key>{{.Key}}<td>{{.Value}}<td>{{.Source}}<td>{{printf "%.2f" .Confidence}}</tr>{{end}}
|
|
</table></div>
|
|
<h2>notes</h2>
|
|
<div class=scroll><table class=mono id=notes><tr><th>when<th>source<th>text</tr>
|
|
{{range .Notes}}<tr><td>{{ago .Ts}}<td>{{.Source}}<td>{{.Text}}</tr>{{end}}
|
|
</table></div>
|
|
<script>
|
|
setInterval(() => fetch('/dash').then(r => r.text()).then(html => {
|
|
const p = new DOMParser(), d = p.parseFromString(html, 'text/html');
|
|
for (const id of ['nudges', 'facts', 'notes']) {
|
|
const old = document.getElementById(id), nu = d.getElementById(id);
|
|
if (old && nu) old.replaceWith(nu);
|
|
}
|
|
document.getElementById('updated').textContent = 'обновлено ' + new Date().toLocaleTimeString();
|
|
}), 10000);
|
|
</script>
|