Files
Maven/cmd/mavweb/history.html
T
kami f8ba396fec mavweb: add /history page for command history
- New /history route displays recent facts in a dedicated page with
  voided-row styling (line-through + opacity + badge).
- Navigation link added to /dash page header.
- Handler calls core.RecentFacts(ctx, 200) and renders historyTmpl.
2026-07-05 02:13:13 +04:00

34 lines
1.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="width=device-width,initial-scale=1">
<title>maven · history</title>
<style>
body{font:14px system-ui;margin:1.5rem;max-width:64rem}
h1{font-size:1.3rem;margin-bottom:.3rem}
nav a{margin-right:1rem}
table{border-collapse:collapse;width:100%;margin-top:.5rem}
th,td{border:1px solid #ccc;padding:.3rem .5rem;text-align:left;vertical-align:top}
th{background:#f6f6f6}
.voided{opacity:.45;text-decoration:line-through}
.void-badge{color:#999;font-size:.8rem;margin-left:.3rem}
.key{font-family:monospace;white-space:nowrap}
.val{font-family:monospace;word-break:break-all;max-width:20rem}
.src{font-size:.85rem;color:#666}
.count{color:#888;font-size:.85rem;margin-top:.3rem}
</style>
<h1>maven · command history</h1>
<nav><a href=/dash>dash</a> <a href=/tools>tools</a> <a href=/auth/passkey>passkey</a></nav>
<p class=count>{{len .Facts}} facts shown (newest first)</p>
<table>
<tr><th>when<th>kind<th>key<th>value<th>source<th>conf</tr>
{{range .Facts}}<tr{{if .VoidsID}} class=voided{{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=src>{{.Source}}</td>
<td>{{printf "%.2f" .Confidence}}</td>
</tr>{{end}}
</table>