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
41 lines
1.5 KiB
HTML
41 lines
1.5 KiB
HTML
<!doctype html><meta charset=utf-8>
|
||
<meta name=viewport content="width=device-width,initial-scale=1">
|
||
<title>maven · history</title>
|
||
<link rel=stylesheet href=/ui.css>
|
||
<style>.val{word-break:break-all;max-width:20rem}</style>
|
||
{{template "nav" "history"}}
|
||
<h1>command history</h1>
|
||
<p class=muted>{{len .Facts}} facts shown (newest first)</p>
|
||
<div id=msg class=msg hidden></div>
|
||
<div class=scroll><table class=mono>
|
||
<tr><th>when<th>kind<th>key<th>value<th>source<th>conf<th></tr>
|
||
{{range .Facts}}{{if .VoidsID}}<tr class=voided>{{else}}<tr>{{end}}
|
||
<td>{{if .VoidsID}}<span class=void-badge>⨯ voided</span>{{end}}{{.Ts.Format "2006-01-02 15:04"}}</td>
|
||
<td>{{.Kind}}</td>
|
||
<td class=key>{{.Key}}</td>
|
||
<td class=val>{{.Value}}</td>
|
||
<td class=muted>{{.Source}}</td>
|
||
<td>{{printf "%.2f" .Confidence}}</td>
|
||
<td>{{if not .VoidsID}}<button onclick="revert('{{.Key}}',this)">revert</button>{{end}}</td>
|
||
</tr>{{end}}
|
||
</table></div>
|
||
<script>
|
||
const msg=document.getElementById('msg');
|
||
function revert(key,btn){
|
||
btn.disabled=true;
|
||
fetch('/api/revert',{method:'POST',headers:{'content-type':'application/x-www-form-urlencoded'},body:'key='+encodeURIComponent(key)})
|
||
.then(r=>r.json().then(d=>({ok:r.ok,data:d})))
|
||
.then(({ok,data})=>{
|
||
msg.className=ok?'msg msg-ok':'msg msg-err';
|
||
msg.hidden=false;
|
||
msg.textContent=ok?'reverted ✓':(data.error||'revert failed');
|
||
if(ok) btn.closest('tr').className='voided';
|
||
}).catch(e=>{
|
||
msg.className='msg msg-err';
|
||
msg.hidden=false;
|
||
msg.textContent='error: '+e;
|
||
btn.disabled=false;
|
||
});
|
||
}
|
||
</script>
|