feat(frontend): unify font rendering and add font picker in settings
The UI used hardcoded "PingFang SC" in 50+ components, while the global font stack in App.vue used a different fallback chain. Outside of mainland China this caused visibly different fonts in the sidebar, breadcrumbs, search and agent views compared to settings and document panes. - Introduce --app-font-family / --app-font-family-mono CSS variables in theme.css and route TDesign's --td-font-family through them - Add a useFont composable that persists the user's choice in localStorage and applies it via document.documentElement.style before mount - Replace hardcoded font-family declarations across the app with the new variables (TencentSans logo and the SVG attribute list are preserved) - Add UI font and monospace font selectors in General Settings with i18n strings for en-US, zh-CN, ko-KR and ru-RU https://claude.ai/code/session_01S1FVPf4jRfWXkTSnpMmMp7
This commit is contained in:
@@ -290,7 +290,7 @@ watch(mermaidSample, doMermaid);
|
||||
max-width: 860px;
|
||||
margin: 0 auto;
|
||||
padding: 32px 24px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
font-family: var(--app-font-family);
|
||||
}
|
||||
|
||||
.page-title {
|
||||
@@ -387,7 +387,7 @@ watch(mermaidSample, doMermaid);
|
||||
.custom-textarea {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
|
||||
font-family: var(--app-font-family-mono);
|
||||
font-size: 13px;
|
||||
border: 1px solid var(--td-component-stroke, #ccc);
|
||||
border-radius: 6px;
|
||||
@@ -431,7 +431,7 @@ watch(mermaidSample, doMermaid);
|
||||
background: var(--td-bg-color-secondarycontainer, #f5f5f5);
|
||||
padding: 2px 5px;
|
||||
border-radius: 3px;
|
||||
font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
|
||||
font-family: var(--app-font-family-mono);
|
||||
font-size: 13px;
|
||||
}
|
||||
:deep(pre) {
|
||||
|
||||
Reference in New Issue
Block a user