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:
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
import QRCode from 'qrcode'
|
||||
import { ICON_SHARE } from './icons.js'
|
||||
|
||||
export function mountShareSession(toolbar: HTMLElement, getActiveId: () => string | null): void {
|
||||
const modal = document.createElement('div')
|
||||
@@ -64,8 +65,9 @@ export function mountShareSession(toolbar: HTMLElement, getActiveId: () => strin
|
||||
|
||||
const toggle = document.createElement('button')
|
||||
toggle.className = 'toolbtn'
|
||||
toggle.textContent = '🔗'
|
||||
toggle.title = 'Share this session (mirror it on another device)'
|
||||
toggle.innerHTML = ICON_SHARE
|
||||
toggle.dataset.tip = 'Share session'
|
||||
toggle.setAttribute('aria-label', 'Share session')
|
||||
toggle.setAttribute('aria-label', 'Share this session')
|
||||
toggle.addEventListener('click', open)
|
||||
toolbar.appendChild(toggle)
|
||||
|
||||
Reference in New Issue
Block a user