polish(v0.6): replace toolbar emoji with themed line icons + hover tooltips

The glossy emoji (🔍⚙▦🕘🔗📱) clashed with the Amber dark theme. Swap them
for clean lucide line icons (MIT, stroke=currentColor) so they take the theme
colour — muted by default, Amber on hover — and add a styled CSS hover tooltip
(data-tip, right-anchored so it never clips the edge) showing what each does.

- public/icons.ts: 7 line icons (search/settings/dashboard/history/keyboard/
  share/device), script-generated from lucide
- 7 toolbar modules: innerHTML = ICON_* + data-tip + aria-label
- style.css .toolbtn: 18px svg, --text-dim → --accent on hover, [data-tip] tooltip

Frontend-only. web typecheck + build clean; bundle has 0 toolbar emoji; verified
in-browser: line icons in theme colour, amber + tooltip on hover.
This commit is contained in:
Yaojia Wang
2026-06-30 14:36:26 +02:00
parent 59de784c8a
commit 67b0a43b39
10 changed files with 93 additions and 16 deletions

View File

@@ -6,6 +6,8 @@
* open it re-renders every second so statuses stay live.
*/
import { ICON_DASHBOARD } from './icons.js'
export interface TabInfo {
idx: number
title: string
@@ -86,8 +88,9 @@ export function mountDashboard(toolbar: HTMLElement, hooks: DashboardHooks): voi
const btn = document.createElement('button')
btn.className = 'toolbtn'
btn.textContent = '▦'
btn.title = 'All sessions'
btn.innerHTML = ICON_DASHBOARD
btn.dataset.tip = 'All sessions'
btn.setAttribute('aria-label', 'All sessions')
btn.setAttribute('aria-label', 'All sessions')
btn.addEventListener('click', () => (overlay.style.display === 'none' ? open() : hide()))
toolbar.appendChild(btn)