Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

feat(frontend): unify font rendering and add font picker in settings

Claudef140c1251807
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index b40264c0d..ac9c7286a 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -193,8 +193,7 @@ html,
margin: 0;
padding: 0;
font-size: 14px;
- font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
- Microsoft YaHei, SimSun, sans-serif;
+ font-family: var(--app-font-family);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: var(--td-bg-color-page);
diff --git a/frontend/src/assets/theme/theme.css b/frontend/src/assets/theme/theme.css
index 9cb90a56a..9a043f726 100644
--- a/frontend/src/assets/theme/theme.css
+++ b/frontend/src/assets/theme/theme.css
@@ -1,4 +1,4 @@
-:root,:root[theme-mode="light"]{ --brand-main: var(--td-brand-color-4); --td-brand-color-light: var(--td-brand-color-1); --td-brand-color-focus: var(--td-brand-color-2); --td-brand-color-disabled: var(--td-brand-color-3); --td-brand-color-hover: var(--td-brand-color-3); --td-brand-color: var(--td-brand-color-4); --td-brand-color-active:var(--td-brand-color-5); --td-brand-color-1: #e9f8ec; --td-brand-color-2: #09f479; --td-brand-color-3: #08dd6e; --td-brand-color-4: #07c05f; --td-brand-color-5: #06b04d; --td-brand-color-6: #049b38; --td-brand-color-7: #038626; --td-brand-color-8: #027218; --td-brand-color-9: #015e0d; --td-brand-color-10: #004b05; --td-warning-color-1: #fef3e6;--td-warning-color-2: #f9e0c7;--td-warning-color-3: #f7c797;--td-warning-color-4: #f2995f;--td-warning-color-5: #ed7b2f;--td-warning-color-6: #d35a21;--td-warning-color-7: #ba431b;--td-warning-color-8: #9e3610;--td-warning-color-9: #842b0b;--td-warning-color-10: #5a1907;--td-warning-color: var(--td-warning-color-5);--td-warning-color-hover: var(--td-warning-color-4);--td-warning-color-focus: var(--td-warning-color-2);--td-warning-color-active: var(--td-warning-color-6);--td-warning-color-disabled: var(--td-warning-color-3);--td-warning-color-light: var(--td-warning-color-1); --td-error-color-1: #fdecee;--td-error-color-2: #f9d7d9;--td-error-color-3: #f8b9be;--td-error-color-4: #f78d94;--td-error-color-5: #f36d78;--td-error-color-6: #e34d59;--td-error-color-7: #c9353f;--td-error-color-8: #b11f26;--td-error-color-9: #951114;--td-error-color-10: #680506;--td-error-color: var(--td-error-color-6);--td-error-color-hover: var(--td-error-color-5);--td-error-color-focus: var(--td-error-color-2);--td-error-color-active: var(--td-error-color-7);--td-error-color-disabled: var(--td-error-color-3);--td-error-color-light: var(--td-error-color-1); --td-success-color-1: #e8f8f2;--td-success-color-2: #bcebdc;--td-success-color-3: #85dbbe;--td-success-color-4: #48c79c;--td-success-color-5: #00a870;--td-success-color-6: #078d5c;--td-success-color-7: #067945;--td-success-color-8: #056334;--td-success-color-9: #044f2a;--td-success-color-10: #033017;--td-success-color: var(--td-success-color-5);--td-success-color-hover: var(--td-success-color-4);--td-success-color-focus: var(--td-success-color-2);--td-success-color-active: var(--td-success-color-6);--td-success-color-disabled: var(--td-success-color-3);--td-success-color-light: var(--td-success-color-1); --td-gray-color-1: #f3f3f3;--td-gray-color-2: #eee;--td-gray-color-3: #e7e7e7;--td-gray-color-4: #dcdcdc;--td-gray-color-5: #c5c5c5;--td-gray-color-6: #a6a6a6;--td-gray-color-7: #8b8b8b;--td-gray-color-8: #777;--td-gray-color-9: #5e5e5e;--td-gray-color-10: #4b4b4b;--td-gray-color-11: #383838;--td-gray-color-12: #2c2c2c;--td-gray-color-13: #242424;--td-gray-color-14: #181818;--td-bg-color-container: #fff;--td-bg-color-container-select: #fff;--td-bg-color-page: var(--td-gray-color-2);--td-bg-color-sidebar: #f9f9f9;--td-bg-color-settings-modal: #f9f9f9;--td-bg-color-container-hover: var(--td-gray-color-1);--td-bg-color-container-active: var(--td-gray-color-3);--td-bg-color-secondarycontainer: var(--td-gray-color-1);--td-bg-color-secondarycontainer-hover: var(--td-gray-color-2);--td-bg-color-secondarycontainer-active: var(--td-gray-color-4);--td-bg-color-component: var(--td-gray-color-3);--td-bg-color-component-hover: var(--td-gray-color-4);--td-bg-color-component-active: var(--td-gray-color-6);--td-bg-color-component-disabled: var(--td-gray-color-2);--td-component-stroke: var(--td-gray-color-3);--td-component-border: var(--td-gray-color-4); --td-font-white-1: #ffffff;--td-font-white-2: rgba(255, 255, 255, 0.55);--td-font-white-3: rgba(255, 255, 255, 0.35);--td-font-white-4: rgba(255, 255, 255, 0.22);--td-font-gray-1: rgba(0, 0, 0, 0.9);--td-font-gray-2: rgba(0, 0, 0, 0.6);--td-font-gray-3: rgba(0, 0, 0, 0.4);--td-font-gray-4: rgba(0, 0, 0, 0.26);--td-text-color-primary: var(--td-font-gray-1);--td-text-color-secondary: var(--td-font-gray-2);--td-text-color-placeholder: var(--td-font-gray-3);--td-text-color-disabled: var(--td-font-gray-4);--td-text-color-anti: #fff;--td-text-color-brand: var(--td-brand-color);--td-text-color-link: var(--td-brand-color); /* 字体配置 */ --td-font-family: PingFang SC, Microsoft YaHei, Arial Regular; --td-font-family-medium: PingFang SC, Microsoft YaHei, Arial Medium; --td-font-size-link-small: 12px; --td-font-size-link-medium: 14px; --td-font-size-link-large: 16px; --td-font-size-mark-small: 12px; --td-font-size-mark-medium: 14px; --td-font-size-body-small: 12px; --td-font-size-body-medium: 14px; --td-font-size-body-large: 16px; --td-font-size-title-small: 14px; --td-font-size-title-medium: 16px; --td-font-size-title-large: 20px; --td-font-size-headline-small: 24px; --td-font-size-headline-medium: 28px; --td-font-size-headline-large: 36px; --td-font-size-display-medium: 48px; --td-font-size-display-large: 64px; --td-line-height-common: 8px; --td-line-height-link-small: calc( var(--td-font-size-link-small) + var(--td-line-height-common) ); --td-line-height-link-medium: calc( var(--td-font-size-link-medium) + var(--td-line-height-common) ); --td-line-height-link-large: calc( var(--td-font-size-link-large) + var(--td-line-height-common) ); --td-line-height-mark-small: calc( var(--td-font-size-mark-small) + var(--td-line-height-common) ); --td-line-height-mark-medium: calc( var(--td-font-size-mark-medium) + var(--td-line-height-common) ); --td-line-height-body-small: calc( var(--td-font-size-body-small) + var(--td-line-height-common) ); --td-line-height-body-medium: calc( var(--td-font-size-body-medium) + var(--td-line-height-common) ); --td-line-height-body-large: calc( var(--td-font-size-body-large) + var(--td-line-height-common) ); --td-line-height-title-small: calc( var(--td-font-size-title-small) + var(--td-line-height-common) ); --td-line-height-title-medium: calc( var(--td-font-size-title-medium) + var(--td-line-height-common) ); --td-line-height-title-large: calc( var(--td-font-size-title-medium) + var(--td-line-height-common) ); --td-line-height-headline-small: calc( var(--td-font-size-headline-small) + var(--td-line-height-common) ); --td-line-height-headline-medium: calc( var(--td-font-size-headline-medium) + var(--td-line-height-common) ); --td-line-height-headline-large: calc( var(--td-font-size-headline-large) + var(--td-line-height-common) ); --td-line-height-display-medium: calc( var(--td-font-size-display-medium) + var(--td-line-height-common) ); --td-line-height-display-large: calc( var(--td-font-size-display-large) + var(--td-line-height-common) ); --td-font-link-small: var(--td-font-size-link-small) / var(--td-line-height-link-small) var(--td-font-family); --td-font-link-medium: var(--td-font-size-link-medium) / var(--td-line-height-link-medium) var(--td-font-family); --td-font-link-large: var(--td-font-size-link-large) / var(--td-line-height-link-large) var(--td-font-family); --td-font-mark-small: 600 var(--td-font-size-mark-small) / var(--td-line-height-mark-small) var(--td-font-family); --td-font-mark-medium: 600 var(--td-font-size-mark-medium) / var(--td-line-height-mark-medium) var(--td-font-family); --td-font-body-small: var(--td-font-size-body-small) / var(--td-line-height-body-small) var(--td-font-family); --td-font-body-medium: var(--td-font-size-body-medium) / var(--td-line-height-body-medium) var(--td-font-family); --td-font-body-large: var(--td-font-size-body-large) / var(--td-line-height-body-large) var(--td-font-family); --td-font-title-small: var(--td-font-size-title-small) / var(--td-line-height-title-small) var(--td-font-family); --td-font-title-medium: var(--td-font-size-title-medium) / var(--td-line-height-title-medium) var(--td-font-family); --td-font-title-large: var(--td-font-size-title-large) / var(--td-line-height-title-large) var(--td-font-family); --td-font-headline-small: var(--td-font-size-headline-small) / var(--td-line-height-headline-small) var(--td-font-family); --td-font-headline-medium: var(--td-font-size-headline-medium) / var(--td-line-height-headline-medium) var(--td-font-family); --td-font-headline-large: var(--td-font-size-headline-large) / var(--td-line-height-headline-large) var(--td-font-family); --td-font-display-medium: var(--td-font-size-display-medium) / var(--td-line-height-display-medium) var(--td-font-family); --td-font-display-large: var(--td-font-size-display-large) / var(--td-line-height-display-large) var(--td-font-family); /* 字体颜色 */ --td-text-color-primary: var(--td-font-gray-1); --td-text-color-secondary: var(--td-font-gray-2); --td-text-color-placeholder: var(--td-font-gray-3); --td-text-color-disabled: var(--td-font-gray-4); --td-text-color-anti: #fff; --td-text-color-brand: var(--td-brand-color); --td-text-color-link: var(--td-brand-color); /* end 字体配置 */ /* 圆角配置 */ --td-radius-small: 2px; --td-radius-default: 3px; --td-radius-medium: 6px; --td-radius-large: 9px; --td-radius-extraLarge: 12px; --td-radius-round: 999px; --td-radius-circle: 50%; /* end 圆角配置 */ /* 阴影配置 */ --td-shadow-1: 0px 1px 10px rgba(0, 0, 0, 0.05), 0px 4px 5px rgba(0, 0, 0, 0.08), 0px 2px 4px -1px rgba(0, 0, 0, 0.12); --td-shadow-2: 0px 3px 14px 2px rgba(0, 0, 0, 0.05), 0px 8px 10px 1px rgba(0, 0, 0, 0.06), 0px 5px 5px -3px rgba(0, 0, 0, 0.1); --td-shadow-3: 0px 6px 30px 5px rgba(0, 0, 0, 0.05), 0px 16px 24px 2px rgba(0, 0, 0, 0.04), 0px 8px 10px -5px rgba(0, 0, 0, 0.08); /* end 阴影配置 */ }
+:root,:root[theme-mode="light"]{ --app-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; --app-font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --brand-main: var(--td-brand-color-4); --td-brand-color-light: var(--td-brand-color-1); --td-brand-color-focus: var(--td-brand-color-2); --td-brand-color-disabled: var(--td-brand-color-3); --td-brand-color-hover: var(--td-brand-color-3); --td-brand-color: var(--td-brand-color-4); --td-brand-color-active:var(--td-brand-color-5); --td-brand-color-1: #e9f8ec; --td-brand-color-2: #09f479; --td-brand-color-3: #08dd6e; --td-brand-color-4: #07c05f; --td-brand-color-5: #06b04d; --td-brand-color-6: #049b38; --td-brand-color-7: #038626; --td-brand-color-8: #027218; --td-brand-color-9: #015e0d; --td-brand-color-10: #004b05; --td-warning-color-1: #fef3e6;--td-warning-color-2: #f9e0c7;--td-warning-color-3: #f7c797;--td-warning-color-4: #f2995f;--td-warning-color-5: #ed7b2f;--td-warning-color-6: #d35a21;--td-warning-color-7: #ba431b;--td-warning-color-8: #9e3610;--td-warning-color-9: #842b0b;--td-warning-color-10: #5a1907;--td-warning-color: var(--td-warning-color-5);--td-warning-color-hover: var(--td-warning-color-4);--td-warning-color-focus: var(--td-warning-color-2);--td-warning-color-active: var(--td-warning-color-6);--td-warning-color-disabled: var(--td-warning-color-3);--td-warning-color-light: var(--td-warning-color-1); --td-error-color-1: #fdecee;--td-error-color-2: #f9d7d9;--td-error-color-3: #f8b9be;--td-error-color-4: #f78d94;--td-error-color-5: #f36d78;--td-error-color-6: #e34d59;--td-error-color-7: #c9353f;--td-error-color-8: #b11f26;--td-error-color-9: #951114;--td-error-color-10: #680506;--td-error-color: var(--td-error-color-6);--td-error-color-hover: var(--td-error-color-5);--td-error-color-focus: var(--td-error-color-2);--td-error-color-active: var(--td-error-color-7);--td-error-color-disabled: var(--td-error-color-3);--td-error-color-light: var(--td-error-color-1); --td-success-color-1: #e8f8f2;--td-success-color-2: #bcebdc;--td-success-color-3: #85dbbe;--td-success-color-4: #48c79c;--td-success-color-5: #00a870;--td-success-color-6: #078d5c;--td-success-color-7: #067945;--td-success-color-8: #056334;--td-success-color-9: #044f2a;--td-success-color-10: #033017;--td-success-color: var(--td-success-color-5);--td-success-color-hover: var(--td-success-color-4);--td-success-color-focus: var(--td-success-color-2);--td-success-color-active: var(--td-success-color-6);--td-success-color-disabled: var(--td-success-color-3);--td-success-color-light: var(--td-success-color-1); --td-gray-color-1: #f3f3f3;--td-gray-color-2: #eee;--td-gray-color-3: #e7e7e7;--td-gray-color-4: #dcdcdc;--td-gray-color-5: #c5c5c5;--td-gray-color-6: #a6a6a6;--td-gray-color-7: #8b8b8b;--td-gray-color-8: #777;--td-gray-color-9: #5e5e5e;--td-gray-color-10: #4b4b4b;--td-gray-color-11: #383838;--td-gray-color-12: #2c2c2c;--td-gray-color-13: #242424;--td-gray-color-14: #181818;--td-bg-color-container: #fff;--td-bg-color-container-select: #fff;--td-bg-color-page: var(--td-gray-color-2);--td-bg-color-sidebar: #f9f9f9;--td-bg-color-settings-modal: #f9f9f9;--td-bg-color-container-hover: var(--td-gray-color-1);--td-bg-color-container-active: var(--td-gray-color-3);--td-bg-color-secondarycontainer: var(--td-gray-color-1);--td-bg-color-secondarycontainer-hover: var(--td-gray-color-2);--td-bg-color-secondarycontainer-active: var(--td-gray-color-4);--td-bg-color-component: var(--td-gray-color-3);--td-bg-color-component-hover: var(--td-gray-color-4);--td-bg-color-component-active: var(--td-gray-color-6);--td-bg-color-component-disabled: var(--td-gray-color-2);--td-component-stroke: var(--td-gray-color-3);--td-component-border: var(--td-gray-color-4); --td-font-white-1: #ffffff;--td-font-white-2: rgba(255, 255, 255, 0.55);--td-font-white-3: rgba(255, 255, 255, 0.35);--td-font-white-4: rgba(255, 255, 255, 0.22);--td-font-gray-1: rgba(0, 0, 0, 0.9);--td-font-gray-2: rgba(0, 0, 0, 0.6);--td-font-gray-3: rgba(0, 0, 0, 0.4);--td-font-gray-4: rgba(0, 0, 0, 0.26);--td-text-color-primary: var(--td-font-gray-1);--td-text-color-secondary: var(--td-font-gray-2);--td-text-color-placeholder: var(--td-font-gray-3);--td-text-color-disabled: var(--td-font-gray-4);--td-text-color-anti: #fff;--td-text-color-brand: var(--td-brand-color);--td-text-color-link: var(--td-brand-color); /* 字体配置 */ --td-font-family: var(--app-font-family); --td-font-family-medium: var(--app-font-family); --td-font-size-link-small: 12px; --td-font-size-link-medium: 14px; --td-font-size-link-large: 16px; --td-font-size-mark-small: 12px; --td-font-size-mark-medium: 14px; --td-font-size-body-small: 12px; --td-font-size-body-medium: 14px; --td-font-size-body-large: 16px; --td-font-size-title-small: 14px; --td-font-size-title-medium: 16px; --td-font-size-title-large: 20px; --td-font-size-headline-small: 24px; --td-font-size-headline-medium: 28px; --td-font-size-headline-large: 36px; --td-font-size-display-medium: 48px; --td-font-size-display-large: 64px; --td-line-height-common: 8px; --td-line-height-link-small: calc( var(--td-font-size-link-small) + var(--td-line-height-common) ); --td-line-height-link-medium: calc( var(--td-font-size-link-medium) + var(--td-line-height-common) ); --td-line-height-link-large: calc( var(--td-font-size-link-large) + var(--td-line-height-common) ); --td-line-height-mark-small: calc( var(--td-font-size-mark-small) + var(--td-line-height-common) ); --td-line-height-mark-medium: calc( var(--td-font-size-mark-medium) + var(--td-line-height-common) ); --td-line-height-body-small: calc( var(--td-font-size-body-small) + var(--td-line-height-common) ); --td-line-height-body-medium: calc( var(--td-font-size-body-medium) + var(--td-line-height-common) ); --td-line-height-body-large: calc( var(--td-font-size-body-large) + var(--td-line-height-common) ); --td-line-height-title-small: calc( var(--td-font-size-title-small) + var(--td-line-height-common) ); --td-line-height-title-medium: calc( var(--td-font-size-title-medium) + var(--td-line-height-common) ); --td-line-height-title-large: calc( var(--td-font-size-title-medium) + var(--td-line-height-common) ); --td-line-height-headline-small: calc( var(--td-font-size-headline-small) + var(--td-line-height-common) ); --td-line-height-headline-medium: calc( var(--td-font-size-headline-medium) + var(--td-line-height-common) ); --td-line-height-headline-large: calc( var(--td-font-size-headline-large) + var(--td-line-height-common) ); --td-line-height-display-medium: calc( var(--td-font-size-display-medium) + var(--td-line-height-common) ); --td-line-height-display-large: calc( var(--td-font-size-display-large) + var(--td-line-height-common) ); --td-font-link-small: var(--td-font-size-link-small) / var(--td-line-height-link-small) var(--td-font-family); --td-font-link-medium: var(--td-font-size-link-medium) / var(--td-line-height-link-medium) var(--td-font-family); --td-font-link-large: var(--td-font-size-link-large) / var(--td-line-height-link-large) var(--td-font-family); --td-font-mark-small: 600 var(--td-font-size-mark-small) / var(--td-line-height-mark-small) var(--td-font-family); --td-font-mark-medium: 600 var(--td-font-size-mark-medium) / var(--td-line-height-mark-medium) var(--td-font-family); --td-font-body-small: var(--td-font-size-body-small) / var(--td-line-height-body-small) var(--td-font-family); --td-font-body-medium: var(--td-font-size-body-medium) / var(--td-line-height-body-medium) var(--td-font-family); --td-font-body-large: var(--td-font-size-body-large) / var(--td-line-height-body-large) var(--td-font-family); --td-font-title-small: var(--td-font-size-title-small) / var(--td-line-height-title-small) var(--td-font-family); --td-font-title-medium: var(--td-font-size-title-medium) / var(--td-line-height-title-medium) var(--td-font-family); --td-font-title-large: var(--td-font-size-title-large) / var(--td-line-height-title-large) var(--td-font-family); --td-font-headline-small: var(--td-font-size-headline-small) / var(--td-line-height-headline-small) var(--td-font-family); --td-font-headline-medium: var(--td-font-size-headline-medium) / var(--td-line-height-headline-medium) var(--td-font-family); --td-font-headline-large: var(--td-font-size-headline-large) / var(--td-line-height-headline-large) var(--td-font-family); --td-font-display-medium: var(--td-font-size-display-medium) / var(--td-line-height-display-medium) var(--td-font-family); --td-font-display-large: var(--td-font-size-display-large) / var(--td-line-height-display-large) var(--td-font-family); /* 字体颜色 */ --td-text-color-primary: var(--td-font-gray-1); --td-text-color-secondary: var(--td-font-gray-2); --td-text-color-placeholder: var(--td-font-gray-3); --td-text-color-disabled: var(--td-font-gray-4); --td-text-color-anti: #fff; --td-text-color-brand: var(--td-brand-color); --td-text-color-link: var(--td-brand-color); /* end 字体配置 */ /* 圆角配置 */ --td-radius-small: 2px; --td-radius-default: 3px; --td-radius-medium: 6px; --td-radius-large: 9px; --td-radius-extraLarge: 12px; --td-radius-round: 999px; --td-radius-circle: 50%; /* end 圆角配置 */ /* 阴影配置 */ --td-shadow-1: 0px 1px 10px rgba(0, 0, 0, 0.05), 0px 4px 5px rgba(0, 0, 0, 0.08), 0px 2px 4px -1px rgba(0, 0, 0, 0.12); --td-shadow-2: 0px 3px 14px 2px rgba(0, 0, 0, 0.05), 0px 8px 10px 1px rgba(0, 0, 0, 0.06), 0px 5px 5px -3px rgba(0, 0, 0, 0.1); --td-shadow-3: 0px 6px 30px 5px rgba(0, 0, 0, 0.05), 0px 16px 24px 2px rgba(0, 0, 0, 0.04), 0px 8px 10px -5px rgba(0, 0, 0, 0.08); /* end 阴影配置 */ }
:root[theme-mode="dark"]{
--brand-main: var(--td-brand-color-6);
--td-brand-color-light: var(--td-brand-color-1);
@@ -89,7 +89,7 @@
--td-text-color-brand: var(--td-brand-color);
--td-text-color-link: var(--td-brand-color);
- /* 字体配置 */ --td-font-family: PingFang SC, Microsoft YaHei, Arial Regular; --td-font-family-medium: PingFang SC, Microsoft YaHei, Arial Medium; --td-font-size-link-small: 12px; --td-font-size-link-medium: 14px; --td-font-size-link-large: 16px; --td-font-size-mark-small: 12px; --td-font-size-mark-medium: 14px; --td-font-size-body-small: 12px; --td-font-size-body-medium: 14px; --td-font-size-body-large: 16px; --td-font-size-title-small: 14px; --td-font-size-title-medium: 16px; --td-font-size-title-large: 20px; --td-font-size-headline-small: 24px; --td-font-size-headline-medium: 28px; --td-font-size-headline-large: 36px; --td-font-size-display-medium: 48px; --td-font-size-display-large: 64px; --td-line-height-common: 8px; --td-line-height-link-small: calc( var(--td-font-size-link-small) + var(--td-line-height-common) ); --td-line-height-link-medium: calc( var(--td-font-size-link-medium) + var(--td-line-height-common) ); --td-line-height-link-large: calc( var(--td-font-size-link-large) + var(--td-line-height-common) ); --td-line-height-mark-small: calc( var(--td-font-size-mark-small) + var(--td-line-height-common) ); --td-line-height-mark-medium: calc( var(--td-font-size-mark-medium) + var(--td-line-height-common) ); --td-line-height-body-small: calc( var(--td-font-size-body-small) + var(--td-line-height-common) ); --td-line-height-body-medium: calc( var(--td-font-size-body-medium) + var(--td-line-height-common) ); --td-line-height-body-large: calc( var(--td-font-size-body-large) + var(--td-line-height-common) ); --td-line-height-title-small: calc( var(--td-font-size-title-small) + var(--td-line-height-common) ); --td-line-height-title-medium: calc( var(--td-font-size-title-medium) + var(--td-line-height-common) ); --td-line-height-title-large: calc( var(--td-font-size-title-medium) + var(--td-line-height-common) ); --td-line-height-headline-small: calc( var(--td-font-size-headline-small) + var(--td-line-height-common) ); --td-line-height-headline-medium: calc( var(--td-font-size-headline-medium) + var(--td-line-height-common) ); --td-line-height-headline-large: calc( var(--td-font-size-headline-large) + var(--td-line-height-common) ); --td-line-height-display-medium: calc( var(--td-font-size-display-medium) + var(--td-line-height-common) ); --td-line-height-display-large: calc( var(--td-font-size-display-large) + var(--td-line-height-common) ); --td-font-link-small: var(--td-font-size-link-small) / var(--td-line-height-link-small) var(--td-font-family); --td-font-link-medium: var(--td-font-size-link-medium) / var(--td-line-height-link-medium) var(--td-font-family); --td-font-link-large: var(--td-font-size-link-large) / var(--td-line-height-link-large) var(--td-font-family); --td-font-mark-small: 600 var(--td-font-size-mark-small) / var(--td-line-height-mark-small) var(--td-font-family); --td-font-mark-medium: 600 var(--td-font-size-mark-medium) / var(--td-line-height-mark-medium) var(--td-font-family); --td-font-body-small: var(--td-font-size-body-small) / var(--td-line-height-body-small) var(--td-font-family); --td-font-body-medium: var(--td-font-size-body-medium) / var(--td-line-height-body-medium) var(--td-font-family); --td-font-body-large: var(--td-font-size-body-large) / var(--td-line-height-body-large) var(--td-font-family); --td-font-title-small: var(--td-font-size-title-small) / var(--td-line-height-title-small) var(--td-font-family); --td-font-title-medium: var(--td-font-size-title-medium) / var(--td-line-height-title-medium) var(--td-font-family); --td-font-title-large: var(--td-font-size-title-large) / var(--td-line-height-title-large) var(--td-font-family); --td-font-headline-small: var(--td-font-size-headline-small) / var(--td-line-height-headline-small) var(--td-font-family); --td-font-headline-medium: var(--td-font-size-headline-medium) / var(--td-line-height-headline-medium) var(--td-font-family); --td-font-headline-large: var(--td-font-size-headline-large) / var(--td-line-height-headline-large) var(--td-font-family); --td-font-display-medium: var(--td-font-size-display-medium) / var(--td-line-height-display-medium) var(--td-font-family); --td-font-display-large: var(--td-font-size-display-large) / var(--td-line-height-display-large) var(--td-font-family); /* 字体颜色 */ --td-text-color-primary: var(--td-font-gray-1); --td-text-color-secondary: var(--td-font-gray-2); --td-text-color-placeholder: var(--td-font-gray-3); --td-text-color-disabled: var(--td-font-gray-4); --td-text-color-anti: #fff; --td-text-color-brand: var(--td-brand-color); --td-text-color-link: var(--td-brand-color); /* end 字体配置 */
+ /* 字体配置 */ --td-font-family: var(--app-font-family); --td-font-family-medium: var(--app-font-family); --td-font-size-link-small: 12px; --td-font-size-link-medium: 14px; --td-font-size-link-large: 16px; --td-font-size-mark-small: 12px; --td-font-size-mark-medium: 14px; --td-font-size-body-small: 12px; --td-font-size-body-medium: 14px; --td-font-size-body-large: 16px; --td-font-size-title-small: 14px; --td-font-size-title-medium: 16px; --td-font-size-title-large: 20px; --td-font-size-headline-small: 24px; --td-font-size-headline-medium: 28px; --td-font-size-headline-large: 36px; --td-font-size-display-medium: 48px; --td-font-size-display-large: 64px; --td-line-height-common: 8px; --td-line-height-link-small: calc( var(--td-font-size-link-small) + var(--td-line-height-common) ); --td-line-height-link-medium: calc( var(--td-font-size-link-medium) + var(--td-line-height-common) ); --td-line-height-link-large: calc( var(--td-font-size-link-large) + var(--td-line-height-common) ); --td-line-height-mark-small: calc( var(--td-font-size-mark-small) + var(--td-line-height-common) ); --td-line-height-mark-medium: calc( var(--td-font-size-mark-medium) + var(--td-line-height-common) ); --td-line-height-body-small: calc( var(--td-font-size-body-small) + var(--td-line-height-common) ); --td-line-height-body-medium: calc( var(--td-font-size-body-medium) + var(--td-line-height-common) ); --td-line-height-body-large: calc( var(--td-font-size-body-large) + var(--td-line-height-common) ); --td-line-height-title-small: calc( var(--td-font-size-title-small) + var(--td-line-height-common) ); --td-line-height-title-medium: calc( var(--td-font-size-title-medium) + var(--td-line-height-common) ); --td-line-height-title-large: calc( var(--td-font-size-title-medium) + var(--td-line-height-common) ); --td-line-height-headline-small: calc( var(--td-font-size-headline-small) + var(--td-line-height-common) ); --td-line-height-headline-medium: calc( var(--td-font-size-headline-medium) + var(--td-line-height-common) ); --td-line-height-headline-large: calc( var(--td-font-size-headline-large) + var(--td-line-height-common) ); --td-line-height-display-medium: calc( var(--td-font-size-display-medium) + var(--td-line-height-common) ); --td-line-height-display-large: calc( var(--td-font-size-display-large) + var(--td-line-height-common) ); --td-font-link-small: var(--td-font-size-link-small) / var(--td-line-height-link-small) var(--td-font-family); --td-font-link-medium: var(--td-font-size-link-medium) / var(--td-line-height-link-medium) var(--td-font-family); --td-font-link-large: var(--td-font-size-link-large) / var(--td-line-height-link-large) var(--td-font-family); --td-font-mark-small: 600 var(--td-font-size-mark-small) / var(--td-line-height-mark-small) var(--td-font-family); --td-font-mark-medium: 600 var(--td-font-size-mark-medium) / var(--td-line-height-mark-medium) var(--td-font-family); --td-font-body-small: var(--td-font-size-body-small) / var(--td-line-height-body-small) var(--td-font-family); --td-font-body-medium: var(--td-font-size-body-medium) / var(--td-line-height-body-medium) var(--td-font-family); --td-font-body-large: var(--td-font-size-body-large) / var(--td-line-height-body-large) var(--td-font-family); --td-font-title-small: var(--td-font-size-title-small) / var(--td-line-height-title-small) var(--td-font-family); --td-font-title-medium: var(--td-font-size-title-medium) / var(--td-line-height-title-medium) var(--td-font-family); --td-font-title-large: var(--td-font-size-title-large) / var(--td-line-height-title-large) var(--td-font-family); --td-font-headline-small: var(--td-font-size-headline-small) / var(--td-line-height-headline-small) var(--td-font-family); --td-font-headline-medium: var(--td-font-size-headline-medium) / var(--td-line-height-headline-medium) var(--td-font-family); --td-font-headline-large: var(--td-font-size-headline-large) / var(--td-line-height-headline-large) var(--td-font-family); --td-font-display-medium: var(--td-font-size-display-medium) / var(--td-line-height-display-medium) var(--td-font-family); --td-font-display-large: var(--td-font-size-display-large) / var(--td-line-height-display-large) var(--td-font-family); /* 字体颜色 */ --td-text-color-primary: var(--td-font-gray-1); --td-text-color-secondary: var(--td-font-gray-2); --td-text-color-placeholder: var(--td-font-gray-3); --td-text-color-disabled: var(--td-font-gray-4); --td-text-color-anti: #fff; --td-text-color-brand: var(--td-brand-color); --td-text-color-link: var(--td-brand-color); /* end 字体配置 */
/* 圆角配置 */ --td-radius-small: 2px; --td-radius-default: 3px; --td-radius-medium: 6px; --td-radius-large: 9px; --td-radius-extraLarge: 12px; --td-radius-round: 999px; --td-radius-circle: 50%; /* end 圆角配置 */
diff --git a/frontend/src/components/AgentAvatar.vue b/frontend/src/components/AgentAvatar.vue
index edfb4b398..1b2795ca2 100644
--- a/frontend/src/components/AgentAvatar.vue
+++ b/frontend/src/components/AgentAvatar.vue
@@ -155,6 +155,6 @@ const letterStyle = computed(() => {
color: var(--td-text-color-anti);
font-size: 14px;
font-weight: 600;
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
+ font-family: var(--app-font-family);
}
</style>
diff --git a/frontend/src/components/AgentShareSettings.vue b/frontend/src/components/AgentShareSettings.vue
index 6bfe131c5..749d8c0ed 100644
--- a/frontend/src/components/AgentShareSettings.vue
+++ b/frontend/src/components/AgentShareSettings.vue
@@ -271,7 +271,7 @@ defineExpose({ loadShares })
gap: 8px;
margin-bottom: 16px;
.shares-title {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 15px;
font-weight: 500;
color: var(--td-text-color-primary);
@@ -344,7 +344,7 @@ defineExpose({ loadShares })
align-items: center;
gap: 8px;
.org-name {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 500;
color: var(--td-text-color-primary);
@@ -451,7 +451,7 @@ defineExpose({ loadShares })
margin-bottom: 2px;
}
.org-option-name {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 13px;
font-weight: 500;
color: var(--td-text-color-primary);
@@ -463,7 +463,7 @@ defineExpose({ loadShares })
display: flex;
align-items: center;
gap: 6px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
color: var(--td-text-color-placeholder);
diff --git a/frontend/src/components/FAQTagTooltip.vue b/frontend/src/components/FAQTagTooltip.vue
index 86d26484d..dcf04fb38 100644
--- a/frontend/src/components/FAQTagTooltip.vue
+++ b/frontend/src/components/FAQTagTooltip.vue
@@ -171,7 +171,7 @@ watch(showTooltip, (newVal) => {
border: 1px solid var(--td-component-stroke);
border-radius: 6px;
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.08);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 400;
line-height: 1.6;
@@ -273,7 +273,7 @@ watch(showTooltip, (newVal) => {
.tooltip-content {
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 400;
line-height: 1.6;
diff --git a/frontend/src/components/Input-field.vue b/frontend/src/components/Input-field.vue
index 7e022111e..80baeb7aa 100644
--- a/frontend/src/components/Input-field.vue
+++ b/frontend/src/components/Input-field.vue
@@ -2543,7 +2543,7 @@ const getImgSrc = (url: string) => {
font-size: 16px;
font-weight: 400;
line-height: 24px;
- font-family: var(--td-font-family, "PingFang SC");
+ font-family: var(--app-font-family);
padding: 12px 16px 56px 16px;
border-radius: 0 0 12px 12px;
border: none;
@@ -2558,7 +2558,7 @@ const getImgSrc = (url: string) => {
&::placeholder {
color: var(--td-text-color-placeholder, #00000066);
- font-family: var(--td-font-family, "PingFang SC");
+ font-family: var(--app-font-family);
font-size: 16px;
font-weight: 400;
line-height: 24px;
diff --git a/frontend/src/components/ListSpaceSidebar.vue b/frontend/src/components/ListSpaceSidebar.vue
index d542e650c..ab4e85962 100644
--- a/frontend/src/components/ListSpaceSidebar.vue
+++ b/frontend/src/components/ListSpaceSidebar.vue
@@ -421,7 +421,7 @@ onBeforeUnmount(() => {
color: var(--td-text-color-primary);
cursor: pointer;
transition: all 0.15s ease;
- font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
+ font-family: var(--app-font-family);
font-size: 14px;
-webkit-font-smoothing: antialiased;
diff --git a/frontend/src/components/MentionSelector.vue b/frontend/src/components/MentionSelector.vue
index 7d62b091b..0056efced 100644
--- a/frontend/src/components/MentionSelector.vue
+++ b/frontend/src/components/MentionSelector.vue
@@ -337,7 +337,7 @@ const scrollToItem = (index: number) => {
border-radius: var(--td-radius-default, 3px);
color: var(--td-text-color-primary, #333);
font-size: var(--td-font-size-body-medium, 14px);
- font-family: var(--td-font-family, "PingFang SC");
+ font-family: var(--app-font-family);
transition: background 0.2s cubic-bezier(0.38, 0, 0.24, 1);
}
diff --git a/frontend/src/components/ShareKnowledgeBaseDialog.vue b/frontend/src/components/ShareKnowledgeBaseDialog.vue
index 17a4b66a8..d3a7f68ba 100644
--- a/frontend/src/components/ShareKnowledgeBaseDialog.vue
+++ b/frontend/src/components/ShareKnowledgeBaseDialog.vue
@@ -413,7 +413,7 @@ function handleGoToOrgSettings(orgId: string) {
margin-bottom: 2px;
.org-option-name {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 13px;
font-weight: 500;
color: var(--td-text-color-primary);
@@ -427,7 +427,7 @@ function handleGoToOrgSettings(orgId: string) {
display: flex;
align-items: center;
gap: 6px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
color: var(--td-text-color-placeholder);
diff --git a/frontend/src/components/SpaceAvatar.vue b/frontend/src/components/SpaceAvatar.vue
index 78b98fc31..9b2aaad2b 100644
--- a/frontend/src/components/SpaceAvatar.vue
+++ b/frontend/src/components/SpaceAvatar.vue
@@ -180,6 +180,6 @@ const letterStyle = computed(() => {
color: var(--td-text-color-anti);
font-size: 14px;
font-weight: 600;
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
+ font-family: var(--app-font-family);
}
</style>
diff --git a/frontend/src/components/css/markdown.less b/frontend/src/components/css/markdown.less
index b192f2e6b..4c6d2f77a 100644
--- a/frontend/src/components/css/markdown.less
+++ b/frontend/src/components/css/markdown.less
@@ -30,7 +30,7 @@
margin-top: 5px;
font-weight: bold;
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC", "Cascadia Code";
+ font-family: var(--app-font-family);
transition: all 0.2s ease-out;
font-size: 20px;
}
@@ -91,7 +91,7 @@
table {
font-size: 14px;
margin: 10px 0;
- font-family: "PingFang SC", "Cascadia Code";
+ font-family: var(--app-font-family);
}
h2 {
@@ -307,7 +307,7 @@
.md-image>.md-meta {
border-radius: 3px;
- font-family: var(--font-monospace);
+ font-family: var(--app-font-family-mono);
padding: 2px 0 0 4px;
font-size: 0.9em;
color: inherit;
@@ -337,7 +337,7 @@
.context-menu,
.megamenu-content,
footer {
- font-family: var(--font-sans-serif);
+ font-family: var(--app-font-family);
}
.file-node-content:hover .file-node-icon,
@@ -436,6 +436,6 @@
}
.outline-label {
- font-family: "Cascadia Code", "PingFang SC";
+ font-family: var(--app-font-family);
}
}
\ No newline at end of file
diff --git a/frontend/src/components/empty-knowledge.vue b/frontend/src/components/empty-knowledge.vue
index bff56fff4..87defe3e5 100644
--- a/frontend/src/components/empty-knowledge.vue
+++ b/frontend/src/components/empty-knowledge.vue
@@ -21,7 +21,7 @@ const { t } = useI18n()
.empty-txt {
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 16px;
font-weight: 600;
line-height: 26px;
@@ -31,7 +31,7 @@ const { t } = useI18n()
.empty-type-txt {
color: var(--td-text-color-disabled);
text-align: center;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 400;
width: 217px;
diff --git a/frontend/src/components/manual-knowledge-editor.vue b/frontend/src/components/manual-knowledge-editor.vue
index 23c1d9fda..69a120fcc 100644
--- a/frontend/src/components/manual-knowledge-editor.vue
+++ b/frontend/src/components/manual-knowledge-editor.vue
@@ -971,7 +971,7 @@ onBeforeUnmount(() => {
}
:deep(.t-textarea__inner) {
- font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
+ font-family: var(--app-font-family-mono);
line-height: 1.6;
}
@@ -997,7 +997,7 @@ onBeforeUnmount(() => {
background: var(--td-bg-color-container-hover);
padding: 2px 4px;
border-radius: 4px;
- font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
+ font-family: var(--app-font-family-mono);
}
:deep(pre) {
diff --git a/frontend/src/components/menu.vue b/frontend/src/components/menu.vue
index 2394dbc80..898e3d7a3 100644
--- a/frontend/src/components/menu.vue
+++ b/frontend/src/components/menu.vue
@@ -1106,7 +1106,7 @@ const onDragHandleMouseDown = (e: MouseEvent) => {
.menu_title {
color: var(--td-text-color-secondary);
text-overflow: ellipsis;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-style: normal;
font-weight: 600;
@@ -1118,7 +1118,7 @@ const onDragHandleMouseDown = (e: MouseEvent) => {
}
.submenu {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-style: normal;
overflow-y: auto;
@@ -1161,7 +1161,7 @@ const onDragHandleMouseDown = (e: MouseEvent) => {
}
.timeline_header {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 600;
color: var(--td-text-color-disabled);
diff --git a/frontend/src/components/upload-mask.vue b/frontend/src/components/upload-mask.vue
index aa9534ced..900dd9dd5 100644
--- a/frontend/src/components/upload-mask.vue
+++ b/frontend/src/components/upload-mask.vue
@@ -19,7 +19,7 @@ const { t } = useI18n()
}
.drag-txt {
color: var(--td-brand-color);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 24px;
font-weight: 600;
line-height: 26px;
@@ -31,7 +31,7 @@ const { t } = useI18n()
width: 217px;
color: var(--td-text-color-disabled);
text-align: center;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 400;
}
diff --git a/frontend/src/composables/useFont.ts b/frontend/src/composables/useFont.ts
new file mode 100644
index 000000000..27b8a0e40
--- /dev/null
+++ b/frontend/src/composables/useFont.ts
@@ -0,0 +1,99 @@
+import { ref } from 'vue'
+
+export type FontKey =
+ | 'system'
+ | 'pingfang'
+ | 'inter'
+ | 'helvetica'
+ | 'segoe'
+ | 'roboto'
+ | 'sans-serif'
+
+export type MonoFontKey =
+ | 'system'
+ | 'cascadia'
+ | 'jetbrains'
+ | 'fira'
+ | 'monaco'
+ | 'consolas'
+ | 'monospace'
+
+const SANS_STORAGE_KEY = 'WeKnora_font_sans'
+const MONO_STORAGE_KEY = 'WeKnora_font_mono'
+
+export const SANS_STACKS: Record<FontKey, string> = {
+ system:
+ '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif',
+ pingfang:
+ '"PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, sans-serif',
+ inter:
+ 'Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif',
+ helvetica:
+ '"Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif',
+ segoe:
+ '"Segoe UI", Tahoma, Verdana, Arial, "PingFang SC", "Microsoft YaHei", sans-serif',
+ roboto:
+ 'Roboto, "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif',
+ 'sans-serif': 'sans-serif',
+}
+
+export const MONO_STACKS: Record<MonoFontKey, string> = {
+ system:
+ 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
+ cascadia:
+ '"Cascadia Code", "Cascadia Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
+ jetbrains:
+ '"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
+ fira: '"Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
+ monaco: 'Monaco, Menlo, Consolas, "Courier New", monospace',
+ consolas: 'Consolas, "Courier New", Menlo, Monaco, monospace',
+ monospace: 'monospace',
+}
+
+const DEFAULT_SANS: FontKey = 'system'
+const DEFAULT_MONO: MonoFontKey = 'system'
+
+const isFontKey = (v: string | null): v is FontKey =>
+ !!v && Object.prototype.hasOwnProperty.call(SANS_STACKS, v)
+
+const isMonoFontKey = (v: string | null): v is MonoFontKey =>
+ !!v && Object.prototype.hasOwnProperty.call(MONO_STACKS, v)
+
+const currentSans = ref<FontKey>(
+ isFontKey(localStorage.getItem(SANS_STORAGE_KEY))
+ ? (localStorage.getItem(SANS_STORAGE_KEY) as FontKey)
+ : DEFAULT_SANS,
+)
+
+const currentMono = ref<MonoFontKey>(
+ isMonoFontKey(localStorage.getItem(MONO_STORAGE_KEY))
+ ? (localStorage.getItem(MONO_STORAGE_KEY) as MonoFontKey)
+ : DEFAULT_MONO,
+)
+
+function applyFont(sans: FontKey, mono: MonoFontKey) {
+ const root = document.documentElement
+ root.style.setProperty('--app-font-family', SANS_STACKS[sans])
+ root.style.setProperty('--app-font-family-mono', MONO_STACKS[mono])
+}
+
+export function useFont() {
+ function setSansFont(key: FontKey) {
+ currentSans.value = key
+ localStorage.setItem(SANS_STORAGE_KEY, key)
+ applyFont(currentSans.value, currentMono.value)
+ }
+
+ function setMonoFont(key: MonoFontKey) {
+ currentMono.value = key
+ localStorage.setItem(MONO_STORAGE_KEY, key)
+ applyFont(currentSans.value, currentMono.value)
+ }
+
+ return { currentSans, currentMono, setSansFont, setMonoFont }
+}
+
+/** Call once in main.ts to apply persisted font preferences before mount. */
+export function initFont() {
+ applyFont(currentSans.value, currentMono.value)
+}
diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts
index 068cc8722..f033c1cef 100755
--- a/frontend/src/i18n/locales/en-US.ts
+++ b/frontend/src/i18n/locales/en-US.ts
@@ -2562,6 +2562,31 @@ export default {
system: 'Follow System',
selectTheme: 'Select theme',
},
+ font: {
+ uiFont: 'Interface Font',
+ uiFontDescription: 'Font used across the entire interface (sidebar, breadcrumbs, settings, etc.)',
+ monoFont: 'Monospace Font',
+ monoFontDescription: 'Font used for code blocks, API keys and technical identifiers',
+ selectFont: 'Select font',
+ sans: {
+ system: 'System Default',
+ pingfang: 'PingFang SC',
+ inter: 'Inter',
+ helvetica: 'Helvetica / Arial',
+ segoe: 'Segoe UI',
+ roboto: 'Roboto',
+ sansSerif: 'Generic Sans-Serif',
+ },
+ mono: {
+ system: 'System Default',
+ cascadia: 'Cascadia Code',
+ jetbrains: 'JetBrains Mono',
+ fira: 'Fira Code',
+ monaco: 'Monaco / Menlo',
+ consolas: 'Consolas',
+ monospace: 'Generic Monospace',
+ },
+ },
platform: {
subtitle: 'Enterprise-level Intelligent Document Retrieval Framework',
description: 'Making complex document understanding and precise retrieval simple',
diff --git a/frontend/src/i18n/locales/ko-KR.ts b/frontend/src/i18n/locales/ko-KR.ts
index c6c3669bd..100f557e3 100755
--- a/frontend/src/i18n/locales/ko-KR.ts
+++ b/frontend/src/i18n/locales/ko-KR.ts
@@ -1932,6 +1932,31 @@ export default {
system: "시스템 설정",
selectTheme: "테마 선택",
},
+ font: {
+ uiFont: "인터페이스 글꼴",
+ uiFontDescription: "사이드바, 브레드크럼, 설정 등 인터페이스 전반에 사용되는 글꼴입니다",
+ monoFont: "고정폭 글꼴",
+ monoFontDescription: "코드 블록, API 키, 기술 식별자에 사용되는 글꼴입니다",
+ selectFont: "글꼴 선택",
+ sans: {
+ system: "시스템 기본",
+ pingfang: "PingFang SC",
+ inter: "Inter",
+ helvetica: "Helvetica / Arial",
+ segoe: "Segoe UI",
+ roboto: "Roboto",
+ sansSerif: "일반 산세리프",
+ },
+ mono: {
+ system: "시스템 기본",
+ cascadia: "Cascadia Code",
+ jetbrains: "JetBrains Mono",
+ fira: "Fira Code",
+ monaco: "Monaco / Menlo",
+ consolas: "Consolas",
+ monospace: "일반 고정폭",
+ },
+ },
platform: {
subtitle: "엔터프라이즈급 지능형 문서 검색 프레임워크",
description: "복잡한 문서 이해와 정확한 검색을 간단하게",
diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.ts
index 7511d4304..8cadbefa3 100755
--- a/frontend/src/i18n/locales/ru-RU.ts
+++ b/frontend/src/i18n/locales/ru-RU.ts
@@ -2369,6 +2369,31 @@ export default {
system: 'Системная',
selectTheme: 'Выбрать тему'
},
+ font: {
+ uiFont: 'Шрифт интерфейса',
+ uiFontDescription: 'Шрифт, используемый во всём интерфейсе (боковая панель, навигация, настройки и т. д.)',
+ monoFont: 'Моноширинный шрифт',
+ monoFontDescription: 'Шрифт для блоков кода, API-ключей и технических идентификаторов',
+ selectFont: 'Выбрать шрифт',
+ sans: {
+ system: 'Системный по умолчанию',
+ pingfang: 'PingFang SC',
+ inter: 'Inter',
+ helvetica: 'Helvetica / Arial',
+ segoe: 'Segoe UI',
+ roboto: 'Roboto',
+ sansSerif: 'Стандартный без засечек',
+ },
+ mono: {
+ system: 'Системный по умолчанию',
+ cascadia: 'Cascadia Code',
+ jetbrains: 'JetBrains Mono',
+ fira: 'Fira Code',
+ monaco: 'Monaco / Menlo',
+ consolas: 'Consolas',
+ monospace: 'Стандартный моноширинный',
+ },
+ },
platform: {
subtitle: 'Корпоративная платформа интеллектуального поиска документов',
description: 'Упрощение понимания сложных документов и точного поиска',
diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts
index 4ead228f9..55879059b 100755
--- a/frontend/src/i18n/locales/zh-CN.ts
+++ b/frontend/src/i18n/locales/zh-CN.ts
@@ -1910,6 +1910,31 @@ export default {
system: "跟随系统",
selectTheme: "选择主题",
},
+ font: {
+ uiFont: "界面字体",
+ uiFontDescription: "应用于整个界面(侧边栏、面包屑、设置等)的字体",
+ monoFont: "等宽字体",
+ monoFontDescription: "用于代码块、API 密钥和技术标识符的字体",
+ selectFont: "选择字体",
+ sans: {
+ system: "系统默认",
+ pingfang: "苹方 PingFang SC",
+ inter: "Inter",
+ helvetica: "Helvetica / Arial",
+ segoe: "Segoe UI",
+ roboto: "Roboto",
+ sansSerif: "通用无衬线",
+ },
+ mono: {
+ system: "系统默认",
+ cascadia: "Cascadia Code",
+ jetbrains: "JetBrains Mono",
+ fira: "Fira Code",
+ monaco: "Monaco / Menlo",
+ consolas: "Consolas",
+ monospace: "通用等宽",
+ },
+ },
platform: {
subtitle: "企业级智能文档检索框架",
description: "让复杂文档理解与精准检索变得简单",
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index 2bd086b6d..d797d3a05 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -10,12 +10,14 @@ import "@/assets/theme/theme.css";
import "@/assets/dropdown-menu.less";
import i18n from "./i18n";
import { initTheme } from "@/composables/useTheme";
+import { initFont } from "@/composables/useFont";
import { installTDesignIconOfflineGuard } from "@/utils/tdesign-icon-offline";
// 必须在 Vue 组件挂载之前执行,避免 tdesign-icons 运行时请求 tdesign.gtimg.com
installTDesignIconOfflineGuard();
initTheme();
+initFont();
const app = createApp(App);
diff --git a/frontend/src/views/agent/AgentEditorModal.vue b/frontend/src/views/agent/AgentEditorModal.vue
index 3aaeb2e11..b7209249b 100644
--- a/frontend/src/views/agent/AgentEditorModal.vue
+++ b/frontend/src/views/agent/AgentEditorModal.vue
@@ -3629,7 +3629,7 @@ const handleSave = async () => {
.sidebar-title {
margin: 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 18px;
font-weight: 600;
color: var(--td-text-color-primary);
@@ -3649,7 +3649,7 @@ const handleSave = async () => {
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
color: var(--td-text-color-secondary);
@@ -3934,7 +3934,7 @@ const handleSave = async () => {
.slider-value {
width: 40px;
text-align: right;
- font-family: monospace;
+ font-family: var(--app-font-family-mono);
font-size: 14px;
color: var(--td-text-color-primary);
}
@@ -4480,7 +4480,7 @@ const handleSave = async () => {
// 系统提示词输入框样式
.system-prompt-textarea {
width: 100%;
- font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 13px;
:deep(textarea) {
@@ -4528,7 +4528,7 @@ const handleSave = async () => {
align-items: center;
padding: 1px 5px;
border-radius: 3px;
- font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 11px;
color: var(--td-text-color-primary, #333);
background-color: var(--td-bg-color-secondarycontainer, #f3f3f3);
@@ -4585,7 +4585,7 @@ const handleSave = async () => {
background: var(--td-bg-color-container-hover, #f5f7fa);
padding: 2px 5px;
border-radius: 3px;
- font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 11px;
color: var(--td-brand-color, #0052d9);
}
diff --git a/frontend/src/views/agent/AgentList.vue b/frontend/src/views/agent/AgentList.vue
index c0e8a662c..601ddb24a 100644
--- a/frontend/src/views/agent/AgentList.vue
+++ b/frontend/src/views/agent/AgentList.vue
@@ -1027,7 +1027,7 @@ defineExpose({
h2 {
margin: 0;
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 24px;
font-weight: 600;
line-height: 32px;
@@ -1098,7 +1098,7 @@ defineExpose({
.header-subtitle {
margin: 0;
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 20px;
@@ -1153,7 +1153,7 @@ defineExpose({
padding: 12px 0;
cursor: pointer;
color: var(--td-text-color-secondary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
transition: color 0.2s;
@@ -1193,7 +1193,7 @@ defineExpose({
.org-source-text {
color: var(--td-text-color-secondary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 11px;
font-weight: 500;
flex-shrink: 0;
@@ -1207,7 +1207,7 @@ defineExpose({
border-radius: 10px;
background: var(--td-bg-color-container-hover);
color: var(--td-text-color-secondary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 11px;
font-weight: 500;
flex-shrink: 0;
@@ -1383,7 +1383,7 @@ defineExpose({
.card-title {
color: var(--td-text-color-primary);
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
font-size: 15px;
font-weight: 600;
line-height: 22px;
@@ -1403,7 +1403,7 @@ defineExpose({
border-radius: 10px;
background: var(--td-bg-color-container-hover);
color: var(--td-text-color-secondary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 11px;
font-weight: 500;
flex-shrink: 0;
@@ -1504,7 +1504,7 @@ defineExpose({
line-clamp: 2;
overflow: hidden;
color: var(--td-text-color-secondary);
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 400;
line-height: 18px;
@@ -1598,7 +1598,7 @@ defineExpose({
.card-time {
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 400;
}
@@ -1619,7 +1619,7 @@ defineExpose({
.empty-txt {
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 16px;
font-weight: 600;
line-height: 26px;
@@ -1628,7 +1628,7 @@ defineExpose({
.empty-desc {
color: var(--td-text-color-disabled);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 22px;
@@ -1696,7 +1696,7 @@ defineExpose({
.circle-title {
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 16px;
font-weight: 600;
line-height: 24px;
@@ -1704,7 +1704,7 @@ defineExpose({
.del-circle-txt {
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 22px;
@@ -1722,7 +1722,7 @@ defineExpose({
.circle-btn-txt {
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 22px;
@@ -1768,7 +1768,7 @@ defineExpose({
box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
display: flex;
flex-direction: column;
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
}
.shared-detail-drawer-header {
diff --git a/frontend/src/views/auth/Login.vue b/frontend/src/views/auth/Login.vue
index 0d280b52d..e7e1c638e 100755
--- a/frontend/src/views/auth/Login.vue
+++ b/frontend/src/views/auth/Login.vue
@@ -837,7 +837,7 @@ onMounted(async () => {
font-size: 22px;
color: rgba(255, 255, 255, 0.95);
margin: 0 0 8px 0;
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
line-height: 1.4;
font-weight: 500;
}
@@ -846,7 +846,7 @@ onMounted(async () => {
font-size: 15px;
color: rgba(255, 255, 255, 0.8);
margin: 0 0 28px 0;
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
line-height: 1.5;
}
@@ -865,7 +865,7 @@ onMounted(async () => {
color: var(--td-text-color-anti);
font-size: 14px;
font-weight: 500;
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
}
/* Carousel */
@@ -978,7 +978,7 @@ onMounted(async () => {
text-decoration: none;
font-size: 13px;
font-weight: 600;
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
letter-spacing: 0.2px;
cursor: pointer;
position: relative;
@@ -1039,7 +1039,7 @@ onMounted(async () => {
padding: 10px 14px;
cursor: pointer;
font-size: 13px;
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
color: var(--td-text-color-primary);
.lang-flag { font-size: 16px; flex-shrink: 0; }
@@ -1076,21 +1076,21 @@ onMounted(async () => {
font-weight: 600;
color: var(--td-text-color-primary);
margin: 0 0 6px 0;
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
}
.form-welcome {
font-size: 13px;
color: var(--td-text-color-secondary);
margin: 0;
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
}
.form-subtitle {
font-size: 13px;
color: var(--td-text-color-secondary);
margin: 0;
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
}
.form-content {
@@ -1099,7 +1099,7 @@ onMounted(async () => {
color: var(--td-text-color-primary);
font-weight: 500;
margin-bottom: 8px;
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
display: block;
text-align: left;
}
@@ -1125,7 +1125,7 @@ onMounted(async () => {
outline: none !important;
background: transparent;
font-size: 15px;
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
&:focus {
border: none !important;
@@ -1158,7 +1158,7 @@ onMounted(async () => {
border-radius: 8px;
font-size: 16px;
font-weight: 500;
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
margin: 20px 0 16px 0;
}
@@ -1197,7 +1197,7 @@ onMounted(async () => {
text-align: center;
font-size: 14px;
color: var(--td-text-color-secondary);
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
margin-top: 16px;
padding-bottom: 16px;
border-bottom: 1px solid var(--td-component-stroke);
@@ -1232,7 +1232,7 @@ onMounted(async () => {
margin-bottom: 12px;
font-size: 13px;
color: var(--td-text-color-secondary);
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
&:last-child {
margin-bottom: 0;
diff --git a/frontend/src/views/chat/components/AgentStreamDisplay.vue b/frontend/src/views/chat/components/AgentStreamDisplay.vue
index e78587a94..551b2ee9a 100644
--- a/frontend/src/views/chat/components/AgentStreamDisplay.vue
+++ b/frontend/src/views/chat/components/AgentStreamDisplay.vue
@@ -2413,7 +2413,7 @@ const handleAddToKnowledge = (answerEvent: any) => {
background: var(--td-bg-color-secondarycontainer);
padding: 2px 5px;
border-radius: 3px;
- font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 11px;
}
@@ -2962,7 +2962,7 @@ const handleAddToKnowledge = (answerEvent: any) => {
padding: 0;
.detail-output {
- font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 11px;
color: var(--td-text-color-primary);
padding: 12px;
@@ -3199,7 +3199,7 @@ const handleAddToKnowledge = (answerEvent: any) => {
background: var(--td-bg-color-container);
padding: 10px;
border-radius: 6px;
- font-family: 'Monaco', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
color: var(--td-text-color-primary);
margin: 0;
overflow-x: auto;
@@ -3372,7 +3372,7 @@ const handleAddToKnowledge = (answerEvent: any) => {
}
code {
- font-family: monospace;
+ font-family: var(--app-font-family-mono);
font-size: 13px;
padding: 2px 4px;
background: var(--td-bg-color-secondarycontainer);
diff --git a/frontend/src/views/chat/components/ToolResultRenderer.vue b/frontend/src/views/chat/components/ToolResultRenderer.vue
index 631e77455..29ced3e7f 100644
--- a/frontend/src/views/chat/components/ToolResultRenderer.vue
+++ b/frontend/src/views/chat/components/ToolResultRenderer.vue
@@ -172,7 +172,7 @@ const toolArguments = computed(() => props.arguments || {});
padding: 0;
.detail-output {
- font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 12px;
color: var(--td-text-color-primary);
padding: 16px;
diff --git a/frontend/src/views/chat/components/botmsg.vue b/frontend/src/views/chat/components/botmsg.vue
index 90f3db570..047bec12f 100644
--- a/frontend/src/views/chat/components/botmsg.vue
+++ b/frontend/src/views/chat/components/botmsg.vue
@@ -386,7 +386,7 @@ onBeforeUnmount(() => {
background: var(--td-bg-color-secondarycontainer);
padding: 2px 5px;
border-radius: 3px;
- font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 11px;
}
diff --git a/frontend/src/views/chat/components/tool-results/ChunkDetail.vue b/frontend/src/views/chat/components/tool-results/ChunkDetail.vue
index ee1b36a59..2533b8988 100644
--- a/frontend/src/views/chat/components/tool-results/ChunkDetail.vue
+++ b/frontend/src/views/chat/components/tool-results/ChunkDetail.vue
@@ -79,7 +79,7 @@ function fallbackCopy(text: string) {
}
code {
- font-family: 'Monaco', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 11px;
background: var(--td-bg-color-secondarycontainer);
padding: 2px 4px;
diff --git a/frontend/src/views/chat/components/tool-results/ContentPopup.vue b/frontend/src/views/chat/components/tool-results/ContentPopup.vue
index 5c2fb6c95..d0168fe4e 100644
--- a/frontend/src/views/chat/components/tool-results/ContentPopup.vue
+++ b/frontend/src/views/chat/components/tool-results/ContentPopup.vue
@@ -111,7 +111,7 @@ const processedContent = computed(() => {
flex: 1;
code {
- font-family: 'Monaco', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 10px;
background: var(--td-bg-color-secondarycontainer);
padding: 1px 4px;
diff --git a/frontend/src/views/chat/components/tool-results/DocumentInfo.vue b/frontend/src/views/chat/components/tool-results/DocumentInfo.vue
index bce774627..5d3bd638c 100644
--- a/frontend/src/views/chat/components/tool-results/DocumentInfo.vue
+++ b/frontend/src/views/chat/components/tool-results/DocumentInfo.vue
@@ -251,7 +251,7 @@ const formatMetadataValue = (value: unknown) => {
}
.metadata-value {
- font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
color: var(--td-text-color-primary);
}
}
@@ -267,7 +267,7 @@ const formatMetadataValue = (value: unknown) => {
}
code {
- font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 10px;
background: var(--td-bg-color-secondarycontainer);
padding: 2px 4px;
diff --git a/frontend/src/views/chat/components/tool-results/KnowledgeBaseList.vue b/frontend/src/views/chat/components/tool-results/KnowledgeBaseList.vue
index 921d2ce4b..ebb8afb58 100644
--- a/frontend/src/views/chat/components/tool-results/KnowledgeBaseList.vue
+++ b/frontend/src/views/chat/components/tool-results/KnowledgeBaseList.vue
@@ -98,7 +98,7 @@ const props = defineProps<{
}
code {
- font-family: 'Monaco', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 11px;
background: var(--td-bg-color-secondarycontainer);
padding: 2px 4px;
diff --git a/frontend/src/views/chat/components/tool-results/RelatedChunks.vue b/frontend/src/views/chat/components/tool-results/RelatedChunks.vue
index 0b93bc362..7810e760b 100644
--- a/frontend/src/views/chat/components/tool-results/RelatedChunks.vue
+++ b/frontend/src/views/chat/components/tool-results/RelatedChunks.vue
@@ -144,7 +144,7 @@ const props = defineProps<{
}
code {
- font-family: 'Monaco', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 11px;
background: var(--td-bg-color-secondarycontainer);
padding: 2px 4px;
diff --git a/frontend/src/views/chat/components/tool-results/SearchResults.vue b/frontend/src/views/chat/components/tool-results/SearchResults.vue
index d3960c607..e8fbf4497 100644
--- a/frontend/src/views/chat/components/tool-results/SearchResults.vue
+++ b/frontend/src/views/chat/components/tool-results/SearchResults.vue
@@ -237,7 +237,7 @@ const getRelevanceLabel = (level: RelevanceLevel): string => {
}
code {
- font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 10px;
background: var(--td-bg-color-secondarycontainer);
padding: 1px 4px;
diff --git a/frontend/src/views/chat/components/tool-results/WikiEditResult.vue b/frontend/src/views/chat/components/tool-results/WikiEditResult.vue
index 5839edaa9..f0b691c92 100644
--- a/frontend/src/views/chat/components/tool-results/WikiEditResult.vue
+++ b/frontend/src/views/chat/components/tool-results/WikiEditResult.vue
@@ -237,7 +237,7 @@ const headerTitle = computed(() => {
border: 1px solid @card-border;
border-radius: 4px;
overflow: hidden;
- font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 12px;
}
@@ -308,7 +308,7 @@ const headerTitle = computed(() => {
}
code {
- font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 11px;
background: var(--td-bg-color-secondarycontainer);
padding: 2px 5px;
diff --git a/frontend/src/views/chat/components/tool-results/tool-results.less b/frontend/src/views/chat/components/tool-results/tool-results.less
index ecfe70b3b..63d80a823 100644
--- a/frontend/src/views/chat/components/tool-results/tool-results.less
+++ b/frontend/src/views/chat/components/tool-results/tool-results.less
@@ -301,7 +301,7 @@
// Code block
.code-block {
- font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 11px;
background: var(--td-bg-color-secondarycontainer);
padding: 8px;
diff --git a/frontend/src/views/creatChat/creatChat.vue b/frontend/src/views/creatChat/creatChat.vue
index eb36c8e4c..215f3fc7e 100644
--- a/frontend/src/views/creatChat/creatChat.vue
+++ b/frontend/src/views/creatChat/creatChat.vue
@@ -258,7 +258,7 @@ const handleKBEditorSuccess = (kbId: string) => {
.dialogue-title {
display: flex;
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 28px;
font-weight: 600;
align-items: center;
diff --git a/frontend/src/views/dev/MarkdownTestPage.vue b/frontend/src/views/dev/MarkdownTestPage.vue
index 82c417aad..9434b8290 100644
--- a/frontend/src/views/dev/MarkdownTestPage.vue
+++ b/frontend/src/views/dev/MarkdownTestPage.vue
@@ -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) {
diff --git a/frontend/src/views/knowledge/KnowledgeBase.vue b/frontend/src/views/knowledge/KnowledgeBase.vue
index 8f79bdc99..ab3b007d2 100644
--- a/frontend/src/views/knowledge/KnowledgeBase.vue
+++ b/frontend/src/views/knowledge/KnowledgeBase.vue
@@ -2747,7 +2747,7 @@ async function createNewSession(value: string): Promise<void> {
color: var(--td-text-color-primary);
cursor: pointer;
transition: all 0.2s ease;
- font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
+ font-family: var(--app-font-family);
font-size: 13px;
-webkit-font-smoothing: antialiased;
@@ -2770,7 +2770,7 @@ async function createNewSession(value: string): Promise<void> {
}
.tag-hash-icon {
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
+ font-family: var(--app-font-family-mono);
font-size: 16px;
font-weight: 500;
width: 16px;
@@ -2785,7 +2785,7 @@ async function createNewSession(value: string): Promise<void> {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
- font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
+ font-family: var(--app-font-family);
font-size: 13px;
font-weight: 400;
line-height: 1.4;
@@ -2979,7 +2979,7 @@ async function createNewSession(value: string): Promise<void> {
cursor: pointer;
transition: all 0.2s ease;
color: var(--td-text-color-primary);
- font-family: 'PingFang SC';
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
@@ -3267,7 +3267,7 @@ async function createNewSession(value: string): Promise<void> {
h2 {
margin: 0;
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 24px;
font-weight: 600;
line-height: 32px;
@@ -3276,7 +3276,7 @@ async function createNewSession(value: string): Promise<void> {
.document-subtitle {
margin: 0;
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 20px;
@@ -3571,7 +3571,7 @@ async function createNewSession(value: string): Promise<void> {
.circle-title {
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 16px;
font-weight: 600;
line-height: 24px;
@@ -3579,7 +3579,7 @@ async function createNewSession(value: string): Promise<void> {
.del-circle-txt {
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 22px;
@@ -3597,7 +3597,7 @@ async function createNewSession(value: string): Promise<void> {
.circle-btn-txt {
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 22px;
@@ -3900,7 +3900,7 @@ async function createNewSession(value: string): Promise<void> {
.card-analyze-txt {
color: var(--td-brand-color);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 11px;
margin-left: 8px;
}
@@ -3927,7 +3927,7 @@ async function createNewSession(value: string): Promise<void> {
text-overflow: ellipsis;
white-space: nowrap;
color: var(--td-text-color-primary);
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
font-size: 15px;
font-weight: 600;
letter-spacing: 0.01em;
@@ -3967,7 +3967,7 @@ async function createNewSession(value: string): Promise<void> {
line-clamp: 2;
overflow: hidden;
color: var(--td-text-color-secondary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 400;
line-height: 19px;
@@ -3989,14 +3989,14 @@ async function createNewSession(value: string): Promise<void> {
.card-time {
color: var(--td-text-color-secondary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 400;
}
.card-type {
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 11px;
font-weight: 500;
padding: 0;
@@ -4022,7 +4022,7 @@ async function createNewSession(value: string): Promise<void> {
border: 1px solid var(--td-component-stroke);
border-radius: 8px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
transition: opacity 0.15s ease;
.card-popover-title {
@@ -4166,7 +4166,7 @@ async function createNewSession(value: string): Promise<void> {
.knowledge-card-upload {
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
cursor: pointer;
@@ -4189,7 +4189,7 @@ async function createNewSession(value: string): Promise<void> {
.upload-described {
color: var(--td-text-color-disabled);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 400;
text-align: center;
diff --git a/frontend/src/views/knowledge/KnowledgeBaseEditorModal.vue b/frontend/src/views/knowledge/KnowledgeBaseEditorModal.vue
index 3a4adbdd5..63f09fad6 100644
--- a/frontend/src/views/knowledge/KnowledgeBaseEditorModal.vue
+++ b/frontend/src/views/knowledge/KnowledgeBaseEditorModal.vue
@@ -1228,7 +1228,7 @@ watch(
.sidebar-title {
margin: 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 18px;
font-weight: 600;
color: var(--td-text-color-primary);
@@ -1248,7 +1248,7 @@ watch(
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
color: var(--td-text-color-secondary);
@@ -1326,7 +1326,7 @@ watch(
.section-title {
margin: 0 0 8px 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 20px;
font-weight: 600;
color: var(--td-text-color-primary);
@@ -1334,7 +1334,7 @@ watch(
.section-desc {
margin: 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
color: var(--td-text-color-placeholder);
line-height: 22px;
@@ -1356,7 +1356,7 @@ watch(
.form-label {
display: block;
margin-bottom: 8px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 15px;
font-weight: 500;
color: var(--td-text-color-primary);
diff --git a/frontend/src/views/knowledge/KnowledgeBaseList.vue b/frontend/src/views/knowledge/KnowledgeBaseList.vue
index 3465adb7f..f6feaaa06 100644
--- a/frontend/src/views/knowledge/KnowledgeBaseList.vue
+++ b/frontend/src/views/knowledge/KnowledgeBaseList.vue
@@ -1255,7 +1255,7 @@ const handleUploadFinishedEvent = (event: Event) => {
h2 {
margin: 0;
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 24px;
font-weight: 600;
line-height: 32px;
@@ -1304,7 +1304,7 @@ const handleUploadFinishedEvent = (event: Event) => {
.header-subtitle {
margin: 0;
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 20px;
@@ -1349,7 +1349,7 @@ const handleUploadFinishedEvent = (event: Event) => {
padding: 12px 0;
cursor: pointer;
color: var(--td-text-color-secondary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
user-select: none;
@@ -1525,7 +1525,7 @@ const handleUploadFinishedEvent = (event: Event) => {
border: 1px solid var(--td-warning-color-focus);
border-radius: 6px;
color: var(--td-warning-color);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
.t-icon {
@@ -1564,7 +1564,7 @@ const handleUploadFinishedEvent = (event: Event) => {
.progress-title {
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 600;
line-height: 22px;
@@ -1573,7 +1573,7 @@ const handleUploadFinishedEvent = (event: Event) => {
.progress-subtitle {
color: var(--td-text-color-secondary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
line-height: 18px;
}
@@ -1796,7 +1796,7 @@ const handleUploadFinishedEvent = (event: Event) => {
.card-title {
color: var(--td-text-color-primary);
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
font-size: 15px;
font-weight: 600;
line-height: 22px;
@@ -1858,7 +1858,7 @@ const handleUploadFinishedEvent = (event: Event) => {
line-clamp: 2;
overflow: hidden;
color: var(--td-text-color-secondary);
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 400;
line-height: 18px;
@@ -2050,7 +2050,7 @@ const handleUploadFinishedEvent = (event: Event) => {
.card-time {
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 400;
}
@@ -2072,7 +2072,7 @@ const handleUploadFinishedEvent = (event: Event) => {
.empty-txt {
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 16px;
font-weight: 600;
line-height: 26px;
@@ -2081,7 +2081,7 @@ const handleUploadFinishedEvent = (event: Event) => {
.empty-desc {
color: var(--td-text-color-disabled);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 22px;
@@ -2149,7 +2149,7 @@ const handleUploadFinishedEvent = (event: Event) => {
.circle-title {
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 16px;
font-weight: 600;
line-height: 24px;
@@ -2157,7 +2157,7 @@ const handleUploadFinishedEvent = (event: Event) => {
.del-circle-txt {
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 22px;
@@ -2175,7 +2175,7 @@ const handleUploadFinishedEvent = (event: Event) => {
.circle-btn-txt {
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 22px;
@@ -2211,7 +2211,7 @@ const handleUploadFinishedEvent = (event: Event) => {
background: transparent;
color: var(--td-brand-color);
font-size: 13px;
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
cursor: pointer;
transition: background 0.2s ease, color 0.2s ease;
@@ -2246,7 +2246,7 @@ const handleUploadFinishedEvent = (event: Event) => {
box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
display: flex;
flex-direction: column;
- font-family: "PingFang SC", sans-serif;
+ font-family: var(--app-font-family);
}
.shared-detail-drawer-header {
@@ -2367,7 +2367,7 @@ const handleUploadFinishedEvent = (event: Event) => {
// 创建对话框样式优化
.create-kb-dialog {
.t-form-item__label {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 500;
color: var(--td-text-color-primary);
@@ -2375,7 +2375,7 @@ const handleUploadFinishedEvent = (event: Event) => {
.t-input,
.t-textarea {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
}
.t-button--theme-primary {
diff --git a/frontend/src/views/knowledge/KnowledgeSearch.vue b/frontend/src/views/knowledge/KnowledgeSearch.vue
index ab0b84b54..9b83ea39e 100644
--- a/frontend/src/views/knowledge/KnowledgeSearch.vue
+++ b/frontend/src/views/knowledge/KnowledgeSearch.vue
@@ -571,7 +571,7 @@ onMounted(() => {
h2 {
margin: 0;
color: var(--td-text-color-primary);
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
font-size: 24px;
font-weight: 600;
line-height: 32px;
@@ -581,7 +581,7 @@ onMounted(() => {
.header-subtitle {
margin: 0;
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 20px;
@@ -913,7 +913,7 @@ onMounted(() => {
font-size: 11px;
color: var(--td-text-color-disabled);
font-weight: 600;
- font-family: "SF Mono", "Monaco", monospace;
+ font-family: var(--app-font-family-mono);
}
.match-badge {
@@ -935,7 +935,7 @@ onMounted(() => {
.chunk-score {
font-size: 11px;
color: var(--td-text-color-placeholder);
- font-family: "SF Mono", "Monaco", monospace;
+ font-family: var(--app-font-family-mono);
}
.chunk-content {
diff --git a/frontend/src/views/knowledge/components/DocumentListView.vue b/frontend/src/views/knowledge/components/DocumentListView.vue
index 6a12e5961..63c6467df 100644
--- a/frontend/src/views/knowledge/components/DocumentListView.vue
+++ b/frontend/src/views/knowledge/components/DocumentListView.vue
@@ -340,7 +340,7 @@ const handleAction = (action: 'edit' | 'reparse' | 'move' | 'delete', item: Know
height: 40px;
font-size: 12px;
font-weight: 500;
- font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
+ font-family: var(--app-font-family);
color: var(--td-text-color-secondary);
background: var(--td-bg-color-secondarycontainer);
border-bottom: 1px solid var(--td-component-stroke);
@@ -402,7 +402,7 @@ const handleAction = (action: 'edit' | 'reparse' | 'move' | 'delete', item: Know
.cell-name {
gap: 10px;
- font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
+ font-family: var(--app-font-family);
}
.cell-size,
@@ -481,7 +481,7 @@ const handleAction = (action: 'edit' | 'reparse' | 'move' | 'delete', item: Know
.row-mono {
font-variant-numeric: tabular-nums;
font-size: 12px;
- font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
+ font-family: var(--app-font-family);
color: var(--td-text-color-secondary);
}
diff --git a/frontend/src/views/knowledge/components/FAQEntryManager.vue b/frontend/src/views/knowledge/components/FAQEntryManager.vue
index e02ab1306..24aba7a1f 100644
--- a/frontend/src/views/knowledge/components/FAQEntryManager.vue
+++ b/frontend/src/views/knowledge/components/FAQEntryManager.vue
@@ -3459,7 +3459,7 @@ watch(() => entries.value.map(e => ({
color: var(--td-text-color-primary);
cursor: pointer;
transition: all 0.2s ease;
- font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
+ font-family: var(--app-font-family);
font-size: 13px;
-webkit-font-smoothing: antialiased;
@@ -3482,7 +3482,7 @@ watch(() => entries.value.map(e => ({
}
.tag-hash-icon {
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
+ font-family: var(--app-font-family-mono);
font-size: 16px;
font-weight: 500;
width: 16px;
@@ -3497,7 +3497,7 @@ watch(() => entries.value.map(e => ({
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
- font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
+ font-family: var(--app-font-family);
font-size: 13px;
font-weight: 400;
line-height: 1.4;
@@ -3758,7 +3758,7 @@ watch(() => entries.value.map(e => ({
cursor: pointer;
transition: all 0.2s ease;
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
@@ -3896,7 +3896,7 @@ watch(() => entries.value.map(e => ({
h2 {
margin: 0;
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 24px;
font-weight: 600;
line-height: 32px;
@@ -3905,7 +3905,7 @@ watch(() => entries.value.map(e => ({
.faq-subtitle {
margin: 0;
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 20px;
@@ -4062,7 +4062,7 @@ watch(() => entries.value.map(e => ({
}
.result-title {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-weight: 600;
font-size: 14px;
color: var(--td-text-color-primary);
@@ -4075,7 +4075,7 @@ watch(() => entries.value.map(e => ({
gap: 12px;
.result-time {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 13px;
color: var(--td-text-color-secondary);
}
@@ -4112,7 +4112,7 @@ watch(() => entries.value.map(e => ({
display: flex;
align-items: center;
gap: 6px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 13px;
.stat-label {
@@ -4359,7 +4359,7 @@ watch(() => entries.value.map(e => ({
border: 1px solid var(--td-component-stroke);
font-size: 11px;
color: var(--td-text-color-secondary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
.status-icon {
font-size: 13px;
@@ -4428,7 +4428,7 @@ watch(() => entries.value.map(e => ({
background: var(--td-bg-color-container-hover);
font-size: 11px;
font-weight: 400;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
transition: all 0.2s ease;
&:hover {
@@ -4486,7 +4486,7 @@ watch(() => entries.value.map(e => ({
.faq-question {
flex: 1;
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 15px;
font-weight: 600;
line-height: 1.5;
@@ -4518,7 +4518,7 @@ watch(() => entries.value.map(e => ({
.faq-section-label {
color: var(--td-text-color-secondary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
@@ -4609,7 +4609,7 @@ watch(() => entries.value.map(e => ({
max-width: 100%;
min-width: 0;
border-radius: 5px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
flex: 0 1 auto;
:deep(.t-tag) {
@@ -4658,7 +4658,7 @@ watch(() => entries.value.map(e => ({
font-size: 12px;
font-style: italic;
padding: 8px 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
}
@@ -4670,7 +4670,7 @@ watch(() => entries.value.map(e => ({
padding: 24px 16px;
color: var(--td-text-color-secondary);
font-size: 13px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
}
.faq-no-more {
@@ -4702,7 +4702,7 @@ watch(() => entries.value.map(e => ({
.empty-text {
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 18px;
font-weight: 600;
line-height: 28px;
@@ -4710,7 +4710,7 @@ watch(() => entries.value.map(e => ({
.empty-desc {
color: var(--td-text-color-secondary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 22px;
@@ -4780,7 +4780,7 @@ watch(() => entries.value.map(e => ({
.import-title {
margin: 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 18px;
font-weight: 600;
color: var(--td-text-color-primary);
@@ -4848,7 +4848,7 @@ watch(() => entries.value.map(e => ({
display: flex;
align-items: center;
gap: 6px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 13px;
font-weight: 500;
padding: 6px 14px;
@@ -4879,7 +4879,7 @@ watch(() => entries.value.map(e => ({
.import-form-label {
display: block;
margin-bottom: 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 500;
color: var(--td-text-color-primary);
@@ -4903,7 +4903,7 @@ watch(() => entries.value.map(e => ({
}
.t-radio-button {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
border-color: var(--td-component-stroke);
transition: all 0.2s ease;
@@ -4994,20 +4994,20 @@ watch(() => entries.value.map(e => ({
}
.upload-primary-text {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 500;
color: var(--td-text-color-primary);
}
.upload-secondary-text {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
color: var(--td-text-color-secondary);
}
.upload-file-name {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 500;
color: var(--td-brand-color);
@@ -5017,7 +5017,7 @@ watch(() => entries.value.map(e => ({
// 导入表单提示
.import-form-tip {
margin-top: 8px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
color: var(--td-text-color-disabled);
line-height: 18px;
@@ -5047,7 +5047,7 @@ watch(() => entries.value.map(e => ({
}
.preview-title {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 500;
color: var(--td-text-color-primary);
@@ -5086,14 +5086,14 @@ watch(() => entries.value.map(e => ({
background: linear-gradient(135deg, var(--td-brand-color) 0%, var(--td-brand-color-active) 100%);
color: var(--td-text-color-anti);
border-radius: 4px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 600;
}
.preview-question {
flex: 1;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 13px;
color: var(--td-text-color-primary);
line-height: 1.5;
@@ -5104,7 +5104,7 @@ watch(() => entries.value.map(e => ({
margin-top: 8px;
padding-top: 8px;
border-top: 1px solid var(--td-component-stroke);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
color: var(--td-text-color-secondary);
text-align: center;
@@ -5127,7 +5127,7 @@ watch(() => entries.value.map(e => ({
.t-drawer__header {
padding: 20px 24px;
border-bottom: 1px solid var(--td-component-stroke);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 18px;
font-weight: 600;
color: var(--td-text-color-primary);
@@ -5208,7 +5208,7 @@ watch(() => entries.value.map(e => ({
height: 32px;
min-width: 32px;
padding: 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
transition: all 0.2s ease;
border-radius: 8px;
}
@@ -5259,7 +5259,7 @@ watch(() => entries.value.map(e => ({
.item-count {
font-size: 13px;
color: var(--td-text-color-secondary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-weight: 500;
text-align: right;
padding-right: 40px;
@@ -5315,7 +5315,7 @@ watch(() => entries.value.map(e => ({
font-size: 14px;
line-height: 1.6;
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
white-space: pre-wrap;
word-break: break-word;
padding: 0;
@@ -5361,7 +5361,7 @@ watch(() => entries.value.map(e => ({
margin-top: 6px;
font-size: 12px;
color: var(--td-text-color-disabled);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
}
// FAQ编辑器表单样式 - 完全参考设置页面
@@ -5586,7 +5586,7 @@ watch(() => entries.value.map(e => ({
// Input 组件样式 - 与登录页面一致
:deep(.t-input) {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
border: 1px solid var(--td-component-stroke);
border-radius: 8px;
@@ -5608,7 +5608,7 @@ watch(() => entries.value.map(e => ({
outline: none !important;
background: transparent;
font-size: 14px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
padding: 6px 12px;
color: var(--td-text-color-primary);
@@ -5631,7 +5631,7 @@ watch(() => entries.value.map(e => ({
// Textarea 组件样式
:deep(.t-textarea) {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
border: 1px solid var(--td-component-stroke);
border-radius: 8px;
@@ -5653,7 +5653,7 @@ watch(() => entries.value.map(e => ({
outline: none !important;
background: transparent;
font-size: 14px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
line-height: 1.6;
resize: vertical;
padding: 6px 12px;
@@ -5732,7 +5732,7 @@ watch(() => entries.value.map(e => ({
.t-drawer__header {
padding: 20px 24px;
border-bottom: 1px solid var(--td-component-stroke);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 18px;
font-weight: 600;
color: var(--td-text-color-primary);
@@ -5871,7 +5871,7 @@ watch(() => entries.value.map(e => ({
flex-shrink: 0;
min-width: 50px;
text-align: right;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 500;
color: var(--td-text-color-primary);
@@ -5883,7 +5883,7 @@ watch(() => entries.value.map(e => ({
.search-button {
height: 36px;
border-radius: 8px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 500;
transition: all 0.2s ease;
@@ -5915,7 +5915,7 @@ watch(() => entries.value.map(e => ({
margin-left: 0;
margin-right: 0;
padding-left: 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 600;
color: var(--td-text-color-primary);
@@ -5933,7 +5933,7 @@ watch(() => entries.value.map(e => ({
justify-content: center;
padding: 48px 16px;
color: var(--td-text-color-secondary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
text-align: center;
background: var(--td-bg-color-container);
@@ -6010,7 +6010,7 @@ watch(() => entries.value.map(e => ({
}
.result-question {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 600;
color: var(--td-text-color-primary);
@@ -6075,7 +6075,7 @@ watch(() => entries.value.map(e => ({
font-size: 12px;
padding: 4px 8px;
border-radius: 6px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
}
.result-body {
@@ -6258,7 +6258,7 @@ watch(() => entries.value.map(e => ({
}
.section-label {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 600;
color: var(--td-text-color-secondary);
diff --git a/frontend/src/views/knowledge/settings/DataSourceEditorDialog.vue b/frontend/src/views/knowledge/settings/DataSourceEditorDialog.vue
index 6adfbd455..77da9f0fa 100644
--- a/frontend/src/views/knowledge/settings/DataSourceEditorDialog.vue
+++ b/frontend/src/views/knowledge/settings/DataSourceEditorDialog.vue
@@ -852,7 +852,7 @@ const stepTitles = computed(() => [
border-radius: 3px;
background: var(--td-bg-color-component);
color: var(--td-text-color-secondary);
- font-family: monospace;
+ font-family: var(--app-font-family-mono);
margin-right: 4px;
}
diff --git a/frontend/src/views/knowledge/settings/KBParserSettings.vue b/frontend/src/views/knowledge/settings/KBParserSettings.vue
index 3d2e59746..5c8784b6f 100644
--- a/frontend/src/views/knowledge/settings/KBParserSettings.vue
+++ b/frontend/src/views/knowledge/settings/KBParserSettings.vue
@@ -384,7 +384,7 @@ watch(() => props.parserEngineRules, (v) => {
background: var(--td-bg-color-secondarycontainer);
padding: 3px 8px;
border-radius: 4px;
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
+ font-family: var(--app-font-family-mono);
}
.desc {
@@ -442,7 +442,7 @@ watch(() => props.parserEngineRules, (v) => {
font-size: 13px;
font-weight: 600;
color: var(--td-text-color-primary);
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
+ font-family: var(--app-font-family-mono);
}
.engine-option-desc {
diff --git a/frontend/src/views/knowledge/settings/KBShareSettings.vue b/frontend/src/views/knowledge/settings/KBShareSettings.vue
index 0b8c9f14a..fe58e0786 100644
--- a/frontend/src/views/knowledge/settings/KBShareSettings.vue
+++ b/frontend/src/views/knowledge/settings/KBShareSettings.vue
@@ -314,7 +314,7 @@ onMounted(async () => {
.section-title {
margin: 0 0 8px 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 20px;
font-weight: 600;
color: var(--td-text-color-primary);
@@ -322,7 +322,7 @@ onMounted(async () => {
.section-desc {
margin: 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
color: var(--td-text-color-placeholder);
line-height: 22px;
@@ -339,7 +339,7 @@ onMounted(async () => {
.form-label {
display: block;
margin-bottom: 8px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 15px;
font-weight: 500;
color: var(--td-text-color-primary);
@@ -381,7 +381,7 @@ onMounted(async () => {
margin-bottom: 16px;
.shares-title {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 15px;
font-weight: 500;
color: var(--td-text-color-primary);
@@ -465,7 +465,7 @@ onMounted(async () => {
gap: 8px;
.org-name {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 500;
color: var(--td-text-color-primary);
@@ -598,7 +598,7 @@ onMounted(async () => {
margin-bottom: 2px;
.org-option-name {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 13px;
font-weight: 500;
color: var(--td-text-color-primary);
@@ -612,7 +612,7 @@ onMounted(async () => {
display: flex;
align-items: center;
gap: 6px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 12px;
color: var(--td-text-color-secondary);
diff --git a/frontend/src/views/knowledge/wiki/WikiBrowser.vue b/frontend/src/views/knowledge/wiki/WikiBrowser.vue
index ef5409139..1c3294bea 100644
--- a/frontend/src/views/knowledge/wiki/WikiBrowser.vue
+++ b/frontend/src/views/knowledge/wiki/WikiBrowser.vue
@@ -2199,7 +2199,7 @@ onUnmounted(() => {
.wiki-link-tag {
color: var(--td-brand-color);
text-decoration: none;
- font-family: monospace;
+ font-family: var(--app-font-family-mono);
font-size: 12px;
padding: 2px 8px;
background: rgba(7, 192, 95, 0.06);
@@ -2245,7 +2245,7 @@ onUnmounted(() => {
}
:deep(code) {
- font-family: monospace;
+ font-family: var(--app-font-family-mono);
font-size: 13px;
padding: 2px 4px;
background: var(--td-bg-color-secondarycontainer);
diff --git a/frontend/src/views/organization/OrganizationEditorModal.vue b/frontend/src/views/organization/OrganizationEditorModal.vue
index 9e861e89c..847a132d5 100644
--- a/frontend/src/views/organization/OrganizationEditorModal.vue
+++ b/frontend/src/views/organization/OrganizationEditorModal.vue
@@ -491,7 +491,7 @@ watch(() => props.mode, () => {
.sidebar-title {
margin: 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 18px;
font-weight: 600;
color: var(--td-text-color-primary);
@@ -511,7 +511,7 @@ watch(() => props.mode, () => {
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
color: var(--td-text-color-secondary);
@@ -560,7 +560,7 @@ watch(() => props.mode, () => {
.section-title {
margin: 0 0 8px 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 16px;
font-weight: 600;
color: var(--td-text-color-primary);
@@ -568,7 +568,7 @@ watch(() => props.mode, () => {
.section-desc {
margin: 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
color: var(--td-text-color-placeholder);
line-height: 22px;
@@ -586,7 +586,7 @@ watch(() => props.mode, () => {
.form-label {
display: block;
margin-bottom: 8px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 500;
color: var(--td-text-color-primary);
diff --git a/frontend/src/views/organization/OrganizationList.vue b/frontend/src/views/organization/OrganizationList.vue
index 982080e78..5b0dc8bc3 100644
--- a/frontend/src/views/organization/OrganizationList.vue
+++ b/frontend/src/views/organization/OrganizationList.vue
@@ -1283,7 +1283,7 @@ onUnmounted(() => {
h2 {
margin: 0;
color: var(--td-text-color-primary);
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
font-size: 24px;
font-weight: 600;
line-height: 32px;
@@ -1341,7 +1341,7 @@ onUnmounted(() => {
.header-subtitle {
margin: 0;
color: var(--td-text-color-secondary);
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 20px;
@@ -1392,7 +1392,7 @@ onUnmounted(() => {
padding: 12px 0;
cursor: pointer;
color: var(--td-text-color-secondary);
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
user-select: none;
@@ -1584,7 +1584,7 @@ onUnmounted(() => {
.card-title {
color: var(--td-text-color-primary);
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
font-size: 15px;
font-weight: 600;
line-height: 22px;
@@ -1645,7 +1645,7 @@ onUnmounted(() => {
line-clamp: 2;
overflow: hidden;
color: var(--td-text-color-secondary);
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 400;
line-height: 18px;
@@ -1685,7 +1685,7 @@ onUnmounted(() => {
border-radius: 5px;
font-size: 11px;
font-weight: 500;
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
cursor: default;
transition: background 0.2s ease;
@@ -1755,7 +1755,7 @@ onUnmounted(() => {
border-radius: 6px;
font-size: 12px;
font-weight: 500;
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
background: rgba(107, 114, 128, 0.08);
color: var(--td-text-color-secondary);
@@ -1805,7 +1805,7 @@ onUnmounted(() => {
.empty-txt {
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 16px;
font-weight: 600;
line-height: 26px;
@@ -1814,7 +1814,7 @@ onUnmounted(() => {
.empty-desc {
color: var(--td-text-color-disabled);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 22px;
@@ -1885,7 +1885,7 @@ onUnmounted(() => {
.circle-title {
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 16px;
font-weight: 600;
line-height: 24px;
@@ -1893,7 +1893,7 @@ onUnmounted(() => {
.del-circle-txt {
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 22px;
@@ -1911,7 +1911,7 @@ onUnmounted(() => {
.circle-btn-txt {
color: var(--td-text-color-primary);
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 400;
line-height: 22px;
@@ -1940,7 +1940,7 @@ onUnmounted(() => {
.create-org-dialog,
.join-org-dialog {
.t-form-item__label {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 500;
color: var(--td-text-color-primary);
@@ -1948,7 +1948,7 @@ onUnmounted(() => {
.t-input,
.t-textarea {
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
}
.t-button--theme-primary {
@@ -2022,7 +2022,7 @@ onUnmounted(() => {
.invite-preview-title {
margin: 0;
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
font-size: 18px;
font-weight: 600;
color: var(--td-text-color-primary);
@@ -2116,7 +2116,7 @@ onUnmounted(() => {
user-select: none;
position: relative;
transition: color 0.2s ease;
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
&:hover {
color: var(--td-text-color-primary);
@@ -2201,7 +2201,7 @@ onUnmounted(() => {
.searchable-empty-txt {
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 500;
line-height: 1.5;
@@ -2295,7 +2295,7 @@ onUnmounted(() => {
.searchable-card-title {
color: var(--td-text-color-primary);
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
font-size: 15px;
font-weight: 600;
line-height: 22px;
@@ -2329,7 +2329,7 @@ onUnmounted(() => {
overflow: hidden;
margin: 0;
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
font-size: 12px;
font-weight: 400;
line-height: 1.5;
@@ -2359,7 +2359,7 @@ onUnmounted(() => {
border-radius: 6px;
font-size: 12px;
font-weight: 500;
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
&.member {
background: rgba(7, 192, 95, 0.08);
@@ -2400,7 +2400,7 @@ onUnmounted(() => {
color: var(--td-text-color-secondary);
margin: 0 0 16px;
line-height: 1.55;
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
}
.invite-preview-input-wrap {
margin-bottom: 12px;
@@ -2410,7 +2410,7 @@ onUnmounted(() => {
color: var(--td-text-color-secondary);
margin: 0 0 20px;
line-height: 1.5;
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
}
.invite-preview-error-inline {
display: flex;
@@ -2419,7 +2419,7 @@ onUnmounted(() => {
color: var(--td-error-color);
font-size: 13px;
margin-bottom: 16px;
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
}
.invite-preview-footer-single {
margin: 24px 0 0;
@@ -2440,7 +2440,7 @@ onUnmounted(() => {
.invite-preview-loading-text {
font-size: 14px;
color: var(--td-text-color-secondary);
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
}
}
@@ -2461,7 +2461,7 @@ onUnmounted(() => {
font-weight: 600;
color: var(--td-text-color-primary);
margin: 0 0 8px;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
}
.invite-preview-error-desc {
@@ -2469,7 +2469,7 @@ onUnmounted(() => {
color: var(--td-text-color-secondary);
margin: 0 0 24px;
line-height: 1.5;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
}
}
@@ -2543,7 +2543,7 @@ onUnmounted(() => {
font-weight: 600;
color: var(--td-text-color-primary);
margin: 0 0 4px;
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
line-height: 1.3;
letter-spacing: -0.02em;
}
@@ -2555,7 +2555,7 @@ onUnmounted(() => {
margin: 0;
font-size: 12px;
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
}
.preview-detail-id-label {
@@ -2563,7 +2563,7 @@ onUnmounted(() => {
}
.preview-detail-id-value {
- font-family: ui-monospace, "SF Mono", Menlo, monospace;
+ font-family: var(--app-font-family-mono);
font-size: 11px;
letter-spacing: 0.02em;
color: var(--td-text-color-secondary);
@@ -2591,7 +2591,7 @@ onUnmounted(() => {
overflow: hidden;
margin: 0;
color: var(--td-text-color-placeholder);
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
font-size: 13px;
font-weight: 400;
line-height: 1.5;
@@ -2621,7 +2621,7 @@ onUnmounted(() => {
border-radius: 6px;
font-size: 12px;
font-weight: 500;
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
&.member {
background: rgba(7, 192, 95, 0.08);
@@ -2662,7 +2662,7 @@ onUnmounted(() => {
gap: 10px;
margin-bottom: 12px;
font-size: 14px;
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
}
.preview-join-label {
@@ -2690,7 +2690,7 @@ onUnmounted(() => {
font-size: 13px;
color: var(--td-text-color-secondary);
line-height: 1.5;
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
margin-bottom: 16px;
&.preview-join-note-warning {
@@ -2724,7 +2724,7 @@ onUnmounted(() => {
.preview-form-label {
display: block;
margin-bottom: 8px;
- font-family: "PingFang SC", system-ui, sans-serif;
+ font-family: var(--app-font-family);
font-size: 14px;
font-weight: 500;
color: var(--td-text-color-secondary);
diff --git a/frontend/src/views/organization/OrganizationSettingsModal.vue b/frontend/src/views/organization/OrganizationSettingsModal.vue
index 7306b1a45..a09c1d244 100644
--- a/frontend/src/views/organization/OrganizationSettingsModal.vue
+++ b/frontend/src/views/organization/OrganizationSettingsModal.vue
@@ -1655,7 +1655,7 @@ watch(currentSection, (section) => {
.sidebar-title {
margin: 0;
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
font-size: 18px;
font-weight: 600;
color: var(--td-text-color-primary);
@@ -1676,7 +1676,7 @@ watch(currentSection, (section) => {
border-radius: 10px;
cursor: pointer;
transition: background 0.2s ease, color 0.2s ease;
- font-family: "PingFang SC", -apple-system, sans-serif;
+ font-family: var(--app-font-family);
font-size: 14px;
color: var(--td-text-color-secondary);
font-weight: 500;
@@ -1756,7 +1756,7 @@ watch(currentSection, (section) => {
h2 {
margin: 0 0 8px 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 16px;
font-weight: 600;
color: var(--td-text-color-primary);
@@ -1764,7 +1764,7 @@ watch(currentSection, (section) => {
.section-description {
margin: 0;
- font-family: "PingFang SC";
+ font-family: var(--app-font-family);
font-size: 14px;
color: var(--td-text-color-placeholder);
line-height: 22px;
@@ -1968,7 +1968,7 @@ watch(currentSection, (section) => {
padding: 10px 14px;
.invite-code-value {
- font-family: 'SF Mono', Monaco, 'Courier New', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 16px;
font-weight: 600;
letter-spacing: 2px;
diff --git a/frontend/src/views/settings/AgentSettings.vue b/frontend/src/views/settings/AgentSettings.vue
index 0468a50b7..5a1710faa 100644
--- a/frontend/src/views/settings/AgentSettings.vue
+++ b/frontend/src/views/settings/AgentSettings.vue
@@ -162,7 +162,7 @@
@blur="handleSystemPromptChange"
@input="handlePromptInput"
@keydown="handlePromptKeydown"
- style="width: 100%; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; font-size: 13px;"
+ style="width: 100%; font-family: var(--app-font-family-mono); font-size: 13px;"
/>
<PromptTemplateSelector
type="agentSystemPrompt"
@@ -220,7 +220,7 @@
:autosize="{ minRows: 10, maxRows: 20 }"
:placeholder="$t('conversationSettings.systemPrompt.placeholder')"
@blur="handleSystemPromptNormalChange"
- style="width: 100%; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; font-size: 13px;"
+ style="width: 100%; font-family: var(--app-font-family-mono); font-size: 13px;"
/>
<PromptTemplateSelector
type="systemPrompt"
@@ -246,7 +246,7 @@
:autosize="{ minRows: 15, maxRows: 30 }"
:placeholder="$t('conversationSettings.contextTemplate.placeholder')"
@blur="handleContextTemplateChange"
- style="width: 100%; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; font-size: 13px;"
+ style="width: 100%; font-family: var(--app-font-family-mono); font-size: 13px;"
/>
<PromptTemplateSelector
type="contextTemplate"
@@ -2212,7 +2212,7 @@ const handleConversationRerankModelChange = async (value: string) => {
background: var(--td-bg-color-container);
padding: 2px 6px;
border-radius: 3px;
- font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 11px;
color: var(--td-error-color);
border: 1px solid var(--td-component-stroke);
@@ -2262,7 +2262,7 @@ const handleConversationRerankModelChange = async (value: string) => {
background: var(--td-bg-color-secondarycontainer);
padding: 2px 6px;
border-radius: 3px;
- font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
+ font-family: var(--app-font-family-mono);
font-size: 12px;
color: var(--td-error-color);
}
diff --git a/frontend/src/views/settings/ApiInfo.vue b/frontend/src/views/settings/ApiInfo.vue
index ba1bdb668..c23bcf211 100644
--- a/frontend/src/views/settings/ApiInfo.vue
+++ b/frontend/src/views/settings/ApiInfo.vue
@@ -34,7 +34,7 @@
v-model="displayApiKey"
readonly
type="text"
- style="width: 100%; font-family: monospace; font-size: 12px;"
+ style="width: 100%; font-family: var(--app-font-family-mono); font-size: 12px;"
/>
<t-button
size="small"
@@ -77,7 +77,7 @@
:model-value="apiBaseUrlDisplay"
readonly
type="text"
- style="width: 100%; font-family: monospace; font-size: 12px;"
+ style="width: 100%; font-family: var(--app-font-family-mono); font-size: 12px;"
/>
<t-button
size="small"
@@ -136,7 +136,7 @@
:model-value="wailsApiLanBaseURL"
readonly
type="text"
- style="width: 100%; font-family: monospace; font-size: 12px;"
+ style="width: 100%; font-family: var(--app-font-family-mono); font-size: 12px;"
/>
<t-button
size="small"
@@ -710,7 +710,7 @@ onMounted(async () => {
}
:deep(input) {
- font-family: monospace;
+ font-family: var(--app-font-family-mono);
font-size: 12px;
}
}
diff --git a/frontend/src/views/settings/GeneralSettings.vue b/frontend/src/views/settings/GeneralSettings.vue
index bf14e71c3..4f7f75d25 100755
--- a/frontend/src/views/settings/GeneralSettings.vue
+++ b/frontend/src/views/settings/GeneralSettings.vue
@@ -47,6 +47,56 @@
</div>
</div>
+ <!-- 界面字体 -->
+ <div class="setting-row">
+ <div class="setting-info">
+ <label>{{ $t('font.uiFont') }}</label>
+ <p class="desc">{{ $t('font.uiFontDescription') }}</p>
+ </div>
+ <div class="setting-control">
+ <t-select
+ v-model="localSansFont"
+ style="width: 280px;"
+ :placeholder="$t('font.selectFont')"
+ @change="handleSansFontChange"
+ >
+ <t-option
+ v-for="opt in sansFontOptions"
+ :key="opt.value"
+ :value="opt.value"
+ :label="opt.label"
+ >
+ <span :style="{ fontFamily: opt.preview }">{{ opt.label }}</span>
+ </t-option>
+ </t-select>
+ </div>
+ </div>
+
+ <!-- 等宽字体 -->
+ <div class="setting-row">
+ <div class="setting-info">
+ <label>{{ $t('font.monoFont') }}</label>
+ <p class="desc">{{ $t('font.monoFontDescription') }}</p>
+ </div>
+ <div class="setting-control">
+ <t-select
+ v-model="localMonoFont"
+ style="width: 280px;"
+ :placeholder="$t('font.selectFont')"
+ @change="handleMonoFontChange"
+ >
+ <t-option
+ v-for="opt in monoFontOptions"
+ :key="opt.value"
+ :value="opt.value"
+ :label="opt.label"
+ >
+ <span :style="{ fontFamily: opt.preview }">{{ opt.label }}</span>
+ </t-option>
+ </t-select>
+ </div>
+ </div>
+
<!-- 记忆功能开关 -->
<div class="setting-row">
<div class="setting-info">
@@ -98,15 +148,45 @@ import { useSettingsStore } from '@/stores/settings'
import { useAuthStore } from '@/stores/auth'
import { getSystemInfo } from '@/api/system'
import { useTheme, type ThemeMode } from '@/composables/useTheme'
+import {
+ useFont,
+ SANS_STACKS,
+ MONO_STACKS,
+ type FontKey,
+ type MonoFontKey,
+} from '@/composables/useFont'
const { t, locale } = useI18n()
const settingsStore = useSettingsStore()
const authStore = useAuthStore()
const { currentTheme, setTheme } = useTheme()
+const { currentSans, currentMono, setSansFont, setMonoFont } = useFont()
// 本地状态
const localLanguage = ref('zh-CN')
const localTheme = ref<ThemeMode>(currentTheme.value)
+const localSansFont = ref<FontKey>(currentSans.value)
+const localMonoFont = ref<MonoFontKey>(currentMono.value)
+
+const sansFontOptions = computed<{ value: FontKey; label: string; preview: string }[]>(() => [
+ { value: 'system', label: t('font.sans.system'), preview: SANS_STACKS.system },
+ { value: 'pingfang', label: t('font.sans.pingfang'), preview: SANS_STACKS.pingfang },
+ { value: 'inter', label: t('font.sans.inter'), preview: SANS_STACKS.inter },
+ { value: 'helvetica', label: t('font.sans.helvetica'), preview: SANS_STACKS.helvetica },
+ { value: 'segoe', label: t('font.sans.segoe'), preview: SANS_STACKS.segoe },
+ { value: 'roboto', label: t('font.sans.roboto'), preview: SANS_STACKS.roboto },
+ { value: 'sans-serif', label: t('font.sans.sansSerif'), preview: SANS_STACKS['sans-serif'] },
+])
+
+const monoFontOptions = computed<{ value: MonoFontKey; label: string; preview: string }[]>(() => [
+ { value: 'system', label: t('font.mono.system'), preview: MONO_STACKS.system },
+ { value: 'cascadia', label: t('font.mono.cascadia'), preview: MONO_STACKS.cascadia },
+ { value: 'jetbrains', label: t('font.mono.jetbrains'), preview: MONO_STACKS.jetbrains },
+ { value: 'fira', label: t('font.mono.fira'), preview: MONO_STACKS.fira },
+ { value: 'monaco', label: t('font.mono.monaco'), preview: MONO_STACKS.monaco },
+ { value: 'consolas', label: t('font.mono.consolas'), preview: MONO_STACKS.consolas },
+ { value: 'monospace', label: t('font.mono.monospace'), preview: MONO_STACKS.monospace },
+])
// 系统信息
const systemInfo = ref<any>(null)
@@ -182,6 +262,17 @@ const handleThemeChange = (val: ThemeMode) => {
setTheme(val)
MessagePlugin.success(t('common.success'))
}
+
+// 处理字体变化
+const handleSansFontChange = (val: FontKey) => {
+ setSansFont(val)
+ MessagePlugin.success(t('common.success'))
+}
+
+const handleMonoFontChange = (val: MonoFontKey) => {
+ setMonoFont(val)
+ MessagePlugin.success(t('common.success'))
+}
</script>
<style lang="less" scoped>
diff --git a/frontend/src/views/settings/OllamaSettings.vue b/frontend/src/views/settings/OllamaSettings.vue
index 7cce99170..74a4524e2 100644
--- a/frontend/src/views/settings/OllamaSettings.vue
+++ b/frontend/src/views/settings/OllamaSettings.vue
@@ -555,7 +555,7 @@ onMounted(async () => {
font-weight: 500;
color: var(--td-text-color-primary);
margin-bottom: 4px;
- font-family: monospace;
+ font-family: var(--app-font-family-mono);
}
.model-meta {
diff --git a/frontend/src/views/settings/ParserEngineSettings.vue b/frontend/src/views/settings/ParserEngineSettings.vue
index efa579bcf..ffd2927fe 100644
--- a/frontend/src/views/settings/ParserEngineSettings.vue
+++ b/frontend/src/views/settings/ParserEngineSettings.vue
@@ -595,7 +595,7 @@ onMounted(loadAll)
font-weight: 600;
color: var(--td-text-color-primary);
margin: 0;
- font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
+ font-family: var(--app-font-family-mono);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
diff --git a/frontend/src/views/settings/RetrievalSettings.vue b/frontend/src/views/settings/RetrievalSettings.vue
index 3d21166dc..4160cb5ac 100644
--- a/frontend/src/views/settings/RetrievalSettings.vue
+++ b/frontend/src/views/settings/RetrievalSettings.vue
@@ -270,6 +270,6 @@ onMounted(async () => {
font-size: 13px;
font-weight: 600;
color: var(--td-brand-color);
- font-family: "SF Mono", "Monaco", monospace;
+ font-family: var(--app-font-family-mono);
}
</style>
diff --git a/frontend/src/views/settings/StorageEngineSettings.vue b/frontend/src/views/settings/StorageEngineSettings.vue
index 434e531a8..cfb20a123 100644
--- a/frontend/src/views/settings/StorageEngineSettings.vue
+++ b/frontend/src/views/settings/StorageEngineSettings.vue
@@ -1022,7 +1022,7 @@ onMounted(loadAll)
font-weight: 600;
color: var(--td-text-color-primary);
margin: 0;
- font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
+ font-family: var(--app-font-family-mono);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
diff --git a/frontend/src/views/settings/VectorStoreSettings.vue b/frontend/src/views/settings/VectorStoreSettings.vue
index 3b8baae72..3451cddfa 100644
--- a/frontend/src/views/settings/VectorStoreSettings.vue
+++ b/frontend/src/views/settings/VectorStoreSettings.vue
@@ -764,7 +764,7 @@ onMounted(async () => {
.readonly-value {
color: var(--td-text-color-primary);
font-size: 12px;
- font-family: 'SF Mono', Monaco, Menlo, monospace;
+ font-family: var(--app-font-family-mono);
word-break: break-all;
}
diff --git a/frontend/src/views/settings/components/McpTestResult.vue b/frontend/src/views/settings/components/McpTestResult.vue
index ef09f3c29..3b4b66a47 100644
--- a/frontend/src/views/settings/components/McpTestResult.vue
+++ b/frontend/src/views/settings/components/McpTestResult.vue
@@ -359,7 +359,7 @@ const handleClose = () => {
padding: 12px;
overflow-x: auto;
font-size: 12px;
- font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
+ font-family: var(--app-font-family-mono);
color: var(--td-text-color-primary);
line-height: 1.6;
background: transparent;