feat: web UI redesign with PWA support, voice page, and mobile layout
- Redesign dash/history/notifications/trace pages with unified CSS framework (ui.css): cards, badges, scrollable tables, responsive grid, PWA shell. - Add /voice page with chat-bubble transcript, listening indicator, and push-to-talk button for voice interaction. - Add mavweb.js: client-side JS for live transcript polling, auto-scroll, push-to-talk, and service-worker registration. - Update PWA manifest, icon, and service-worker for installable web app. - Add WebAuthn credential management (register/list/delete) with modal UI. - Update main.go: /voice route, WebAuthn handlers, new page navigation. - Update handlers_test.go for new voice and WebAuthn routes.
This commit is contained in:
+7
-10
@@ -79,20 +79,17 @@ func (h *PasskeyHandle) Page(w http.ResponseWriter, r *http.Request) {
|
||||
passkeyTmpl.Execute(w, nil)
|
||||
}
|
||||
|
||||
// passkeyPageHTML — rendered via passkeyTmpl (main.go) which prepends navHTML.
|
||||
const passkeyPageHTML = `<!doctype html><meta charset=utf-8>
|
||||
<meta name=viewport content="width=device-width,initial-scale=1">
|
||||
<title>maven · passkey</title>
|
||||
<link rel=stylesheet href=/ui.css>
|
||||
{{template "nav" "passkey"}}
|
||||
<main class=page>
|
||||
<h1>passkey</h1>
|
||||
<p class=muted>Enroll a passkey once, then assert it to unlock destructive actions (tool enable) for a few minutes.</p>
|
||||
// passkeyPageHTML — rendered via passkeyTmpl (main.go) which wraps with shellTop/shellBottom.
|
||||
const passkeyPageHTML = `{{template "shellTop" "passkey"}}
|
||||
<h1>Passkey</h1>
|
||||
<p class=hint>Enroll a passkey once, then assert it to unlock destructive actions (tool enable) for a few minutes.</p>
|
||||
<div class=flex gap-2>
|
||||
<button class=btn onclick=enroll()>enroll passkey</button>
|
||||
<button class=btn onclick=assert()>assert (step-up)</button>
|
||||
<a href=/tools><button class=btn-primary>→ tools</button></a>
|
||||
</div>
|
||||
<div id=msg></div>
|
||||
</main>
|
||||
{{template "shellBottom"}}
|
||||
<script>
|
||||
const b64u=b=>btoa(String.fromCharCode(...new Uint8Array(b))).replace(/\+/g,'-').replace(/\//g,'_').replace(/=+$/,'');
|
||||
const ub64=s=>{s=s.replace(/-/g,'+').replace(/_/g,'/');const b=atob(s),a=new Uint8Array(b.length);for(let i=0;i<b.length;i++)a[i]=b.charCodeAt(i);return a;};
|
||||
|
||||
Reference in New Issue
Block a user