From e554c053ee1d22a63566927f37a227cc57a615a5 Mon Sep 17 00:00:00 2001 From: Yaojia Wang Date: Tue, 30 Jun 2026 18:54:11 +0200 Subject: [PATCH] =?UTF-8?q?polish(v0.7):=20replace=20timeline=20?= =?UTF-8?q?=F0=9F=93=9C=20+=20push=20=F0=9F=94=94=20emoji=20with=20themed?= =?UTF-8?q?=20line=20icons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Swap the two v0.7 emoji buttons for lucide line icons (stroke=currentColor) so they take the Amber theme colour like the toolbar icons: - timeline toggle (tabs.ts) → scroll-text icon - push toggle + disabled bell (push.ts) → bell icon, keeping the On/Off label - icons.ts: ICON_TIMELINE, ICON_BELL; style.css sizes the inline svgs (16px) Frontend-only. web tsc + build:web clean, 102 push tests green, bundle emoji-free. --- public/icons.ts | 3 +++ public/push.ts | 8 ++++++-- public/tabs.ts | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/public/icons.ts b/public/icons.ts index d5e63ca..d2d9012 100644 --- a/public/icons.ts +++ b/public/icons.ts @@ -43,3 +43,6 @@ export const ICON_HISTORY = lineIcon(' ') export const ICON_SHARE = lineIcon(' ') export const ICON_DEVICE = lineIcon(' ') + +export const ICON_BELL = lineIcon(' ') +export const ICON_TIMELINE = lineIcon(' ') diff --git a/public/push.ts b/public/push.ts index 8b724bd..e55109c 100644 --- a/public/push.ts +++ b/public/push.ts @@ -16,6 +16,8 @@ * (NOTIFY_DND env). They are independent. */ +import { ICON_BELL } from './icons.js' + /* ── Types ─────────────────────────────────────────────────────────────────── */ /** All possible push-readiness states. Drives UI rendering in mountPushToggle. */ @@ -297,7 +299,8 @@ function renderPushToggle( function renderDisabled(container: HTMLElement, ariaLabel: string, hint: string): void { const wrap = el('span', 'push-toggle-disabled') - const bell = el('span', 'push-bell push-bell-off', '🔔') + const bell = el('span', 'push-bell push-bell-off') + bell.innerHTML = ICON_BELL bell.setAttribute('aria-label', ariaLabel) const hintEl = el('span', 'push-hint', hint) wrap.append(bell, hintEl) @@ -313,8 +316,9 @@ function renderToggleButton( const btn = el( 'button', isSubscribed ? 'push-toggle-btn push-toggle-on' : 'push-toggle-btn push-toggle-off', - isSubscribed ? '🔔 On' : '🔔 Off', ) + btn.innerHTML = ICON_BELL + btn.append(' ' + (isSubscribed ? 'On' : 'Off')) btn.title = isSubscribed ? 'Click to disable push notifications' : 'Click to enable push notifications' diff --git a/public/tabs.ts b/public/tabs.ts index 05333d7..edb3142 100644 --- a/public/tabs.ts +++ b/public/tabs.ts @@ -22,6 +22,7 @@ */ import { TerminalSession } from './terminal-session.js' +import { ICON_TIMELINE } from './icons.js' import { THEMES, DEFAULT_SETTINGS, type Settings } from './settings.js' import { mountLauncher, type Launcher } from './launcher.js' import { mountProjects, type ProjectsPanel } from './projects.js' @@ -853,7 +854,7 @@ export class TabApp { // survive tabBar.replaceChildren() (the bell's subtree is mounted once). const tl = document.createElement('button') tl.className = 'tab-timeline' - tl.textContent = '📜' + tl.innerHTML = ICON_TIMELINE tl.title = 'Activity timeline' tl.setAttribute('aria-label', 'Activity timeline') tl.classList.toggle('active', this.timelineOpen)