From efbe4f8d904421fdd671589dc45928d2c80347c4 Mon Sep 17 00:00:00 2001 From: therainisme Date: Tue, 27 Jan 2026 17:27:31 +0800 Subject: [PATCH] feat(web): add font size setting - Add Settings > Display > Font Size selector (80/90/100/110/120%) - Persist preference (hapi-font-scale) and apply globally via --app-font-scale - Normalize main UI typography to match Settings --- web/index.html | 13 ++ .../AssistantChat/AttachmentItem.tsx | 2 +- .../AssistantChat/HappyComposer.tsx | 2 +- .../messages/MessageAttachments.tsx | 2 +- web/src/components/MarkdownRenderer.tsx | 2 +- web/src/components/SessionActionMenu.tsx | 2 +- web/src/components/SessionList.tsx | 4 +- .../components/assistant-ui/markdown-text.tsx | 14 +-- .../assistant-ui/shiki-highlighter.tsx | 2 +- web/src/hooks/useFontScale.ts | 114 ++++++++++++++++++ web/src/index.css | 8 +- web/src/lib/locales/en.ts | 2 + web/src/lib/locales/zh-CN.ts | 2 + web/src/main.tsx | 3 + web/src/routes/settings/index.tsx | 82 ++++++++++++- 15 files changed, 232 insertions(+), 22 deletions(-) create mode 100644 web/src/hooks/useFontScale.ts diff --git a/web/index.html b/web/index.html index 4c1cabdd..b764f311 100644 --- a/web/index.html +++ b/web/index.html @@ -32,6 +32,19 @@ html { background: #1c1c1e; color-scheme: dark } } +