diff --git a/frontend/src/assets/dropdown-menu.less b/frontend/src/assets/dropdown-menu.less index 0c371de6..970f65a6 100644 --- a/frontend/src/assets/dropdown-menu.less +++ b/frontend/src/assets/dropdown-menu.less @@ -45,7 +45,7 @@ padding: 4px !important; margin-top: 4px !important; min-width: 148px; - border-radius: 10px !important; + border-radius: var(--app-radius-lg) !important; background: var(--td-bg-color-container) !important; border: 0.5px solid var(--td-component-stroke) !important; box-shadow: @@ -74,19 +74,19 @@ gap: 10px; padding: 8px 12px; cursor: pointer; - transition: all 0.15s cubic-bezier(0.2, 0, 0, 1); + transition: all var(--app-motion-fast) cubic-bezier(0.2, 0, 0, 1); color: var(--td-text-color-primary); - font-size: 14px; + font-size: var(--app-text-base); font-weight: 400; line-height: 20px; - border-radius: 6px; + border-radius: var(--app-radius-sm); position: relative; .menu-icon { - font-size: 16px; + font-size: var(--app-text-xl); flex-shrink: 0; color: var(--td-text-color-secondary); - transition: all 0.15s cubic-bezier(0.2, 0, 0, 1); + transition: all var(--app-motion-fast) cubic-bezier(0.2, 0, 0, 1); } &:hover { @@ -149,7 +149,7 @@ margin-top: 4px !important; min-width: 148px; width: auto; - border-radius: 10px !important; + border-radius: var(--app-radius-lg) !important; background: var(--td-bg-color-container) !important; border: 0.5px solid var(--td-component-stroke) !important; box-shadow: @@ -186,9 +186,9 @@ padding: 8px 12px; cursor: pointer; color: var(--td-text-color-primary); - transition: all 0.15s cubic-bezier(0.2, 0, 0, 1); - border-radius: 6px; - font-size: 14px; + transition: all var(--app-motion-fast) cubic-bezier(0.2, 0, 0, 1); + border-radius: var(--app-radius-sm); + font-size: var(--app-text-base); line-height: 20px; &:hover { @@ -201,9 +201,9 @@ } .icon { - font-size: 16px; + font-size: var(--app-text-xl); color: var(--td-text-color-secondary); - transition: all 0.15s cubic-bezier(0.2, 0, 0, 1); + transition: all var(--app-motion-fast) cubic-bezier(0.2, 0, 0, 1); } &:hover .icon { @@ -249,7 +249,7 @@ align-items: center; gap: 6px; padding: 8px 12px; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; color: var(--td-text-color-primary); border-bottom: 1px solid var(--td-component-stroke); @@ -269,7 +269,7 @@ .move-menu-empty { padding: 12px 16px; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); text-align: center; line-height: 1.5; @@ -283,7 +283,7 @@ } .move-target-count { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); } @@ -296,8 +296,8 @@ gap: 6px; padding: 6px 8px; background: var(--td-bg-color-container-hover); - border-radius: 6px; - font-size: 13px; + border-radius: var(--app-radius-sm); + font-size: var(--app-text-md); color: var(--td-text-color-secondary); margin-bottom: 8px; } @@ -307,7 +307,7 @@ align-items: flex-start; gap: 6px; padding: 6px 8px; - border-radius: 6px; + border-radius: var(--app-radius-sm); cursor: pointer; margin-bottom: 4px; @@ -325,13 +325,13 @@ gap: 2px; .move-mode-label { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; color: var(--td-text-color-primary); } .move-mode-desc { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-placeholder); line-height: 1.4; } @@ -368,7 +368,7 @@ overflow-y: auto; scrollbar-width: thin; scrollbar-color: transparent transparent; - transition: scrollbar-color 0.2s ease; + transition: scrollbar-color var(--app-motion-base) ease; &::-webkit-scrollbar { width: 6px; @@ -381,29 +381,29 @@ &::-webkit-scrollbar-thumb { background-color: transparent; border: none; - border-radius: 6px; - transition: background-color 0.2s ease; + border-radius: var(--app-radius-sm); + transition: background-color var(--app-motion-base) ease; } &:hover { - scrollbar-color: var(--td-scrollbar-color, rgba(0, 0, 0, 0.18)) transparent; + scrollbar-color: var(--td-scrollbar-color) transparent; &::-webkit-scrollbar-thumb { - background-color: var(--td-scrollbar-color, rgba(0, 0, 0, 0.18)); + background-color: var(--td-scrollbar-color); } } &::-webkit-scrollbar-thumb:hover { - background-color: var(--td-scrollbar-hover-color, rgba(0, 0, 0, 0.32)); + background-color: var(--td-scrollbar-hover-color); } } .t-dropdown__item { padding: 8px 12px; - border-radius: 6px; + border-radius: var(--app-radius-sm); margin: 1px 0; - transition: all 0.15s cubic-bezier(0.2, 0, 0, 1); - font-size: 14px; + transition: all var(--app-motion-fast) cubic-bezier(0.2, 0, 0, 1); + font-size: var(--app-text-base); color: var(--td-text-color-primary); cursor: pointer; min-width: auto !important; @@ -429,10 +429,10 @@ color: var(--td-text-color-secondary); display: flex; align-items: center; - transition: all 0.15s cubic-bezier(0.2, 0, 0, 1); + transition: all var(--app-motion-fast) cubic-bezier(0.2, 0, 0, 1); .t-icon { - font-size: 16px; + font-size: var(--app-text-xl); } } @@ -442,7 +442,7 @@ .t-dropdown__item-text { color: inherit !important; - font-size: 14px !important; + font-size: var(--app-text-base) !important; line-height: 20px !important; white-space: nowrap !important; overflow: hidden !important; @@ -496,7 +496,7 @@ padding: 4px !important; margin-top: 4px !important; min-width: 120px; - border-radius: 10px !important; + border-radius: var(--app-radius-lg) !important; background: var(--td-bg-color-container) !important; border: 0.5px solid var(--td-component-stroke) !important; box-shadow: @@ -517,7 +517,7 @@ .t-popup__content { padding: 4px !important; margin-top: 4px !important; - border-radius: 10px !important; + border-radius: var(--app-radius-lg) !important; background: var(--td-bg-color-container) !important; border: 0.5px solid var(--td-component-stroke) !important; box-shadow: @@ -545,12 +545,12 @@ align-items: center; gap: 6px; padding: 6px 8px; - border-radius: 6px; - font-size: 13px; + border-radius: var(--app-radius-sm); + font-size: var(--app-text-md); color: var(--td-text-color-primary); cursor: pointer; line-height: 1.2; - transition: background-color 0.15s ease; + transition: background-color var(--app-motion-fast) ease; &:hover { background: var(--td-bg-color-container-hover); @@ -563,7 +563,7 @@ } .tag-popup-check { - font-size: 14px; + font-size: var(--app-text-base); color: var(--td-brand-color); visibility: hidden; flex-shrink: 0; @@ -619,7 +619,7 @@ padding: 14px 16px !important; min-width: 300px; max-width: min(392px, calc(100vw - 24px)); - border-radius: 12px !important; + border-radius: var(--app-radius-xl) !important; background: var(--td-bg-color-container) !important; border: 0.5px solid var(--td-component-stroke) !important; box-shadow: @@ -636,7 +636,7 @@ } .anchored-form-popup-title { - font-size: 15px; + font-size: var(--app-text-lg); font-weight: 600; color: var(--td-text-color-primary); margin: 0 0 12px; @@ -646,7 +646,7 @@ .anchored-form-popup-body { padding: 0 0 4px; color: var(--td-text-color-primary); - font-size: 14px; + font-size: var(--app-text-base); line-height: 1.6; word-break: break-word; } @@ -663,7 +663,7 @@ padding: 14px 16px; min-width: 300px; max-width: min(392px, calc(100vw - 24px)); - border-radius: 12px; + border-radius: var(--app-radius-xl); background: var(--td-bg-color-container); border: 0.5px solid var(--td-component-stroke); box-shadow: diff --git a/frontend/src/assets/fonts.css b/frontend/src/assets/fonts.css deleted file mode 100644 index 3a524896..00000000 --- a/frontend/src/assets/fonts.css +++ /dev/null @@ -1,6 +0,0 @@ -@font-face { - font-family: 'TencentSans'; - src: url('fonts/TencentSans.ttf') format('truetype'); - font-weight: normal; - font-style: normal; -} \ No newline at end of file diff --git a/frontend/src/assets/fonts/TencentSans.ttf b/frontend/src/assets/fonts/TencentSans.ttf deleted file mode 100644 index 386dd20f..00000000 Binary files a/frontend/src/assets/fonts/TencentSans.ttf and /dev/null differ diff --git a/frontend/src/assets/img/circle.png b/frontend/src/assets/img/circle.png deleted file mode 100644 index 042603f0..00000000 Binary files a/frontend/src/assets/img/circle.png and /dev/null differ diff --git a/frontend/src/assets/theme/styleGuard.test.mjs b/frontend/src/assets/theme/styleGuard.test.mjs new file mode 100644 index 00000000..7814b474 --- /dev/null +++ b/frontend/src/assets/theme/styleGuard.test.mjs @@ -0,0 +1,126 @@ +import assert from 'node:assert/strict' +import { test } from 'node:test' +import { readdirSync, readFileSync, statSync } from 'node:fs' +import { dirname, join, relative } from 'node:path' +import { fileURLToPath } from 'node:url' + +/** + * 样式守卫(棘轮):统计 views/ components/ assets/ 里绕过设计令牌或和 TDesign 打架的写法, + * 只允许计数下降。新增任何一处都会让测试失败;清理后请把 baseline 调低。 + * + * 令牌定义在 assets/theme/theme.css(--app-radius-* / --app-text-* / --app-space-* / + * --app-motion-* / --z-*),TDesign 全局覆盖放在 assets/theme/tdesign-overrides.less。 + * 用 .mjs 是因为 `npm test`(tsx --test)在 Node 20 下只自动发现 .mjs 测试文件。 + */ +const SRC_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..', '..') +const SCAN_DIRS = ['views', 'components', 'assets'] +const EXTS = new Set(['.vue', '.less', '.css']) +const EXEMPT_FILES = new Set(['assets/theme/theme.css']) + +const RULES = [ + { + name: 'brand-rgba', + why: '品牌色透明叠加请用 color-mix(in srgb, var(--td-brand-color) N%, transparent),否则深色模式不跟随', + pattern: /rgba\(\s*7\s*,\s*192\s*,\s*95\s*,/g, + baseline: 0, + }, + { + name: 'legacy-blue-rgba', + why: '旧版 TDesign 蓝 rgba(0,82,217) 已不是品牌色', + pattern: /rgba\(\s*0\s*,\s*82\s*,\s*217\s*,/g, + baseline: 18, + }, + { + name: 'td-token-fallback', + why: 'theme.css 保证 --td-* 令牌存在,fallback 永远不会生效且容易写错颜色', + pattern: /var\(\s*--td-(?!purple-5|cyan-6|font-family-code)[A-Za-z0-9-]+\s*,/g, + baseline: 0, + }, + { + name: 'radius-literal', + why: '圆角请用 var(--app-radius-xs|sm|md|lg|xl|pill)(4/6/8/10/12/999px)', + pattern: /border(?:-[a-z]+)*-radius\s*:\s*\d+(?:\.\d+)?px/g, + baseline: 162, + }, + { + name: 'font-size-literal', + why: '字号请用 var(--app-text-2xs … 4xl)(10~24px)', + pattern: /font-size\s*:\s*\d+(?:\.\d+)?px/g, + baseline: 28, + }, + { + name: 'motion-literal', + why: '过渡时长请用 var(--app-motion-instant|fast|base|slow)(120/150/200/300ms)', + pattern: /transition[^;{]*?(? 0) { + byFile.set(rel, n) + total += n + } + } + } + return { total, byFile } +} + +for (const rule of RULES) { + test(`style guard: ${rule.name} does not exceed baseline (${rule.baseline})`, () => { + const { total, byFile } = countMatches(rule) + const top = [...byFile.entries()] + .sort((a, b) => b[1] - a[1]) + .slice(0, 8) + .map(([f, n]) => ` ${n}\t${f}`) + .join('\n') + assert.ok( + total <= rule.baseline, + `${rule.name}: ${total} occurrences > baseline ${rule.baseline}.\n${rule.why}\n${top}`, + ) + }) +} diff --git a/frontend/src/assets/theme/tdesign-overrides.less b/frontend/src/assets/theme/tdesign-overrides.less new file mode 100644 index 00000000..59367bc3 --- /dev/null +++ b/frontend/src/assets/theme/tdesign-overrides.less @@ -0,0 +1,22 @@ +// 对 TDesign 组件的全局意图覆盖。组件内只做局部微调,不要在 scoped 样式里用 !important 和 TDesign 打架。 + +// 悬浮面板皮肤:给 t-popup / t-select 等的 overlayClassName 加上 `wk-popover` 即可。 +// 用两级选择器压过 TDesign 默认的 .t-popup__content,不需要 !important。 +.wk-popover .t-popup__content { + padding: 0; + border-radius: var(--app-radius-xl); + background: var(--td-bg-color-container); + border: 0.5px solid var(--td-component-stroke); + box-shadow: + 0 0 0 0.5px rgba(0, 0, 0, 0.03), + 0 2px 4px rgba(0, 0, 0, 0.04), + 0 8px 24px rgba(0, 0, 0, 0.1); + backdrop-filter: blur(20px) saturate(180%); + -webkit-backdrop-filter: blur(20px) saturate(180%); + overflow: hidden; +} + +:root[theme-mode="dark"] .wk-popover .t-popup__content { + background: rgba(36, 36, 36, 0.92); + border-color: rgba(255, 255, 255, 0.08); +} diff --git a/frontend/src/assets/theme/theme.css b/frontend/src/assets/theme/theme.css index e62ec6f1..e6123386 100644 --- a/frontend/src/assets/theme/theme.css +++ b/frontend/src/assets/theme/theme.css @@ -1,4 +1,4 @@ -:root:root,: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: color-mix(in srgb, var(--td-brand-color) 20%, transparent); --td-brand-color-disabled: #8ce0af; --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:root,: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: color-mix(in srgb, var(--td-brand-color) 20%, transparent); --td-brand-color-disabled: #8ce0af; --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-family-mono: var(--app-font-family-mono); --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="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: 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-font-family: var(--app-font-family); --td-font-family-medium: var(--app-font-family); --td-font-family-mono: var(--app-font-family-mono); --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 圆角配置 */ @@ -199,4 +199,71 @@ select:-webkit-autofill { .t-textarea__inner.t-is-focused:not(.t-is-disabled):not(.t-is-error):not(.t-is-warning):not(.t-is-success) { border-color: var(--td-brand-color); box-shadow: none; -} \ No newline at end of file +} + +/* 应用级强调色:智能体 / 图谱等「非品牌但反复出现」的语义色,透明叠加请用 color-mix */ +:root { + --app-accent-purple: #7c4dff; +} +:root[theme-mode="dark"] { + --app-accent-purple: #9d7cff; +} + +/* 全局旋转动画:spinner / 刷新图标统一用 `animation: wk-spin 0.8s linear infinite` */ +@keyframes wk-spin { + to { + transform: rotate(360deg); + } +} + +/* ============================================================ + * 应用级设计令牌 + * 按代码库的事实刻度整理(圆角 4/6/8/10/12、字号 10~24、4px 间距网格、 + * 150/200ms 动效),值与既有写法一致,目的是让后续调整只改这里。 + * 新代码请引用令牌,样式守卫会统计残留字面量。 + * ============================================================ */ +:root { + /* 圆角 */ + --app-radius-xs: 4px; + --app-radius-sm: 6px; + --app-radius-md: 8px; + --app-radius-lg: 10px; + --app-radius-xl: 12px; + --app-radius-pill: 999px; + + /* 字号 */ + --app-text-2xs: 10px; + --app-text-xs: 11px; + --app-text-sm: 12px; + --app-text-md: 13px; + --app-text-base: 14px; + --app-text-lg: 15px; + --app-text-xl: 16px; + --app-text-2xl: 18px; + --app-text-3xl: 20px; + --app-text-4xl: 24px; + + /* 间距(4px 网格) */ + --app-space-1: 4px; + --app-space-2: 8px; + --app-space-3: 12px; + --app-space-4: 16px; + --app-space-5: 20px; + --app-space-6: 24px; + --app-space-8: 32px; + --app-space-10: 40px; + + /* 动效时长 */ + --app-motion-instant: 120ms; + --app-motion-fast: 150ms; + --app-motion-base: 200ms; + --app-motion-slow: 300ms; + + /* 层级:页面内 sticky < 下拉 < 全屏弹窗壳 < TDesign 抽屉/弹窗(2500) < 弹层 < 通知 */ + --z-sticky: 10; + --z-dropdown: 1000; + --z-modal: 1100; + --z-drawer: 2500; + --z-popover: 3000; + --z-toast: 5000; +} diff --git a/frontend/src/components/AgentAvatar.vue b/frontend/src/components/AgentAvatar.vue index 1b2795ca..62ac3cc8 100644 --- a/frontend/src/components/AgentAvatar.vue +++ b/frontend/src/components/AgentAvatar.vue @@ -104,7 +104,7 @@ const letterStyle = computed(() => { justify-content: center; width: 32px; height: 32px; - border-radius: 8px; + border-radius: var(--app-radius-md); flex-shrink: 0; box-shadow: var(--td-shadow-2); overflow: hidden; @@ -116,7 +116,7 @@ const letterStyle = computed(() => { box-shadow: none; .agent-avatar-letter { - font-size: 11px; + font-size: var(--app-text-xs); } .agent-sparkles { @@ -127,10 +127,10 @@ const letterStyle = computed(() => { &.agent-avatar-large { width: 48px; height: 48px; - border-radius: 12px; + border-radius: var(--app-radius-xl); .agent-avatar-letter { - font-size: 20px; + font-size: var(--app-text-3xl); } .agent-sparkles { @@ -153,7 +153,7 @@ const letterStyle = computed(() => { position: relative; z-index: 1; color: var(--td-text-color-anti); - font-size: 14px; + font-size: var(--app-text-base); font-weight: 600; font-family: var(--app-font-family); } diff --git a/frontend/src/components/AgentEmbedChannelPanel.vue b/frontend/src/components/AgentEmbedChannelPanel.vue index 9c5f8a45..a28337e5 100644 --- a/frontend/src/components/AgentEmbedChannelPanel.vue +++ b/frontend/src/components/AgentEmbedChannelPanel.vue @@ -1109,7 +1109,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { gap: 6px; flex: 1; min-width: 0; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); padding: 0; border: none; @@ -1148,7 +1148,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { display: flex; align-items: center; justify-content: center; - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 600; border: 1px solid var(--td-component-stroke); color: var(--td-text-color-placeholder); @@ -1168,7 +1168,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { } .im-step-check { - font-size: 12px; + font-size: var(--app-text-sm); } .im-step-body { @@ -1190,7 +1190,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { .form-label { display: block; margin-bottom: 6px; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; color: var(--td-text-color-primary); line-height: 1.4; @@ -1202,7 +1202,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { .form-desc { margin: 4px 0 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.45; color: var(--td-text-color-placeholder); @@ -1267,7 +1267,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { label { display: block; margin: 0 0 4px; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; color: var(--td-text-color-primary); line-height: 1.4; @@ -1275,7 +1275,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { .desc { margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.45; color: var(--td-text-color-placeholder); @@ -1296,7 +1296,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { align-items: flex-start; gap: 10px; padding: 12px 14px; - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-secondarycontainer); border: 1px dashed var(--td-component-stroke); @@ -1304,12 +1304,12 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { flex-shrink: 0; margin-top: 1px; color: var(--td-brand-color); - font-size: 16px; + font-size: var(--app-text-xl); } p { margin: 0; - font-size: 13px; + font-size: var(--app-text-md); line-height: 1.5; color: var(--td-text-color-secondary); } @@ -1321,20 +1321,20 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { gap: 10px; margin-top: 12px; padding: 12px 14px; - border-radius: 8px; - background: var(--td-warning-color-1, #fff7e6); - border: 1px solid var(--td-warning-color-3, #ffd591); + border-radius: var(--app-radius-md); + background: var(--td-warning-color-1); + border: 1px solid var(--td-warning-color-3); &__icon { flex-shrink: 0; margin-top: 1px; - color: var(--td-warning-color, #e37318); - font-size: 16px; + color: var(--td-warning-color); + font-size: var(--app-text-xl); } p { margin: 0; - font-size: 13px; + font-size: var(--app-text-md); line-height: 1.5; color: var(--td-text-color-secondary); } @@ -1374,14 +1374,14 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { &__title { margin: 0 0 4px; - font-size: 14px; + font-size: var(--app-text-base); font-weight: 600; color: var(--td-text-color-primary); } &__desc { margin: 0 0 12px; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-secondary); } @@ -1400,7 +1400,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { .mono-text-input :deep(input) { font-family: var(--app-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace); - font-size: 12px; + font-size: var(--app-text-sm); } .snippet-tabs { @@ -1411,7 +1411,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { } :deep(.t-tabs__nav-item) { - font-size: 13px; + font-size: var(--app-text-md); height: 36px; line-height: 36px; } @@ -1423,7 +1423,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { .snippet-scenario { margin: 0 0 8px; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.45; color: var(--td-text-color-secondary); } @@ -1431,22 +1431,22 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { .snippet-note { margin: 0 0 10px; padding: 8px 10px; - border-radius: 6px; - font-size: 12px; + border-radius: var(--app-radius-sm); + font-size: var(--app-text-sm); line-height: 1.45; color: var(--td-text-color-secondary); - background: color-mix(in srgb, var(--td-warning-color, #ed7b2f) 8%, var(--td-bg-color-container)); - border: 1px solid color-mix(in srgb, var(--td-warning-color, #ed7b2f) 20%, transparent); + background: color-mix(in srgb, var(--td-warning-color) 8%, var(--td-bg-color-container)); + border: 1px solid color-mix(in srgb, var(--td-warning-color) 20%, transparent); } .snippet-note--ok { - background: color-mix(in srgb, var(--td-success-color, #2ba471) 8%, var(--td-bg-color-container)); - border-color: color-mix(in srgb, var(--td-success-color, #2ba471) 20%, transparent); + background: color-mix(in srgb, var(--td-success-color) 8%, var(--td-bg-color-container)); + border-color: color-mix(in srgb, var(--td-success-color) 20%, transparent); } .code-panel { border: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-secondarycontainer); overflow: hidden; @@ -1461,7 +1461,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { } &__label { - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; color: var(--td-text-color-secondary); } @@ -1477,7 +1477,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { margin: 0; padding: 10px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; white-space: pre-wrap; word-break: break-all; @@ -1489,7 +1489,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { .widget-preview { border: 1px dashed var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); padding: 6px; background: var(--td-bg-color-secondarycontainer); width: 100%; @@ -1498,7 +1498,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { .preview-surface { position: relative; height: 88px; - border-radius: 6px; + border-radius: var(--app-radius-sm); background: var(--td-bg-color-container); border: 1px solid var(--td-component-stroke); overflow: hidden; @@ -1514,7 +1514,7 @@ const toggleEnabled = async (ch: EmbedChannel, enabled: boolean) => { border: none; border-radius: 50%; color: #fff; - font-size: 16px; + font-size: var(--app-text-xl); line-height: 1; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12); cursor: default; diff --git a/frontend/src/components/AgentSelector.vue b/frontend/src/components/AgentSelector.vue index 89942608..2a3ef490 100644 --- a/frontend/src/components/AgentSelector.vue +++ b/frontend/src/components/AgentSelector.vue @@ -627,7 +627,7 @@ watch(activeDetail, (detail) => { position: fixed !important; background: var(--td-bg-color-container); border: .5px solid var(--td-component-border); - border-radius: 8px; + border-radius: var(--app-radius-md); box-shadow: var(--td-shadow-2); display: flex; flex-direction: column; @@ -657,7 +657,7 @@ watch(activeDetail, (detail) => { min-height: 36px; padding: 8px 12px; border-bottom: .5px solid var(--td-component-stroke); - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; line-height: 1; color: var(--td-text-color-secondary); @@ -671,7 +671,7 @@ watch(activeDetail, (detail) => { padding: 0 6px; border-radius: 5px; color: var(--td-brand-color); - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; line-height: 1; cursor: pointer; @@ -701,7 +701,7 @@ watch(activeDetail, (detail) => { } .agent-group-title { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-placeholder); padding: 8px 12px 4px; font-weight: 600; @@ -716,7 +716,7 @@ watch(activeDetail, (detail) => { margin: 0 4px; padding: 6px 8px; cursor: pointer; - transition: background 0.12s; + transition: background var(--app-motion-instant); border-radius: 5px; &:hover, @@ -744,7 +744,7 @@ watch(activeDetail, (detail) => { } .agent-option-name { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-primary); flex: 1; min-width: 0; @@ -755,7 +755,7 @@ watch(activeDetail, (detail) => { } .shared-tag { - font-size: 10px; + font-size: var(--app-text-2xs); color: var(--td-text-color-placeholder); flex-shrink: 0; line-height: 22px; @@ -772,7 +772,7 @@ watch(activeDetail, (detail) => { .not-ready-icon { flex-shrink: 0; - color: var(--td-warning-color, #ed7b2f); + color: var(--td-warning-color); cursor: default; display: block; line-height: 1; @@ -817,15 +817,15 @@ watch(activeDetail, (detail) => { height: 22px; border-radius: 5px; flex-shrink: 0; - font-size: 14px; + font-size: var(--app-text-base); line-height: 1; - background: var(--td-bg-color-secondarycontainer, #f5f5f5); + background: var(--td-bg-color-secondarycontainer); overflow: hidden; &.detail-icon { width: 28px; height: 28px; - font-size: 18px; + font-size: var(--app-text-2xl); } } @@ -850,13 +850,13 @@ watch(activeDetail, (detail) => { .agent-detail-panel-inner { padding: 12px; border: 1px solid var(--td-component-stroke); - border-radius: var(--td-radius-large, 9px); + border-radius: var(--td-radius-large); background: var(--td-bg-color-container); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04); } .agent-detail-content { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-primary); line-height: 1.5; } @@ -885,7 +885,7 @@ watch(activeDetail, (detail) => { .detail-name { font-weight: 600; - font-size: 13px; + font-size: var(--app-text-md); line-height: 18px; word-break: break-word; min-width: 0; @@ -902,28 +902,28 @@ watch(activeDetail, (detail) => { height: 22px; padding: 0; border: none; - border-radius: 4px; + border-radius: var(--app-radius-xs); background: transparent; color: var(--td-text-color-placeholder); cursor: pointer; &:hover { - background: var(--td-bg-color-component-hover, #e8e8e8); + background: var(--td-bg-color-component-hover); color: var(--td-text-color-secondary); } &--warn { - color: var(--td-warning-color, #ed7b2f); + color: var(--td-warning-color); &:hover { background: rgba(237, 123, 47, 0.1); - color: var(--td-warning-color, #ed7b2f); + color: var(--td-warning-color); } } } .detail-current { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-placeholder); } @@ -937,12 +937,12 @@ watch(activeDetail, (detail) => { .detail-not-ready-icon { flex-shrink: 0; - color: var(--td-warning-color, #ed7b2f); + color: var(--td-warning-color); opacity: 0.85; } .detail-not-ready-label { - font-size: 11px; + font-size: var(--app-text-xs); line-height: 16px; color: var(--td-text-color-secondary); } @@ -952,8 +952,8 @@ watch(activeDetail, (detail) => { align-items: center; padding: 0 5px; border: 1px solid rgba(237, 123, 47, 0.28); - border-radius: 4px; - font-size: 10px; + border-radius: var(--app-radius-xs); + font-size: var(--app-text-2xs); line-height: 16px; color: var(--td-text-color-secondary); background: var(--td-bg-color-container); @@ -963,14 +963,14 @@ watch(activeDetail, (detail) => { display: block; width: 100%; margin-top: 2px; - font-size: 10px; + font-size: var(--app-text-2xs); line-height: 1.4; color: var(--td-text-color-placeholder); } .detail-desc { margin: 0 0 8px; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-secondary); line-height: 1.5; display: -webkit-box; @@ -1001,7 +1001,7 @@ watch(activeDetail, (detail) => { } .detail-tag-group-title { - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 600; line-height: 16px; color: var(--td-text-color-placeholder); @@ -1013,8 +1013,8 @@ watch(activeDetail, (detail) => { align-items: center; padding: 2px 8px; border: 1px solid var(--td-component-stroke); - border-radius: var(--td-radius-medium, 6px); - font-size: 11px; + border-radius: var(--td-radius-medium); + font-size: var(--app-text-xs); line-height: 18px; color: var(--td-text-color-secondary); background: var(--td-bg-color-secondarycontainer); @@ -1036,7 +1036,7 @@ watch(activeDetail, (detail) => { .detail-capability-state { flex-shrink: 0; - font-size: 10px; + font-size: var(--app-text-2xs); line-height: 14px; color: var(--td-text-color-placeholder); } @@ -1047,16 +1047,16 @@ watch(activeDetail, (detail) => { background: rgba(0, 168, 112, 0.06); .detail-capability-icon-wrap { - color: var(--td-success-color, #00a870); + color: var(--td-success-color); background: rgba(0, 168, 112, 0.12); } .detail-capability-icon { - color: var(--td-success-color, #00a870); + color: var(--td-success-color); } .detail-capability-state { - color: var(--td-success-color, #00a870); + color: var(--td-success-color); } } @@ -1065,13 +1065,13 @@ watch(activeDetail, (detail) => { background: rgba(237, 123, 47, 0.06); .detail-capability-icon-wrap { - color: var(--td-warning-color, #ed7b2f); + color: var(--td-warning-color); background: rgba(237, 123, 47, 0.12); } .detail-capability-icon, .detail-capability-state { - color: var(--td-warning-color, #ed7b2f); + color: var(--td-warning-color); } } @@ -1081,7 +1081,7 @@ watch(activeDetail, (detail) => { .detail-capability-icon-wrap { color: var(--td-text-color-placeholder); - background: var(--td-bg-color-component, rgba(0, 0, 0, 0.04)); + background: var(--td-bg-color-component); } .detail-capability-icon { @@ -1112,7 +1112,7 @@ watch(activeDetail, (detail) => { display: flex; flex-direction: column; gap: 4px; - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-placeholder); } diff --git a/frontend/src/components/AgentShareSettings.vue b/frontend/src/components/AgentShareSettings.vue index e4999ac9..90ad5344 100644 --- a/frontend/src/components/AgentShareSettings.vue +++ b/frontend/src/components/AgentShareSettings.vue @@ -4,7 +4,7 @@
-
@@ -862,7 +854,6 @@ watch(() => props.visible && saving.value, (locked) => { // affordance for everyday use. Reset every time the drawer closes (see // reset block in the visible watcher) so we never leak the previous value // across editor sessions. -const showApiKey = ref(false) const modelChecked = ref(false) const modelAvailable = ref(false) const checking = ref(false) @@ -1229,7 +1220,6 @@ const resetForm = () => { dimensionChecked.value = false dimensionSuccess.value = false dimensionMessage.value = '' - showApiKey.value = false } // 处理厂商选择变化 (自动填充默认 URL) @@ -1813,7 +1803,7 @@ const handleCancel = () => { .form-label { display: block; margin-bottom: 6px; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; color: var(--td-text-color-primary); line-height: 1.4; @@ -1842,16 +1832,16 @@ const handleCancel = () => { padding: 6px 12px; min-height: 32px; border: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-container); color: var(--td-text-color-secondary); - font-size: 13px; + font-size: var(--app-text-md); line-height: 1.4; cursor: pointer; - transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease; + transition: border-color var(--app-motion-fast) ease, color var(--app-motion-fast) ease, background var(--app-motion-fast) ease; &__icon { - font-size: 15px; + font-size: var(--app-text-lg); flex-shrink: 0; } @@ -1860,7 +1850,7 @@ const handleCancel = () => { } &:hover:not(.is-active) { - border-color: var(--td-brand-color-3, var(--td-brand-color)); + border-color: var(--td-brand-color-3); color: var(--td-text-color-primary); } @@ -1886,7 +1876,7 @@ const handleCancel = () => { padding: 3px; background: var(--td-bg-color-component); border: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); } .source-option { @@ -1897,13 +1887,13 @@ const handleCancel = () => { height: 28px; background: transparent; border: 1px solid transparent; - border-radius: 6px; + border-radius: var(--app-radius-sm); cursor: pointer; font-family: inherit; - font-size: 13px; + font-size: var(--app-text-md); color: var(--td-text-color-secondary); line-height: 1; - transition: all 0.15s ease; + transition: all var(--app-motion-fast) ease; &:hover:not(.is-disabled):not(.is-active) { color: var(--td-text-color-primary); @@ -1925,7 +1915,7 @@ const handleCancel = () => { } .source-option__icon { - font-size: 14px; + font-size: var(--app-text-base); flex-shrink: 0; } @@ -1940,7 +1930,7 @@ const handleCancel = () => { :deep(.t-textarea), :deep(.t-input-number) { width: 100%; - font-size: 13px; + font-size: var(--app-text-md); } // 厂商选择器样式 — 移至非 scoped 块,因为 t-select popup 渲染到 body 下 @@ -1948,10 +1938,10 @@ const handleCancel = () => { // 复选框 :deep(.t-checkbox) { - font-size: 13px; + font-size: var(--app-text-md); .t-checkbox__label { - font-size: 13px; + font-size: var(--app-text-md); color: var(--td-text-color-primary); } } @@ -1968,15 +1958,6 @@ const handleCancel = () => { color: var(--td-text-color-placeholder); } - .api-key-toggle { - cursor: pointer; - transition: color 0.15s ease; - font-size: 16px; - - &:hover { - color: var(--td-text-color-primary); - } - } } // API 测试区域 — 弱卡片化:用浅底 + dashed 边把"操作 + 反馈"框成一块, @@ -1990,10 +1971,10 @@ const handleCancel = () => { padding: 10px 12px; background: var(--td-bg-color-container-hover); border: 1px dashed var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); .test-message { - font-size: 13px; + font-size: var(--app-text-md); line-height: 1.5; flex: 1; @@ -2009,13 +1990,13 @@ const handleCancel = () => { :deep(.t-button) { min-width: 88px; height: 32px; - font-size: 13px; - border-radius: 6px; + font-size: var(--app-text-md); + border-radius: var(--app-radius-sm); flex-shrink: 0; } .status-icon { - font-size: 16px; + font-size: var(--app-text-xl); flex-shrink: 0; &.available { @@ -2029,7 +2010,7 @@ const handleCancel = () => { } .connection-status { - font-size: 12px; + font-size: var(--app-text-sm); &.success { color: var(--td-brand-color-active); } &.error { color: var(--td-error-color); } } @@ -2037,7 +2018,7 @@ const handleCancel = () => { .connection-hint { margin: 0 0 8px; color: var(--td-text-color-secondary); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; } @@ -2048,7 +2029,7 @@ const handleCancel = () => { border-radius: var(--td-radius-default); background: var(--td-error-color-1); color: var(--td-error-color); - font-size: 12px; + font-size: var(--app-text-sm); text-align: left; &__header { @@ -2070,7 +2051,7 @@ const handleCancel = () => { // Status icon variant used inside the footer button. .status-icon { - font-size: 16px; + font-size: var(--app-text-xl); flex-shrink: 0; &.available { @@ -2088,8 +2069,8 @@ const handleCancel = () => { align-items: flex-start; gap: 10px; padding: 12px 14px; - border-radius: 8px; - font-size: 13px; + border-radius: var(--app-radius-md); + font-size: var(--app-text-md); color: var(--td-text-color-secondary); line-height: 1.5; @@ -2101,13 +2082,13 @@ const handleCancel = () => { } &--warn { - background: var(--td-warning-color-light, #fff7ed); - border: 1px solid var(--td-warning-color-focus, #fed7aa); - border-left: 3px solid var(--td-warning-color, #f97316); + background: var(--td-warning-color-light); + border: 1px solid var(--td-warning-color-focus); + border-left: 3px solid var(--td-warning-color); } .hint-icon { - font-size: 16px; + font-size: var(--app-text-xl); flex-shrink: 0; margin-top: 2px; @@ -2116,7 +2097,7 @@ const handleCancel = () => { } &--warn { - color: var(--td-warning-color, #f97316); + color: var(--td-warning-color); } &--loading { @@ -2134,25 +2115,25 @@ const handleCancel = () => { padding: 4px 0; .downloaded-icon { - font-size: 14px; + font-size: var(--app-text-base); color: var(--td-brand-color); flex-shrink: 0; } .download-icon { - font-size: 14px; + font-size: var(--app-text-base); color: var(--td-brand-color); flex-shrink: 0; } .model-name { flex: 1; - font-size: 13px; + font-size: var(--app-text-md); color: var(--td-text-color-primary); } .model-size { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); margin-left: auto; } @@ -2173,13 +2154,13 @@ const handleCancel = () => { padding: 0 4px; .spinning { - animation: spin 1s linear infinite; - font-size: 14px; + animation: wk-spin 1s linear infinite; + font-size: var(--app-text-base); color: var(--td-brand-color); } .progress-text { - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; color: var(--td-brand-color); } @@ -2198,8 +2179,8 @@ const handleCancel = () => { top: 0; bottom: 0; width: var(--progress, 0%); - background: linear-gradient(90deg, rgba(7, 192, 95, 0.08), rgba(7, 192, 95, 0.15)); - transition: width 0.3s ease; + background: linear-gradient(90deg, color-mix(in srgb, var(--td-brand-color) 8%, transparent), color-mix(in srgb, var(--td-brand-color) 15%, transparent)); + transition: width var(--app-motion-slow) ease; z-index: 0; border-radius: 5px 0 0 5px; } @@ -2227,16 +2208,6 @@ const handleCancel = () => { flex-shrink: 0; } -@keyframes spin { - from { - transform: rotate(0deg); - } - - to { - transform: rotate(360deg); - } -} - // 维度控制样式 .dimension-control { display: flex; @@ -2254,7 +2225,7 @@ const handleCancel = () => { .dimension-hint { margin: 8px 0 0 0; - font-size: 13px; + font-size: var(--app-text-md); line-height: 1.5; color: var(--td-error-color); @@ -2273,7 +2244,7 @@ const handleCancel = () => { .custom-headers-desc { margin: 0 0 10px 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-placeholder); } @@ -2306,7 +2277,7 @@ const handleCancel = () => { height: 32px; padding: 0; color: var(--td-text-color-placeholder); - border-radius: 6px; + border-radius: var(--app-radius-sm); transition: all 0.18s ease; &:hover { @@ -2318,7 +2289,7 @@ const handleCancel = () => { .form-desc { margin: 4px 0 0 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-placeholder); @@ -2352,12 +2323,12 @@ const handleCancel = () => { padding: 10px 12px; background: var(--td-error-color-light); border: 1px solid var(--td-error-color-focus); - border-radius: 8px; - font-size: 13px; + border-radius: var(--app-radius-md); + font-size: var(--app-text-md); .tip-icon { color: var(--td-error-color); - font-size: 16px; + font-size: var(--app-text-xl); flex-shrink: 0; margin-right: 2px; @@ -2385,7 +2356,7 @@ const handleCancel = () => { :deep(.tip-link) { color: var(--td-brand-color); - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; padding: 4px 6px 4px 10px !important; min-height: auto !important; @@ -2396,20 +2367,20 @@ const handleCancel = () => { display: inline-flex !important; align-items: center !important; gap: 1px; - border-radius: 4px; - transition: all 0.2s ease; + border-radius: var(--app-radius-xs); + transition: all var(--app-motion-base) ease; &:hover { - background: rgba(7, 192, 95, 0.08) !important; + background: color-mix(in srgb, var(--td-brand-color) 8%, transparent) !important; color: var(--td-brand-color-active) !important; } &:active { - background: rgba(7, 192, 95, 0.12) !important; + background: color-mix(in srgb, var(--td-brand-color) 12%, transparent) !important; } .t-icon { - font-size: 14px !important; + font-size: var(--app-text-base) !important; margin: 0 !important; line-height: 1 !important; display: inline-flex !important; @@ -2426,7 +2397,7 @@ const handleCancel = () => { :deep(.t-checkbox__label) { color: var(--td-error-color); - font-size: 13px; + font-size: var(--app-text-md); } } @@ -2441,7 +2412,7 @@ const handleCancel = () => { .t-select-option { height: auto !important; padding: 8px 10px; - border-radius: 6px; + border-radius: var(--app-radius-sm); margin: 2px 0; white-space: normal; } @@ -2455,12 +2426,12 @@ const handleCancel = () => { min-width: 0; &__title { - font-size: 13px; + font-size: var(--app-text-md); color: var(--td-text-color-primary); } &__hint { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); word-break: break-word; } @@ -2481,10 +2452,10 @@ const handleCancel = () => { .t-select-option { height: auto !important; padding: 8px 10px; - border-radius: 6px; + border-radius: var(--app-radius-sm); margin: 2px 0; outline: none; - transition: background-color 0.15s ease; + transition: background-color var(--app-motion-fast) ease; &:focus, &:focus-visible { @@ -2528,14 +2499,14 @@ const handleCancel = () => { min-width: 0; .provider-name { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; color: var(--td-text-color-primary); line-height: 20px; } .provider-desc { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); line-height: 18px; white-space: nowrap; diff --git a/frontend/src/components/ModelSelector.vue b/frontend/src/components/ModelSelector.vue index b855f519..77525d1b 100644 --- a/frontend/src/components/ModelSelector.vue +++ b/frontend/src/components/ModelSelector.vue @@ -186,19 +186,19 @@ onMounted(() => { gap: 8px; .model-icon { - font-size: 14px; + font-size: var(--app-text-base); color: var(--td-brand-color); } .add-icon { - font-size: 14px; + font-size: var(--app-text-base); color: var(--td-brand-color); } .model-name { flex: 0 1 auto; min-width: 0; - font-size: 13px; + font-size: var(--app-text-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -207,7 +207,7 @@ onMounted(() => { .model-raw-name { flex: 1; min-width: 0; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); overflow: hidden; text-overflow: ellipsis; @@ -228,12 +228,12 @@ onMounted(() => { .model-ctx { flex-shrink: 0; - font-size: 11px; + font-size: var(--app-text-xs); font-variant-numeric: tabular-nums; color: var(--td-text-color-secondary); background: var(--td-bg-color-secondarycontainer); padding: 0 6px; - border-radius: 4px; + border-radius: var(--app-radius-xs); line-height: 18px; &--default { diff --git a/frontend/src/components/MyInvitationsDialog.vue b/frontend/src/components/MyInvitationsDialog.vue index fe217a7f..751c0327 100644 --- a/frontend/src/components/MyInvitationsDialog.vue +++ b/frontend/src/components/MyInvitationsDialog.vue @@ -216,7 +216,7 @@ watch( diff --git a/frontend/src/components/ResourceOriginBadge.vue b/frontend/src/components/ResourceOriginBadge.vue index e41e39a3..56976866 100644 --- a/frontend/src/components/ResourceOriginBadge.vue +++ b/frontend/src/components/ResourceOriginBadge.vue @@ -130,8 +130,8 @@ const tooltipText = computed(() => { align-items: center; gap: 3px; padding: 1px 6px; - border-radius: 8px; - font-size: 11px; + border-radius: var(--app-radius-md); + font-size: var(--app-text-xs); line-height: 1.4; font-weight: 500; max-width: 140px; @@ -162,8 +162,8 @@ const tooltipText = computed(() => { } &.origin-space { - color: var(--td-warning-color-7, #b86e02); - background: var(--td-warning-color-1, #fff7e6); + color: var(--td-warning-color-7); + background: var(--td-warning-color-1); } &.origin-shared { diff --git a/frontend/src/components/SandboxCommandProgress.vue b/frontend/src/components/SandboxCommandProgress.vue index 3087fdb0..1f0bde5a 100644 --- a/frontend/src/components/SandboxCommandProgress.vue +++ b/frontend/src/components/SandboxCommandProgress.vue @@ -37,15 +37,15 @@ onUnmounted(() => clearInterval(timer)) min-width: 0; margin: 8px 0; padding: 8px 10px; - border-radius: 4px; - background: var(--td-bg-color-secondarycontainer, #f7f7f7); - color: var(--td-text-color-secondary, #666); - font-size: 12px; + border-radius: var(--app-radius-xs); + background: var(--td-bg-color-secondarycontainer); + color: var(--td-text-color-secondary); + font-size: var(--app-text-sm); line-height: 1.5; code, pre { font-family: var(--td-font-family-code, monospace); - font-size: 11px; + font-size: var(--app-text-xs); line-height: 1.6; } @@ -64,7 +64,7 @@ onUnmounted(() => clearInterval(timer)) padding-top: 8px; overflow: auto; overscroll-behavior: contain; - border-top: 1px solid var(--td-component-stroke, #e7e7e7); + border-top: 1px solid var(--td-component-stroke); white-space: pre-wrap; overflow-wrap: anywhere; } @@ -78,8 +78,8 @@ onUnmounted(() => clearInterval(timer)) } .sandbox-command-elapsed { flex-shrink: 0; - color: var(--td-text-color-placeholder, #999); - font-size: 11px; + color: var(--td-text-color-placeholder); + font-size: var(--app-text-xs); font-variant-numeric: tabular-nums; } diff --git a/frontend/src/components/SandboxConfigEditorDrawer.vue b/frontend/src/components/SandboxConfigEditorDrawer.vue index cfa004dd..755abbc9 100644 --- a/frontend/src/components/SandboxConfigEditorDrawer.vue +++ b/frontend/src/components/SandboxConfigEditorDrawer.vue @@ -1797,7 +1797,7 @@ onUnmounted(stopTemplatePolling) gap: 8px; min-width: 0; color: var(--td-text-color-placeholder); - transition: color 0.15s ease; + transition: color var(--app-motion-fast) ease; /* Only the steps that draw a connector need to absorb the leftover width. */ &:not(:last-child) { @@ -1832,7 +1832,7 @@ onUnmounted(stopTemplatePolling) &:focus-visible { outline: 2px solid var(--td-brand-color); outline-offset: 2px; - border-radius: 4px; + border-radius: var(--app-radius-xs); } } } @@ -1846,7 +1846,7 @@ onUnmounted(stopTemplatePolling) flex-shrink: 0; border: 1px solid currentColor; border-radius: 50%; - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 600; line-height: 1; @@ -1865,7 +1865,7 @@ onUnmounted(stopTemplatePolling) .sandbox-step__title { overflow: hidden; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; @@ -1906,7 +1906,7 @@ onUnmounted(stopTemplatePolling) :deep(.t-form__label) { padding-bottom: 6px; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; line-height: 1.4; } @@ -1915,7 +1915,7 @@ onUnmounted(stopTemplatePolling) :deep(.t-input-number), :deep(.t-select) { width: 100%; - font-size: 13px; + font-size: var(--app-text-md); } } @@ -1930,12 +1930,12 @@ onUnmounted(stopTemplatePolling) background: var(--td-bg-color-secondarycontainer); :deep(.t-alert__icon) { - font-size: 15px; + font-size: var(--app-text-lg); } :deep(.t-alert__message) { color: var(--td-text-color-secondary); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; } } @@ -1947,14 +1947,14 @@ onUnmounted(stopTemplatePolling) gap: 16px; padding: 10px 12px; border: 1px solid var(--td-component-stroke); - border-radius: 6px; + border-radius: var(--app-radius-sm); background: var(--td-bg-color-secondarycontainer); } .private-endpoint-row__title { margin: 0 0 3px; color: var(--td-text-color-primary); - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; } @@ -1984,14 +1984,14 @@ onUnmounted(stopTemplatePolling) .backend-choice__name { color: var(--td-text-color-primary); - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; line-height: 1.4; } .backend-choice__desc { color: var(--td-text-color-secondary); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.45; white-space: normal; } @@ -2014,7 +2014,7 @@ onUnmounted(stopTemplatePolling) gap: 12px; padding: 12px; border: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-secondarycontainer); &.is-active { @@ -2030,7 +2030,7 @@ onUnmounted(stopTemplatePolling) p { margin: 4px 0 0; color: var(--td-text-color-secondary); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; } } @@ -2042,7 +2042,7 @@ onUnmounted(stopTemplatePolling) } .weknora-template-card__title { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; } @@ -2054,9 +2054,9 @@ onUnmounted(stopTemplatePolling) width: 100%; min-height: 88px; border: 1px dashed var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); color: var(--td-text-color-secondary); - font-size: 12px; + font-size: var(--app-text-sm); } .template-list { @@ -2080,15 +2080,15 @@ onUnmounted(stopTemplatePolling) padding: 10px 12px; overflow: hidden; border: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-container); color: var(--td-text-color-primary); text-align: left; cursor: pointer; - transition: border-color 0.15s ease, box-shadow 0.15s ease; + transition: border-color var(--app-motion-fast) ease, box-shadow var(--app-motion-fast) ease; &:hover:not(.is-disabled):not(.template-row--offer) { - border-color: var(--td-brand-color-3, var(--td-brand-color)); + border-color: var(--td-brand-color-3); } &.is-active { @@ -2116,7 +2116,7 @@ onUnmounted(stopTemplatePolling) height: 14px; margin-top: 3px; box-sizing: border-box; - border: 1.5px solid var(--td-border-level-2-color, var(--td-component-stroke)); + border: 1.5px solid var(--td-border-level-2-color); border-radius: 50%; background: var(--td-bg-color-container); @@ -2155,7 +2155,7 @@ onUnmounted(stopTemplatePolling) flex: 0 1 auto; min-width: 0; overflow: hidden; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; line-height: 22px; text-overflow: ellipsis; @@ -2198,7 +2198,7 @@ onUnmounted(stopTemplatePolling) dt { color: var(--td-text-color-placeholder); - font-size: 11px; + font-size: var(--app-text-xs); line-height: 18px; white-space: nowrap; } @@ -2208,14 +2208,14 @@ onUnmounted(stopTemplatePolling) min-width: 0; overflow: hidden; color: var(--td-text-color-secondary); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 18px; text-overflow: ellipsis; white-space: nowrap; &.is-mono { - font-family: var(--td-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace); - font-size: 11px; + font-family: var(--td-font-family-mono); + font-size: var(--app-text-xs); } } } @@ -2224,7 +2224,7 @@ onUnmounted(stopTemplatePolling) margin: 0; overflow-wrap: anywhere; color: var(--td-text-color-placeholder); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; &--error { @@ -2251,7 +2251,7 @@ onUnmounted(stopTemplatePolling) gap: 5px; margin-top: -4px; color: var(--td-brand-color); - font-size: 12px; + font-size: var(--app-text-sm); text-decoration: none; &:hover { @@ -2272,7 +2272,7 @@ onUnmounted(stopTemplatePolling) } .net-list__title { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; color: var(--td-text-color-primary); } @@ -2295,7 +2295,7 @@ onUnmounted(stopTemplatePolling) .net-rule { border: 1px solid var(--td-component-border); - border-radius: 6px; + border-radius: var(--app-radius-sm); padding: 12px; margin-bottom: 12px; } @@ -2304,7 +2304,7 @@ onUnmounted(stopTemplatePolling) padding: 0; margin-bottom: 2px; border: 0; - border-radius: 4px; + border-radius: var(--app-radius-xs); } .net-rule--collapsible.is-open { @@ -2336,7 +2336,7 @@ onUnmounted(stopTemplatePolling) background: transparent; color: var(--td-text-color-secondary); cursor: pointer; - border-radius: 4px; + border-radius: var(--app-radius-xs); text-align: left; } @@ -2350,7 +2350,7 @@ onUnmounted(stopTemplatePolling) overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 18px; color: var(--td-text-color-primary); } @@ -2371,7 +2371,7 @@ onUnmounted(stopTemplatePolling) background: transparent; color: var(--td-text-color-placeholder); cursor: pointer; - border-radius: 4px; + border-radius: var(--app-radius-xs); } .net-rule__move:hover:not(:disabled) { @@ -2415,9 +2415,9 @@ onUnmounted(stopTemplatePolling) .env-empty { padding: 18px; border: 1px dashed var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); color: var(--td-text-color-placeholder); - font-size: 12px; + font-size: var(--app-text-sm); text-align: center; } @@ -2431,7 +2431,7 @@ onUnmounted(stopTemplatePolling) .section-help { margin: 0; color: var(--td-text-color-placeholder); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; &--under-title { @@ -2461,7 +2461,7 @@ onUnmounted(stopTemplatePolling) gap: 6px; margin: 0; color: var(--td-text-color-primary); - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; line-height: 1.45; @@ -2478,7 +2478,7 @@ onUnmounted(stopTemplatePolling) .check-result__hint { margin: 0; color: var(--td-text-color-secondary); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.55; } @@ -2497,7 +2497,7 @@ onUnmounted(stopTemplatePolling) gap: 8px; flex-wrap: wrap; padding: 2px 0; - font-size: 12px; + font-size: var(--app-text-sm); } .check-item .ok { @@ -2550,7 +2550,7 @@ onUnmounted(stopTemplatePolling) } .sandbox-step__title { - font-size: 12px; + font-size: var(--app-text-sm); } .template-row__fields { diff --git a/frontend/src/components/SandboxSkillsPanel.vue b/frontend/src/components/SandboxSkillsPanel.vue index 91461c0f..82ab73cf 100644 --- a/frontend/src/components/SandboxSkillsPanel.vue +++ b/frontend/src/components/SandboxSkillsPanel.vue @@ -1419,7 +1419,7 @@ onUnmounted(() => { .installer-model-hint { margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-secondary); } @@ -1433,10 +1433,10 @@ onUnmounted(() => { width: 100%; min-height: 44px; border: 1px dashed var(--td-component-stroke); - border-radius: 6px; + border-radius: var(--app-radius-sm); background: var(--td-bg-color-secondarycontainer); cursor: pointer; - transition: border-color 0.2s ease, background 0.2s ease; + transition: border-color var(--app-motion-base) ease, background var(--app-motion-base) ease; display: flex; align-items: center; justify-content: center; @@ -1459,7 +1459,7 @@ onUnmounted(() => { &--large { min-height: 180px; - border-radius: 12px; + border-radius: var(--app-radius-xl); border-width: 2px; } } @@ -1498,11 +1498,11 @@ onUnmounted(() => { } .file-upload-area--large .upload-primary-text { - font-size: 15px; + font-size: var(--app-text-lg); } .file-upload-area--large .upload-secondary-text { - font-size: 13px; + font-size: var(--app-text-md); } .upload-icon { @@ -1520,18 +1520,18 @@ onUnmounted(() => { } .upload-primary-text { - font-size: 14px; + font-size: var(--app-text-base); font-weight: 500; color: var(--td-text-color-primary); } .upload-secondary-text { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-secondary); } .upload-file-name { - font-size: 14px; + font-size: var(--app-text-base); font-weight: 500; color: var(--td-brand-color); } @@ -1542,7 +1542,7 @@ onUnmounted(() => { .upload-hint { margin: 8px 0 0; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); line-height: 1.5; } @@ -1561,7 +1561,7 @@ onUnmounted(() => { align-items: center; gap: 12px; margin: 10px 0; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); &::before, @@ -1630,14 +1630,14 @@ onUnmounted(() => { label { display: block; margin-bottom: 4px; - font-size: 14px; + font-size: var(--app-text-base); font-weight: 500; color: var(--td-text-color-primary); } p { margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-secondary); } @@ -1653,7 +1653,7 @@ onUnmounted(() => { h4 { margin: 0; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; color: var(--td-text-color-primary); } @@ -1669,7 +1669,7 @@ onUnmounted(() => { display: inline-flex; align-items: center; gap: 6px; - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; line-height: 1; color: var(--td-brand-color); @@ -1687,7 +1687,7 @@ onUnmounted(() => { .skill-manage__remove-stage { margin: 0; - font-size: 13px; + font-size: var(--app-text-md); line-height: 1.5; color: var(--td-text-color-secondary); } @@ -1698,11 +1698,11 @@ onUnmounted(() => { align-items: flex-start; gap: 10px; padding: 8px 0 4px; - color: var(--td-success-color, var(--td-brand-color)); + color: var(--td-success-color); p { margin: 0; - font-size: 14px; + font-size: var(--app-text-base); line-height: 1.55; color: var(--td-text-color-primary); } @@ -1710,7 +1710,7 @@ onUnmounted(() => { .skill-envs__hint { margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-secondary); } @@ -1735,17 +1735,17 @@ onUnmounted(() => { } .skill-envs__name { - font-family: var(--td-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace); - font-size: 12px; + font-family: var(--td-font-family-mono); + font-size: var(--app-text-sm); color: var(--td-text-color-primary); overflow-wrap: anywhere; } .skill-envs__tag { - font-size: 12px; + font-size: var(--app-text-sm); line-height: 18px; padding: 0 8px; - border-radius: 10px; + border-radius: var(--app-radius-lg); background: var(--td-bg-color-secondarycontainer); color: var(--td-text-color-secondary); } @@ -1761,7 +1761,7 @@ onUnmounted(() => { } .skill-envs__desc { - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-secondary); } @@ -1793,14 +1793,14 @@ onUnmounted(() => { gap: 12px; padding: 14px 14px 14px 12px; border: 1px solid var(--td-component-stroke); - border-radius: 10px; + border-radius: var(--app-radius-lg); background: var(--td-bg-color-container); transition: border-color 0.18s ease, box-shadow 0.18s ease; min-width: 0; &--focused { border-color: var(--td-brand-color); - box-shadow: 0 0 0 2px var(--td-brand-color-focus, rgba(0, 168, 112, 0.18)); + box-shadow: 0 0 0 2px var(--td-brand-color-focus); } &--bare { @@ -1843,14 +1843,14 @@ onUnmounted(() => { justify-content: center; width: 32px; height: 32px; - border-radius: 8px; + border-radius: var(--app-radius-md); background: color-mix(in srgb, var(--td-brand-color) 10%, transparent); color: var(--td-brand-color); - font-size: 18px; + font-size: var(--app-text-2xl); } &__label { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; line-height: 1.4; } @@ -1899,7 +1899,7 @@ onUnmounted(() => { flex: 1; min-width: 0; margin: 0; - font-size: 14px; + font-size: var(--app-text-base); font-weight: 600; line-height: 1.4; color: var(--td-text-color-primary); @@ -1914,17 +1914,17 @@ onUnmounted(() => { align-items: center; gap: 5px; padding: 1px 8px 1px 6px; - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 500; line-height: 16px; - border-radius: 10px; + border-radius: var(--app-radius-lg); background: var(--td-bg-color-secondarycontainer); &--on { - color: var(--td-success-color-7, #118053); + color: var(--td-success-color-7); .skill-card__status-dot { - background: var(--td-success-color, #118053); + background: var(--td-success-color); } } @@ -1945,10 +1945,10 @@ onUnmounted(() => { } &--failed { - color: var(--td-warning-color-7, #b85c00); + color: var(--td-warning-color-7); .skill-card__status-dot { - background: var(--td-warning-color, #e37318); + background: var(--td-warning-color); } } } @@ -2001,7 +2001,7 @@ onUnmounted(() => { color: var(--td-text-color-placeholder); cursor: pointer; line-height: 0; - transition: background 0.15s ease, color 0.15s ease; + transition: background var(--app-motion-fast) ease, color var(--app-motion-fast) ease; :deep(.t-icon) { display: block; @@ -2027,7 +2027,7 @@ onUnmounted(() => { } &--danger:hover:not(:disabled) { - background: var(--td-error-color-1, var(--td-bg-color-secondarycontainer)); + background: var(--td-error-color-1); color: var(--td-error-color); } } @@ -2042,7 +2042,7 @@ onUnmounted(() => { } .skill-card__type { - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 500; line-height: 1.3; color: var(--td-text-color-placeholder); @@ -2056,14 +2056,14 @@ onUnmounted(() => { overflow: hidden; min-width: 0; margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.45; color: var(--td-text-color-secondary); } .skill-card__log { margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.4; color: var(--td-text-color-placeholder); } @@ -2071,7 +2071,7 @@ onUnmounted(() => { .skill-card__error { margin: 2px 0 0; padding: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; word-break: break-word; list-style: none; @@ -2106,7 +2106,7 @@ onUnmounted(() => { padding: 0 !important; width: 420px; max-width: min(420px, calc(100vw - 32px)); - border-radius: 10px !important; + border-radius: var(--app-radius-lg) !important; background: var(--td-bg-color-container) !important; border: 1px solid var(--td-component-stroke) !important; box-shadow: @@ -2135,7 +2135,7 @@ onUnmounted(() => { } &__title { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; line-height: 1.35; color: var(--td-text-color-primary); @@ -2149,7 +2149,7 @@ onUnmounted(() => { align-items: center; gap: 6px; margin-top: 2px; - font-size: 11px; + font-size: var(--app-text-xs); line-height: 1.4; color: var(--td-text-color-placeholder); } @@ -2217,7 +2217,7 @@ onUnmounted(() => { .skill-envs__hint { margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-secondary); } @@ -2243,17 +2243,17 @@ onUnmounted(() => { } .skill-envs__name { - font-family: var(--td-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace); - font-size: 12px; + font-family: var(--td-font-family-mono); + font-size: var(--app-text-sm); color: var(--td-text-color-primary); overflow-wrap: anywhere; } .skill-envs__tag { - font-size: 12px; + font-size: var(--app-text-sm); line-height: 18px; padding: 0 8px; - border-radius: 10px; + border-radius: var(--app-radius-lg); background: var(--td-bg-color-secondarycontainer); color: var(--td-text-color-secondary); } @@ -2269,7 +2269,7 @@ onUnmounted(() => { } .skill-envs__desc { - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-secondary); } diff --git a/frontend/src/components/SessionSidebarRow.vue b/frontend/src/components/SessionSidebarRow.vue index dd93b825..63b7ae64 100644 --- a/frontend/src/components/SessionSidebarRow.vue +++ b/frontend/src/components/SessionSidebarRow.vue @@ -227,13 +227,7 @@ const confirmDangerAction = (): void => { border: 1.5px solid var(--td-component-stroke); border-top-color: currentColor; border-radius: 50%; - animation: session-running-spin 0.8s linear infinite; -} - -@keyframes session-running-spin { - to { - transform: rotate(360deg); - } + animation: wk-spin 0.8s linear infinite; } @media (prefers-reduced-motion: reduce) { @@ -260,7 +254,7 @@ const confirmDangerAction = (): void => { border-radius: 5px; color: var(--td-text-color-primary); background: var(--td-bg-color-container); - font-size: 14px; + font-size: var(--app-text-base); line-height: 24px; outline: none; box-shadow: 0 0 0 2px var(--td-brand-color-light); @@ -278,7 +272,7 @@ const confirmDangerAction = (): void => { color: inherit; background: transparent; cursor: pointer; - transition: background-color 0.15s ease, color 0.15s ease; + transition: background-color var(--app-motion-fast) ease, color var(--app-motion-fast) ease; &:hover { background: var(--td-bg-color-container-hover); @@ -297,10 +291,10 @@ const confirmDangerAction = (): void => { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; - font-size: 11px; + font-size: var(--app-text-xs); line-height: 15px; font-weight: 400; - border-radius: 4px; + border-radius: var(--app-radius-xs); &--user { color: var(--td-brand-color); @@ -325,7 +319,7 @@ const confirmDangerAction = (): void => { margin-top: 2px !important; min-width: 160px !important; width: max-content !important; - border-radius: 8px !important; + border-radius: var(--app-radius-md) !important; background: var(--td-bg-color-container) !important; border: 0.5px solid var(--td-component-stroke) !important; box-shadow: @@ -359,7 +353,7 @@ const confirmDangerAction = (): void => { border-radius: 5px; color: var(--td-text-color-primary); background: transparent; - font-size: 14px; + font-size: var(--app-text-base); line-height: 20px; text-align: left; white-space: nowrap; @@ -389,7 +383,7 @@ const confirmDangerAction = (): void => { color: var(--td-text-color-secondary); .t-icon { - font-size: 16px; + font-size: var(--app-text-xl); } } @@ -409,14 +403,14 @@ const confirmDangerAction = (): void => { .session-action-confirm__title { margin: 0; color: var(--td-text-color-primary); - font-size: 14px; + font-size: var(--app-text-base); font-weight: 600; line-height: 20px; } .session-action-confirm__body { color: var(--td-text-color-secondary); - font-size: 14px; + font-size: var(--app-text-base); line-height: 1.5; word-break: break-word; } @@ -433,13 +427,13 @@ const confirmDangerAction = (): void => { height: 30px; padding: 0 12px; border: 0.5px solid var(--td-component-stroke); - border-radius: 6px; + border-radius: var(--app-radius-sm); color: var(--td-text-color-primary); background: var(--td-bg-color-container); - font-size: 14px; + font-size: var(--app-text-base); line-height: 28px; cursor: pointer; - transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease; + transition: background-color var(--app-motion-fast) ease, color var(--app-motion-fast) ease, border-color var(--app-motion-fast) ease; &:hover:not(:disabled) { background: var(--td-bg-color-container-hover); diff --git a/frontend/src/components/SessionSourceFilter.vue b/frontend/src/components/SessionSourceFilter.vue index 4f307ffe..6aeb5df9 100644 --- a/frontend/src/components/SessionSourceFilter.vue +++ b/frontend/src/components/SessionSourceFilter.vue @@ -169,11 +169,11 @@ onBeforeUnmount(() => { min-height: 28px; padding: 4px 10px 4px 14px; border: 0; - border-radius: 6px; + border-radius: var(--app-radius-sm); background: transparent; color: var(--td-text-color-secondary); cursor: pointer; - transition: background 0.15s ease, color 0.15s ease; + transition: background var(--app-motion-fast) ease, color var(--app-motion-fast) ease; font-family: var(--app-font-family); text-align: left; @@ -215,13 +215,13 @@ onBeforeUnmount(() => { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; line-height: 18px; letter-spacing: 0.01em; .session-source-filter--inline .session-source-filter__trigger & { - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 600; line-height: 16px; color: inherit; @@ -247,7 +247,7 @@ onBeforeUnmount(() => { color: var(--td-text-color-placeholder); .session-source-filter--inline & { - font-size: 12px !important; + font-size: var(--app-text-sm) !important; color: var(--td-text-color-disabled); } } @@ -255,7 +255,7 @@ onBeforeUnmount(() => { .session-source-filter__chevron { flex: 0 0 auto; color: var(--td-text-color-placeholder); - transition: transform 0.18s ease, color 0.15s ease; + transition: transform 0.18s ease, color var(--app-motion-fast) ease; &--open { transform: rotate(180deg); @@ -265,7 +265,7 @@ onBeforeUnmount(() => { .session-source-filter--inline & { color: var(--td-text-color-disabled); opacity: 0.85; - font-size: 10px !important; + font-size: var(--app-text-2xs) !important; } } @@ -278,7 +278,7 @@ onBeforeUnmount(() => { padding: 3px; border: 1px solid var(--td-component-stroke); border-radius: 7px; - background: var(--td-bg-color-sidebar, var(--td-bg-color-container)); + background: var(--td-bg-color-sidebar); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05), 0 0 1px rgba(0, 0, 0, 0.04); } @@ -295,7 +295,7 @@ onBeforeUnmount(() => { background: transparent; color: var(--td-text-color-primary); cursor: pointer; - transition: background 0.15s ease, color 0.15s ease; + transition: background var(--app-motion-fast) ease, color var(--app-motion-fast) ease; font-family: var(--app-font-family); text-align: left; white-space: nowrap; @@ -320,7 +320,7 @@ onBeforeUnmount(() => { } .session-source-filter__option-label { - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; line-height: 16px; } @@ -330,7 +330,7 @@ onBeforeUnmount(() => { width: 13px; margin-left: 2px; color: var(--td-text-color-placeholder); - font-size: 12px !important; + font-size: var(--app-text-sm) !important; visibility: hidden; &--visible { diff --git a/frontend/src/components/SettingsModalShell.vue b/frontend/src/components/SettingsModalShell.vue new file mode 100644 index 00000000..68183ae4 --- /dev/null +++ b/frontend/src/components/SettingsModalShell.vue @@ -0,0 +1,413 @@ + + + + + diff --git a/frontend/src/components/ShareKnowledgeBaseDialog.vue b/frontend/src/components/ShareKnowledgeBaseDialog.vue index c31eb134..6f537405 100644 --- a/frontend/src/components/ShareKnowledgeBaseDialog.vue +++ b/frontend/src/components/ShareKnowledgeBaseDialog.vue @@ -289,10 +289,10 @@ function handleGoToOrgSettings(orgId: string) { gap: 8px; padding: 12px; background: var(--td-bg-color-container-hover); - border-radius: 6px; + border-radius: var(--app-radius-sm); margin-top: 8px; color: var(--td-text-color-secondary); - font-size: 13px; + font-size: var(--app-text-md); line-height: 1.5; .t-icon { @@ -341,8 +341,8 @@ function handleGoToOrgSettings(orgId: string) { padding: 14px 16px; background: var(--td-bg-color-container-hover); border: 1px solid var(--td-component-stroke); - border-radius: 8px; - transition: background 0.2s, border-color 0.2s; + border-radius: var(--app-radius-md); + transition: background var(--app-motion-base), border-color var(--app-motion-base); } .share-item:hover { @@ -371,9 +371,9 @@ function handleGoToOrgSettings(orgId: string) { height: auto; align-items: center; padding: 6px 12px; - border-radius: 4px; + border-radius: var(--app-radius-xs); margin: 1px 6px; - transition: background 0.15s ease; + transition: background var(--app-motion-fast) ease; } :deep(.t-select-option:hover), @@ -414,7 +414,7 @@ function handleGoToOrgSettings(orgId: string) { .org-option-name { font-family: var(--app-font-family); - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; color: var(--td-text-color-primary); overflow: hidden; @@ -428,7 +428,7 @@ function handleGoToOrgSettings(orgId: string) { align-items: center; gap: 6px; font-family: var(--app-font-family); - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); .org-meta-tag { @@ -437,7 +437,7 @@ function handleGoToOrgSettings(orgId: string) { gap: 3px; padding: 0px 4px; background: var(--td-bg-color-secondarycontainer); - border-radius: 4px; + border-radius: var(--app-radius-xs); } .org-meta-icon { @@ -447,7 +447,7 @@ function handleGoToOrgSettings(orgId: string) { } .org-meta-icon-user { - font-size: 12px; + font-size: var(--app-text-sm); } .org-meta-icon-kb { @@ -457,7 +457,7 @@ function handleGoToOrgSettings(orgId: string) { } .org-meta-icon-agent { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-secondary); opacity: 0.75; } @@ -470,7 +470,7 @@ function handleGoToOrgSettings(orgId: string) { padding: 4px 0; max-height: 320px; overflow-y: auto; - border-radius: 6px; + border-radius: var(--app-radius-sm); box-shadow: var(--td-shadow-2); } @@ -478,7 +478,7 @@ function handleGoToOrgSettings(orgId: string) { height: auto; align-items: center; padding: 6px 12px; - border-radius: 4px; + border-radius: var(--app-radius-xs); margin: 1px 6px; } diff --git a/frontend/src/components/SkillFilesDrawer.vue b/frontend/src/components/SkillFilesDrawer.vue index 6f41bc48..19253e53 100644 --- a/frontend/src/components/SkillFilesDrawer.vue +++ b/frontend/src/components/SkillFilesDrawer.vue @@ -195,9 +195,9 @@ onUnmounted(() => { display: flex; align-items: center; justify-content: center; - background: rgba(7, 192, 95, 0.1); + background: color-mix(in srgb, var(--td-brand-color) 10%, transparent); color: var(--td-brand-color); - font-size: 16px; + font-size: var(--app-text-xl); } .skill-files-drawer__head-text { @@ -206,7 +206,7 @@ onUnmounted(() => { } .skill-files-drawer__title { - font-size: 15px; + font-size: var(--app-text-lg); font-weight: 600; line-height: 1.4; color: var(--td-text-color-primary); @@ -217,7 +217,7 @@ onUnmounted(() => { .skill-files-drawer__subtitle { margin-top: 2px; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.4; color: var(--td-text-color-secondary); } @@ -231,7 +231,7 @@ onUnmounted(() => { justify-content: center; padding: 0; border: 0; - border-radius: 6px; + border-radius: var(--app-radius-sm); background: transparent; color: var(--td-text-color-secondary); cursor: pointer; @@ -297,7 +297,7 @@ onUnmounted(() => { border-radius: 1px; background: var(--td-component-border); opacity: 0.55; - transition: opacity 0.15s ease, background 0.15s ease; + transition: opacity var(--app-motion-fast) ease, background var(--app-motion-fast) ease; } .skill-files-drawer-resize-handle:hover .skill-files-drawer-resize-line, diff --git a/frontend/src/components/SkillFilesPanel.vue b/frontend/src/components/SkillFilesPanel.vue index 4434f9a7..a6b1ef9c 100644 --- a/frontend/src/components/SkillFilesPanel.vue +++ b/frontend/src/components/SkillFilesPanel.vue @@ -615,14 +615,14 @@ watch( margin-bottom: 2px; padding: 6px 12px; border: 0; - border-radius: 6px; + border-radius: var(--app-radius-sm); background: transparent; - font-size: 13px; + font-size: var(--app-text-md); color: var(--td-text-color-primary); cursor: pointer; text-align: left; user-select: none; - transition: background-color 0.2s ease, color 0.2s ease; + transition: background-color var(--app-motion-base) ease, color var(--app-motion-base) ease; &:hover { background-color: var(--td-bg-color-container-hover); @@ -691,7 +691,7 @@ watch( overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-secondary); } @@ -700,9 +700,9 @@ watch( height: 24px; padding: 0 8px; border: 0; - border-radius: 4px; + border-radius: var(--app-radius-xs); background: transparent; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 24px; color: var(--td-text-color-secondary); cursor: pointer; @@ -727,21 +727,21 @@ watch( &::-webkit-scrollbar-thumb { background: var(--td-bg-color-component-disabled); - border-radius: 4px; + border-radius: var(--app-radius-xs); } } .skill-files-panel__hint { margin: 24px 8px; text-align: center; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-placeholder); } .skill-files-panel__warn { margin: 0 0 8px; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-warning-color); } @@ -749,7 +749,7 @@ watch( margin: 0 0 20px; padding: 8px 12px; border: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-secondarycontainer); } @@ -765,7 +765,7 @@ watch( dt { margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; line-height: 1.5; color: var(--td-text-color-secondary); @@ -774,15 +774,15 @@ watch( dd { margin: 0; min-width: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-primary); word-break: break-word; white-space: pre-wrap; &.is-code { - font-family: var(--td-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace); - font-size: 11px; + font-family: var(--td-font-family-mono); + font-size: var(--app-text-xs); } } } @@ -797,8 +797,8 @@ watch( padding: 0; background: transparent; overflow: visible; - font-family: var(--td-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace); - font-size: 12px; + font-family: var(--td-font-family-mono); + font-size: var(--app-text-sm); line-height: 1.55; color: var(--td-text-color-primary); white-space: pre-wrap; @@ -831,7 +831,7 @@ watch( background: var(--td-component-border); opacity: 0.55; pointer-events: none; - transition: opacity 0.15s ease, background 0.15s ease; + transition: opacity var(--app-motion-fast) ease, background var(--app-motion-fast) ease; } .skill-files-split-handle:hover .skill-files-split-handle__line, diff --git a/frontend/src/components/SkillInstallTimeline.vue b/frontend/src/components/SkillInstallTimeline.vue index 0997aa2c..9bdb7ff0 100644 --- a/frontend/src/components/SkillInstallTimeline.vue +++ b/frontend/src/components/SkillInstallTimeline.vue @@ -356,8 +356,8 @@ onUnmounted(stop) flex-shrink: 0; margin-top: 12px; padding-top: 12px; - background: var(--td-bg-color-container, #fff); - border-top: 1px solid var(--td-component-stroke, #e7e7e7); + background: var(--td-bg-color-container); + border-top: 1px solid var(--td-component-stroke); // Cover the timeline's padding too, so scrolling text cannot peek around // the sticky composer. Its z-index keeps this backdrop above the transcript. @@ -374,8 +374,8 @@ onUnmounted(stop) margin: 8px 0; padding: 8px; background: var(--td-bg-color-container); - border-radius: 6px; - span { font-size: 12px; color: var(--td-text-color-secondary); } + border-radius: var(--app-radius-sm); + span { font-size: var(--app-text-sm); color: var(--td-text-color-secondary); } p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; } } .skill-timeline__guidance-actions { @@ -384,17 +384,17 @@ onUnmounted(stop) justify-content: flex-end; gap: 12px; margin-top: 8px; - span { flex: 1; font-size: 12px; color: var(--td-text-color-secondary); } + span { flex: 1; font-size: var(--app-text-sm); color: var(--td-text-color-secondary); } } -.skill-timeline__guidance-error { color: var(--td-error-color); font-size: 12px; } +.skill-timeline__guidance-error { color: var(--td-error-color); font-size: var(--app-text-sm); } .skill-timeline { display: flex; flex-direction: column; padding: 12px; - background: var(--td-bg-color-secondarycontainer, #f7f7f7); - border: 1px solid var(--td-component-stroke, #e7e7e7); - border-radius: 8px; + background: var(--td-bg-color-secondarycontainer); + border: 1px solid var(--td-component-stroke); + border-radius: var(--app-radius-md); } .skill-timeline__turn + .skill-timeline__turn { @@ -406,19 +406,19 @@ onUnmounted(stop) margin: 0; padding: 8px 10px; overflow-y: auto; - color: var(--td-text-color-secondary, #666); - font-size: 12px; + color: var(--td-text-color-secondary); + font-size: var(--app-text-sm); line-height: 1.6; - background: var(--td-bg-color-container, #fff); - border-radius: 6px; + background: var(--td-bg-color-container); + border-radius: var(--app-radius-sm); white-space: pre-wrap; word-break: break-word; } .skill-timeline__empty { margin: 8px 0; - color: var(--td-text-color-placeholder, #999); - font-size: 13px; + color: var(--td-text-color-placeholder); + font-size: var(--app-text-md); } .skill-timeline--compact { @@ -431,40 +431,40 @@ onUnmounted(stop) .skill-timeline--compact .skill-timeline__prompt { max-height: 72px; padding: 6px 8px; - font-size: 11px; + font-size: var(--app-text-xs); line-height: 1.5; } .skill-timeline--compact .skill-timeline__empty { margin: 4px 0; - font-size: 12px; + font-size: var(--app-text-sm); } .skill-timeline--compact :deep(.agent-stream-display.is-embedded) { - font-size: 12px; + font-size: var(--app-text-sm); --agent-step-text-size: 12px; --agent-step-summary-size: 12px; } .skill-timeline--compact :deep(.agent-stream-display.is-embedded .tree-root .action-name) { - font-size: 12px; + font-size: var(--app-text-sm); } // Chat answer Markdown is 16px. That is the right size in a conversation and // too loud in this 420px popup, where the prompt and step summary are 11–13px. .skill-timeline--compact :deep(.agent-stream-display .answer-content.markdown-content) { - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.55; } .skill-timeline--compact :deep(.agent-stream-display .answer-content.markdown-content h1) { - font-size: 13px; + font-size: var(--app-text-md); margin-bottom: 0.35em; } .skill-timeline--compact :deep(.agent-stream-display .answer-content.markdown-content h2), .skill-timeline--compact :deep(.agent-stream-display .answer-content.markdown-content h3) { - font-size: 12px; + font-size: var(--app-text-sm); } .skill-timeline__turn--command { // AgentStreamDisplay also renders an empty inline image-viewer trigger. diff --git a/frontend/src/components/SpaceAvatar.vue b/frontend/src/components/SpaceAvatar.vue index 9b2aaad2..db0483ca 100644 --- a/frontend/src/components/SpaceAvatar.vue +++ b/frontend/src/components/SpaceAvatar.vue @@ -110,7 +110,7 @@ const letterStyle = computed(() => { justify-content: center; width: 32px; height: 32px; - border-radius: 8px; + border-radius: var(--app-radius-md); flex-shrink: 0; box-shadow: var(--td-shadow-2); overflow: hidden; @@ -122,7 +122,7 @@ const letterStyle = computed(() => { box-shadow: none; .space-avatar-letter { - font-size: 11px; + font-size: var(--app-text-xs); } .space-avatar-decoration { @@ -133,10 +133,10 @@ const letterStyle = computed(() => { &.space-avatar-large { width: 48px; height: 48px; - border-radius: 12px; + border-radius: var(--app-radius-xl); .space-avatar-letter { - font-size: 20px; + font-size: var(--app-text-3xl); } .space-avatar-emoji-char { @@ -155,11 +155,11 @@ const letterStyle = computed(() => { } .space-avatar-emoji-char { - font-size: 18px; + font-size: var(--app-text-2xl); line-height: 1; .space-avatar-small & { - font-size: 14px; + font-size: var(--app-text-base); } } @@ -178,7 +178,7 @@ const letterStyle = computed(() => { position: relative; z-index: 1; color: var(--td-text-color-anti); - font-size: 14px; + font-size: var(--app-text-base); font-weight: 600; font-family: var(--app-font-family); } diff --git a/frontend/src/components/SpotlightGuide.vue b/frontend/src/components/SpotlightGuide.vue index 6d5c4118..55c93016 100644 --- a/frontend/src/components/SpotlightGuide.vue +++ b/frontend/src/components/SpotlightGuide.vue @@ -443,7 +443,7 @@ defineExpose({ open, close }) box-sizing: border-box; pointer-events: none; border: 2px solid var(--td-brand-color); - box-shadow: 0 0 0 4px rgba(7, 192, 95, 0.18); + box-shadow: 0 0 0 4px color-mix(in srgb, var(--td-brand-color) 18%, transparent); transition: top 0.28s cubic-bezier(0.4, 0, 0.2, 1), left 0.28s cubic-bezier(0.4, 0, 0.2, 1), @@ -486,7 +486,7 @@ defineExpose({ open, close }) height: 28px; padding: 0; border: none; - border-radius: 8px; + border-radius: var(--app-radius-md); background: transparent; color: var(--td-text-color-secondary); cursor: pointer; @@ -507,43 +507,43 @@ defineExpose({ open, close }) height: 6px; border-radius: 50%; background: var(--td-bg-color-component); - transition: width 0.2s ease, background 0.2s ease; + transition: width var(--app-motion-base) ease, background var(--app-motion-base) ease; &.is-active { width: 16px; - border-radius: 999px; + border-radius: var(--app-radius-pill); background: var(--td-brand-color); } &.is-done { - background: rgba(7, 192, 95, 0.4); + background: color-mix(in srgb, var(--td-brand-color) 40%, transparent); } } .guide__step-label { margin: 6px 0 0; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); } .guide__title { margin: 0; padding-right: 24px; - font-size: 18px; + font-size: var(--app-text-2xl); font-weight: 600; line-height: 26px; } .guide__desc { margin: 0; - font-size: 14px; + font-size: var(--app-text-base); line-height: 22px; color: var(--td-text-color-secondary); } .guide__interact-hint { margin: 0; - font-size: 13px; + font-size: var(--app-text-md); line-height: 20px; color: var(--td-brand-color); font-weight: 500; @@ -563,7 +563,7 @@ defineExpose({ open, close }) border: none; background: transparent; padding: 0; - font-size: 13px; + font-size: var(--app-text-md); color: var(--td-text-color-placeholder); cursor: pointer; @@ -579,7 +579,7 @@ defineExpose({ open, close }) .guide-fade-enter-active, .guide-fade-leave-active { - transition: opacity 0.2s ease; + transition: opacity var(--app-motion-base) ease; } .guide-fade-enter-from, diff --git a/frontend/src/components/TenantSelector.vue b/frontend/src/components/TenantSelector.vue index fe795648..ce8f01fa 100644 --- a/frontend/src/components/TenantSelector.vue +++ b/frontend/src/components/TenantSelector.vue @@ -320,9 +320,9 @@ onUnmounted(() => { display: flex; align-items: center; padding: 10px 12px; - border-radius: 8px; + border-radius: var(--app-radius-md); cursor: pointer; - transition: all 0.2s; + transition: all var(--app-motion-base); background: var(--td-bg-color-secondarycontainer); border: .5px solid var(--td-component-stroke); @@ -338,7 +338,7 @@ onUnmounted(() => { } .tenant-label { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-placeholder); margin-bottom: 2px; font-weight: 500; @@ -352,7 +352,7 @@ onUnmounted(() => { } .tenant-name { - font-size: 14px; + font-size: var(--app-text-base); font-weight: 600; color: var(--td-text-color-primary); white-space: nowrap; @@ -362,7 +362,7 @@ onUnmounted(() => { } .tenant-switch-icon { - font-size: 14px; + font-size: var(--app-text-base); color: var(--td-brand-color); flex-shrink: 0; } @@ -383,7 +383,7 @@ onUnmounted(() => { right: 0; background: var(--td-bg-color-container); border: .5px solid var(--td-component-stroke); - border-radius: 10px; + border-radius: var(--app-radius-lg); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12); z-index: 1000; overflow: hidden; @@ -396,7 +396,7 @@ onUnmounted(() => { .dropdown-title { display: block; - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 600; color: var(--td-text-color-secondary); margin-bottom: 8px; @@ -408,19 +408,19 @@ onUnmounted(() => { gap: 6px; padding: 7px 10px; background: var(--td-bg-color-secondarycontainer); - border-radius: 6px; + border-radius: var(--app-radius-sm); border: .5px solid transparent; - transition: all 0.2s; + transition: all var(--app-motion-base); &:focus-within { background: var(--td-bg-color-container); border-color: var(--td-brand-color); - box-shadow: 0 0 0 2px rgba(7, 192, 95, 0.1); + box-shadow: 0 0 0 2px color-mix(in srgb, var(--td-brand-color) 10%, transparent); } } .search-icon { - font-size: 14px; + font-size: var(--app-text-base); color: var(--td-text-color-placeholder); flex-shrink: 0; } @@ -430,7 +430,7 @@ onUnmounted(() => { border: none; outline: none; background: transparent; - font-size: 13px; + font-size: var(--app-text-md); color: var(--td-text-color-primary); min-width: 0; @@ -440,11 +440,11 @@ onUnmounted(() => { } .clear-icon { - font-size: 14px; + font-size: var(--app-text-base); color: var(--td-text-color-placeholder); cursor: pointer; flex-shrink: 0; - transition: color 0.2s; + transition: color var(--app-motion-base); &:hover { color: var(--td-text-color-secondary); @@ -479,9 +479,9 @@ onUnmounted(() => { align-items: center; justify-content: space-between; padding: 8px 10px; - border-radius: 6px; + border-radius: var(--app-radius-sm); cursor: pointer; - transition: all 0.15s; + transition: all var(--app-motion-fast); margin-bottom: 2px; &:last-child { @@ -493,7 +493,7 @@ onUnmounted(() => { } &.selected { - background: rgba(7, 192, 95, 0.08); + background: color-mix(in srgb, var(--td-brand-color) 8%, transparent); .tenant-item-name { color: var(--td-brand-color); @@ -513,16 +513,16 @@ onUnmounted(() => { .tenant-item-avatar { width: 32px; height: 32px; - border-radius: 6px; + border-radius: var(--app-radius-sm); background: var(--td-bg-color-secondarycontainer); display: flex; align-items: center; justify-content: center; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; color: var(--td-text-color-secondary); flex-shrink: 0; - transition: all 0.2s; + transition: all var(--app-motion-base); &.active { background: linear-gradient(135deg, var(--td-brand-color) 0%, var(--td-brand-color-active) 100%); @@ -539,7 +539,7 @@ onUnmounted(() => { } .tenant-item-name { - font-size: 13px; + font-size: var(--app-text-md); color: var(--td-text-color-primary); white-space: nowrap; overflow: hidden; @@ -547,7 +547,7 @@ onUnmounted(() => { } .tenant-item-id { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-placeholder); } @@ -565,7 +565,7 @@ onUnmounted(() => { padding: 24px 12px; gap: 8px; color: var(--td-text-color-placeholder); - font-size: 13px; + font-size: var(--app-text-md); } .tenant-loading-more { @@ -581,20 +581,20 @@ onUnmounted(() => { padding: 10px 12px; margin: 4px 6px 6px; border-top: .5px solid var(--td-component-stroke); - border-radius: 6px; + border-radius: var(--app-radius-sm); cursor: pointer; color: var(--td-brand-color); - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; - transition: background 0.15s; + transition: background var(--app-motion-fast); &:hover { - background: rgba(7, 192, 95, 0.08); + background: color-mix(in srgb, var(--td-brand-color) 8%, transparent); } } .tenant-create-icon { - font-size: 14px; + font-size: var(--app-text-base); flex-shrink: 0; } @@ -608,7 +608,7 @@ onUnmounted(() => { // 下拉动画 .dropdown-enter-active, .dropdown-leave-active { - transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); + transition: all var(--app-motion-base) cubic-bezier(0.4, 0, 0.2, 1); } .dropdown-enter-from, diff --git a/frontend/src/components/UserMenu.vue b/frontend/src/components/UserMenu.vue index 900e34d4..1d45617d 100644 --- a/frontend/src/components/UserMenu.vue +++ b/frontend/src/components/UserMenu.vue @@ -629,9 +629,9 @@ onUnmounted(() => { align-items: center; gap: 6px; padding: 8px 6px; - border-radius: 8px; + border-radius: var(--app-radius-md); cursor: pointer; - transition: all 0.2s; + transition: all var(--app-motion-base); background: transparent; &:hover { @@ -653,7 +653,7 @@ onUnmounted(() => { display: flex; align-items: center; justify-content: center; - transition: width 0.2s ease, height 0.2s ease; + transition: width var(--app-motion-base) ease, height var(--app-motion-base) ease; img { width: 100%; @@ -663,7 +663,7 @@ onUnmounted(() => { .avatar-placeholder { color: var(--td-text-color-anti); - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 600; line-height: 1; } @@ -679,7 +679,7 @@ onUnmounted(() => { justify-content: center; .user-name { - font-size: 14px; + font-size: var(--app-text-base); font-weight: 500; color: var(--td-text-color-primary); white-space: nowrap; @@ -688,7 +688,7 @@ onUnmounted(() => { } .user-email { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-secondary); white-space: nowrap; overflow: hidden; @@ -696,7 +696,7 @@ onUnmounted(() => { } .user-tenant-name { - font-size: 14px; + font-size: var(--app-text-base); font-weight: 600; letter-spacing: -0.01em; color: var(--td-text-color-primary); @@ -712,7 +712,7 @@ onUnmounted(() => { gap: 4px; margin-top: 0; min-width: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.35; color: var(--td-text-color-secondary); @@ -741,10 +741,10 @@ onUnmounted(() => { } .dropdown-icon { - font-size: 16px; + font-size: var(--app-text-xl); color: var(--td-text-color-secondary); flex-shrink: 0; - transition: transform 0.2s; + transition: transform var(--app-motion-base); } .user-dropdown { @@ -755,7 +755,7 @@ onUnmounted(() => { right: -5px; margin-bottom: 6px; background: var(--td-bg-color-container); - border-radius: 8px; + border-radius: var(--app-radius-md); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12); border: 1px solid var(--td-component-stroke); overflow: hidden; @@ -773,7 +773,7 @@ onUnmounted(() => { &.is-clickable { cursor: pointer; - transition: background-color 0.15s ease; + transition: background-color var(--app-motion-fast) ease; &:hover, &:focus-visible { @@ -802,7 +802,7 @@ onUnmounted(() => { .dropdown-user-avatar-placeholder { color: var(--td-text-color-anti); - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 600; line-height: 1; } @@ -827,7 +827,7 @@ onUnmounted(() => { .dropdown-user-name { flex: 1; min-width: 0; - font-size: 14px; + font-size: var(--app-text-base); font-weight: 500; color: var(--td-text-color-primary); line-height: 1.35; @@ -838,7 +838,7 @@ onUnmounted(() => { .dropdown-user-email { min-width: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.35; color: var(--td-text-color-secondary); white-space: nowrap; @@ -856,11 +856,11 @@ onUnmounted(() => { margin: 0; padding: 0; border: none; - border-radius: 4px; + border-radius: var(--app-radius-xs); background: transparent; color: var(--td-text-color-placeholder); cursor: pointer; - transition: background-color 0.2s ease, color 0.2s ease; + transition: background-color var(--app-motion-base) ease, color var(--app-motion-base) ease; &:hover { background: var(--td-bg-color-container-hover); @@ -877,11 +877,11 @@ onUnmounted(() => { padding: 9px 12px; border-top: 1px solid var(--td-component-stroke); background: transparent; - transition: background 0.15s ease; + transition: background var(--app-motion-fast) ease; min-width: 0; >.menu-icon { - font-size: 16px; + font-size: var(--app-text-xl); color: var(--td-text-color-secondary); flex-shrink: 0; } @@ -908,7 +908,7 @@ onUnmounted(() => { } .dropdown-tenant-panel-name { - font-size: 14px; + font-size: var(--app-text-base); font-weight: 500; color: var(--td-text-color-primary); line-height: 1.35; @@ -919,16 +919,16 @@ onUnmounted(() => { .dropdown-tenant-panel-trail { flex-shrink: 0; - font-size: 16px; + font-size: var(--app-text-xl); color: var(--td-text-color-placeholder); - transition: color 0.15s ease; + transition: color var(--app-motion-fast) ease; } .dropdown-tenant-panel-role { display: flex; align-items: center; gap: 4px; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.35; color: var(--td-text-color-secondary); min-width: 0; @@ -949,8 +949,8 @@ onUnmounted(() => { gap: 10px; padding: 9px 12px; cursor: pointer; - transition: all 0.2s; - font-size: 14px; + transition: all var(--app-motion-base); + font-size: var(--app-text-base); color: var(--td-text-color-primary); &:hover { @@ -978,10 +978,10 @@ onUnmounted(() => { } .menu-chevron { - font-size: 16px; + font-size: var(--app-text-xl); color: var(--td-text-color-placeholder); flex-shrink: 0; - transition: transform 0.15s; + transition: transform var(--app-motion-fast); } &.is-open { @@ -994,7 +994,7 @@ onUnmounted(() => { } .menu-icon { - font-size: 16px; + font-size: var(--app-text-xl); color: var(--td-text-color-secondary); &.svg-icon { @@ -1009,7 +1009,7 @@ onUnmounted(() => { display: inline-flex; align-items: center; justify-content: center; - font-size: 15px; + font-size: var(--app-text-lg); line-height: 1; flex-shrink: 0; color: inherit; @@ -1036,11 +1036,11 @@ onUnmounted(() => { .menu-new-badge { flex-shrink: 0; - font-size: 10px; + font-size: var(--app-text-2xs); font-weight: 600; line-height: 1.2; padding: 2px 5px; - border-radius: 4px; + border-radius: var(--app-radius-xs); background: var(--td-brand-color-light); color: var(--td-brand-color); letter-spacing: 0.02em; @@ -1056,7 +1056,7 @@ onUnmounted(() => { height: 16px; color: var(--td-text-color-disabled); flex-shrink: 0; - transition: color 0.2s ease; + transition: color var(--app-motion-base) ease; pointer-events: none; } @@ -1080,7 +1080,7 @@ onUnmounted(() => { // 下拉动画 .dropdown-enter-active, .dropdown-leave-active { - transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); + transition: all var(--app-motion-base) cubic-bezier(0.4, 0, 0.2, 1); } .dropdown-enter-from, @@ -1110,7 +1110,7 @@ onUnmounted(() => { flex-direction: column; background: var(--td-bg-color-container); border: 0.5px solid var(--td-component-stroke); - border-radius: 10px; + border-radius: var(--app-radius-lg); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12); // Pointer bridge so the user can slide off the menu item onto the panel // without hitting the gap and triggering mouseleave-hide. @@ -1119,7 +1119,7 @@ onUnmounted(() => { .tenant-submenu-header { padding: 8px 12px 6px; - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 600; color: var(--td-text-color-secondary); border-bottom: 0.5px solid var(--td-component-stroke); @@ -1135,9 +1135,9 @@ onUnmounted(() => { align-items: center; gap: 8px; padding: 7px 8px; - border-radius: 6px; + border-radius: var(--app-radius-sm); cursor: pointer; - transition: background 0.15s; + transition: background var(--app-motion-fast); &:hover { background: var(--td-bg-color-secondarycontainer); @@ -1157,12 +1157,12 @@ onUnmounted(() => { .tenant-submenu-item-avatar { width: 28px; height: 28px; - border-radius: 6px; + border-radius: var(--app-radius-sm); background: var(--td-bg-color-secondarycontainer); display: flex; align-items: center; justify-content: center; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; color: var(--td-text-color-secondary); flex-shrink: 0; @@ -1182,7 +1182,7 @@ onUnmounted(() => { } .tenant-submenu-item-name { - font-size: 13px; + font-size: var(--app-text-md); color: var(--td-text-color-primary); white-space: nowrap; overflow: hidden; @@ -1203,7 +1203,7 @@ onUnmounted(() => { display: inline-flex; align-items: center; gap: 4px; - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-placeholder); .tenant-submenu-item-role-icon { @@ -1215,11 +1215,11 @@ onUnmounted(() => { .tenant-submenu-item-badge { flex-shrink: 0; - font-size: 10px; + font-size: var(--app-text-2xs); font-weight: 600; line-height: 1.2; padding: 2px 6px; - border-radius: 4px; + border-radius: var(--app-radius-xs); background: var(--td-bg-color-component); color: var(--td-text-color-secondary); } @@ -1251,7 +1251,7 @@ onUnmounted(() => { .tenant-submenu-empty { padding: 12px 10px; text-align: center; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); } @@ -1262,19 +1262,19 @@ onUnmounted(() => { padding: 8px 10px; margin: 3px 4px 5px; border-top: .5px solid var(--td-component-stroke); - border-radius: 6px; + border-radius: var(--app-radius-sm); cursor: pointer; color: var(--td-brand-color); - font-size: 14px; + font-size: var(--app-text-base); font-weight: 500; - transition: background 0.15s; + transition: background var(--app-motion-fast); &:hover { - background: rgba(7, 192, 95, 0.08); + background: color-mix(in srgb, var(--td-brand-color) 8%, transparent); } .tenant-submenu-create-icon { - font-size: 16px; + font-size: var(--app-text-xl); flex-shrink: 0; } @@ -1283,7 +1283,7 @@ onUnmounted(() => { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - font-size: 12px; + font-size: var(--app-text-sm); } } } diff --git a/frontend/src/components/VectorStoreBadge.vue b/frontend/src/components/VectorStoreBadge.vue index 94fca065..be71475f 100644 --- a/frontend/src/components/VectorStoreBadge.vue +++ b/frontend/src/components/VectorStoreBadge.vue @@ -72,40 +72,40 @@ const displayName = computed(() => { align-items: center; gap: 4px; padding: 2px 8px; - border-radius: 4px; - font-size: 12px; + border-radius: var(--app-radius-xs); + font-size: var(--app-text-sm); line-height: 1.4; - background: var(--td-bg-color-component, #f5f7fa); - color: var(--td-text-color-primary, #1d2129); + background: var(--td-bg-color-component); + color: var(--td-text-color-primary); } .vs-badge-env { - background: var(--td-brand-color-1, #ecf2fe); - color: var(--td-brand-color-7, #0052d9); + background: var(--td-brand-color-1); + color: var(--td-brand-color-7); } .vs-badge-user { - background: var(--td-success-color-1, #e8f8f2); - color: var(--td-success-color-7, #00754a); + background: var(--td-success-color-1); + color: var(--td-success-color-7); } .vs-badge-shared { - background: var(--td-warning-color-1, #fff1e9); - color: var(--td-warning-color-7, #b85b00); + background: var(--td-warning-color-1); + color: var(--td-warning-color-7); } .vs-badge-warn { - background: var(--td-error-color-1, #fde9e6); - color: var(--td-error-color-7, #b32700); + background: var(--td-error-color-1); + color: var(--td-error-color-7); } .vs-badge-icon { - font-size: 14px; + font-size: var(--app-text-base); } .vs-badge-engine { opacity: 0.7; - font-size: 11px; + font-size: var(--app-text-xs); } .vs-badge-warn-tag { diff --git a/frontend/src/components/chat/ChatQuestionMinimap.test.ts b/frontend/src/components/chat/ChatQuestionMinimap.test.ts index 0d0aa2b5..adf843e0 100644 --- a/frontend/src/components/chat/ChatQuestionMinimap.test.ts +++ b/frontend/src/components/chat/ChatQuestionMinimap.test.ts @@ -84,7 +84,7 @@ test('highlights visible messages without losing them when previewing another ti }) test('keeps the preview card at 13px instead of inheriting the chat 20px type', () => { - assert.match(component, /font-size: 13px/) + assert.match(component, /font-size: (?:13px|var\(--app-text-md\))/) assert.doesNotMatch(component, /font: inherit/) assert.match(component, /--td-text-color-primary/) }) diff --git a/frontend/src/components/chat/ChatQuestionMinimap.vue b/frontend/src/components/chat/ChatQuestionMinimap.vue index e53781e3..97adbac4 100644 --- a/frontend/src/components/chat/ChatQuestionMinimap.vue +++ b/frontend/src/components/chat/ChatQuestionMinimap.vue @@ -304,7 +304,7 @@ onBeforeUnmount(() => { align-items: stretch; transform: translateY(-50%); pointer-events: none; - font-size: 13px; + font-size: var(--app-text-md); line-height: 1.45; } @@ -340,7 +340,7 @@ onBeforeUnmount(() => { opacity: 0.4; transform: translateY(-50%); transform-origin: left center; - transition: transform 120ms ease-out, background 120ms ease-out, opacity 120ms ease-out; + transition: transform var(--app-motion-instant) ease-out, background var(--app-motion-instant) ease-out, opacity var(--app-motion-instant) ease-out; } .question-minimap__tick--active { @@ -361,7 +361,7 @@ onBeforeUnmount(() => { overflow: hidden; scrollbar-width: none; border: 1px solid var(--td-component-stroke); - border-radius: 6px; + border-radius: var(--app-radius-sm); background: var(--td-bg-color-container); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06); transform: translateY(-50%); @@ -375,7 +375,7 @@ onBeforeUnmount(() => { .question-minimap__question, .question-minimap__answer { margin: 0; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 400; line-height: 1.45; } diff --git a/frontend/src/components/chat/FollowUpSuggestions.vue b/frontend/src/components/chat/FollowUpSuggestions.vue index 54caf02f..b3ec27aa 100644 --- a/frontend/src/components/chat/FollowUpSuggestions.vue +++ b/frontend/src/components/chat/FollowUpSuggestions.vue @@ -72,7 +72,7 @@ const dismiss = () => { margin-right: auto; padding: 12px; border: 1px solid var(--td-component-stroke); - border-radius: 12px; + border-radius: var(--app-radius-xl); background: var(--td-bg-color-secondarycontainer); } .follow-ups__header { @@ -81,7 +81,7 @@ const dismiss = () => { justify-content: space-between; margin-bottom: 8px; color: var(--td-text-color-secondary); - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; } .follow-ups__title { @@ -93,7 +93,7 @@ const dismiss = () => { width: 14px; height: 14px; color: var(--td-text-color-placeholder); - font-size: 14px; + font-size: var(--app-text-base); } .follow-ups__actions { display: flex; gap: 4px; } .follow-ups__actions button { @@ -102,14 +102,14 @@ const dismiss = () => { gap: 4px; padding: 4px 8px; border: 0; - border-radius: 6px; + border-radius: var(--app-radius-sm); background: transparent; color: var(--td-text-color-secondary); cursor: pointer; - transition: background-color .2s, color .2s; + transition: background-color var(--app-motion-base), color var(--app-motion-base); } .follow-ups__actions button:hover:not(:disabled) { - background: var(--td-bg-color-container-hover, rgba(0, 0, 0, .06)); + background: var(--td-bg-color-container-hover); color: var(--td-brand-color); } .follow-ups__actions button:disabled { @@ -125,20 +125,19 @@ const dismiss = () => { width: 100%; padding: 9px 11px; border: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-container); color: var(--td-text-color-primary); text-align: left; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); - transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; + transition: border-color var(--app-motion-base) ease, box-shadow var(--app-motion-base) ease, background var(--app-motion-base) ease; } .follow-ups__item:hover { .suggestion-chip-hover(); } .follow-ups__item:hover .t-icon { color: var(--td-text-color-secondary); } -.is-spinning { animation: spin 1s linear infinite; } -@keyframes spin { to { transform: rotate(360deg); } } +.is-spinning { animation: wk-spin 1s linear infinite; } .follow-up-card-enter-active { transform-origin: left top; diff --git a/frontend/src/components/chat/MessageTimestamp.vue b/frontend/src/components/chat/MessageTimestamp.vue index 3972f188..0443a247 100644 --- a/frontend/src/components/chat/MessageTimestamp.vue +++ b/frontend/src/components/chat/MessageTimestamp.vue @@ -38,7 +38,7 @@ const label = computed(() => { width: 100%; padding: 4px 0 8px; color: var(--td-text-color-placeholder); - font-size: 12px; + font-size: var(--app-text-sm); font-variant-numeric: tabular-nums; line-height: 20px; text-align: center; diff --git a/frontend/src/components/chat/SandboxSidePanel.vue b/frontend/src/components/chat/SandboxSidePanel.vue index b62c4598..a214870e 100644 --- a/frontend/src/components/chat/SandboxSidePanel.vue +++ b/frontend/src/components/chat/SandboxSidePanel.vue @@ -299,7 +299,7 @@ function startResize(event: MouseEvent) { bottom: 0; width: 1px; background: transparent; - transition: background-color 0.15s ease; + transition: background-color var(--app-motion-fast) ease; } &:hover::after, @@ -314,13 +314,13 @@ function startResize(event: MouseEvent) { color: var(--td-text-color-secondary); width: 32px; height: 32px; - border-radius: 8px; + border-radius: var(--app-radius-md); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; - transition: background 0.15s ease, color 0.15s ease; + transition: background var(--app-motion-fast) ease, color var(--app-motion-fast) ease; &:hover { background: color-mix(in srgb, var(--td-text-color-primary) 8%, var(--td-bg-color-secondarycontainer)); @@ -351,13 +351,13 @@ function startResize(event: MouseEvent) { gap: 6px; padding: 6px 10px; border: 0; - border-radius: 6px; + border-radius: var(--app-radius-sm); background: transparent; color: var(--td-text-color-secondary); - font-size: 13px; + font-size: var(--app-text-md); cursor: pointer; white-space: nowrap; - transition: background-color 0.15s ease, color 0.15s ease; + transition: background-color var(--app-motion-fast) ease, color var(--app-motion-fast) ease; &:hover { color: var(--td-text-color-primary); @@ -380,10 +380,10 @@ function startResize(event: MouseEvent) { min-width: 16px; height: 16px; padding: 0 5px; - border-radius: 8px; + border-radius: var(--app-radius-md); background: color-mix(in srgb, var(--td-text-color-primary) 8%, transparent); color: var(--td-text-color-secondary); - font-size: 11px; + font-size: var(--app-text-xs); line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; @@ -417,7 +417,7 @@ function startResize(event: MouseEvent) { justify-content: center; gap: 10px; color: var(--td-text-color-placeholder); - font-size: 13px; + font-size: var(--app-text-md); p { margin: 0; diff --git a/frontend/src/components/credentials/CredentialResource.vue b/frontend/src/components/credentials/CredentialResource.vue index aaf082f7..84aa8ead 100644 --- a/frontend/src/components/credentials/CredentialResource.vue +++ b/frontend/src/components/credentials/CredentialResource.vue @@ -340,7 +340,7 @@ onBeforeUnmount(() => { } .credential-row-label { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; color: var(--td-text-color-primary); margin-bottom: 4px; @@ -364,9 +364,9 @@ onBeforeUnmount(() => { padding: 0 4px 0 12px; background: var(--td-bg-color-container); border: 1px solid var(--td-component-border); - border-radius: 6px; - font-size: 13px; - transition: border-color 0.15s ease, background-color 0.15s ease; + border-radius: var(--app-radius-sm); + font-size: var(--app-text-md); + transition: border-color var(--app-motion-fast) ease, background-color var(--app-motion-fast) ease; &:hover { border-color: var(--td-brand-color-hover); @@ -458,7 +458,7 @@ onBeforeUnmount(() => { .status-icon { flex-shrink: 0; - font-size: 16px; + font-size: var(--app-text-xl); &.success { color: var(--td-success-color); @@ -488,8 +488,8 @@ onBeforeUnmount(() => { :deep(.t-button--variant-text) { height: 24px; padding: 0 8px; - font-size: 12px; - border-radius: 4px; + font-size: var(--app-text-sm); + border-radius: var(--app-radius-xs); } } @@ -519,7 +519,7 @@ onBeforeUnmount(() => { :deep(.t-button) { height: 28px; padding: 0 12px; - font-size: 12px; + font-size: var(--app-text-sm); } } diff --git a/frontend/src/components/css/channel-panel-list.less b/frontend/src/components/css/channel-panel-list.less index 4d84bc12..31db8130 100644 --- a/frontend/src/components/css/channel-panel-list.less +++ b/frontend/src/components/css/channel-panel-list.less @@ -5,7 +5,7 @@ margin-bottom: 12px; .channels-title { - font-size: 14px; + font-size: var(--app-text-base); font-weight: 500; color: var(--td-text-color-primary); } @@ -13,8 +13,8 @@ .channels-count { padding: 2px 8px; background: var(--td-bg-color-secondarycontainer); - border-radius: 10px; - font-size: 12px; + border-radius: var(--app-radius-lg); + font-size: var(--app-text-sm); color: var(--td-text-color-disabled); } } @@ -45,7 +45,7 @@ min-height: calc(20px + 14px * 1.4 + 4px + 12px * 1.4); padding: 10px 12px; border: 1px solid var(--td-component-stroke); - border-radius: 10px; + border-radius: var(--app-radius-lg); background: var(--td-bg-color-container); text-align: left; font: inherit; @@ -59,12 +59,12 @@ .channel-card__actions:not(.channel-card__actions--spacer) { opacity: 0; pointer-events: none; - transition: opacity 0.15s ease; + transition: opacity var(--app-motion-fast) ease; } &:hover, &:focus-visible { - border-color: var(--td-brand-color-3, var(--td-brand-color)); + border-color: var(--td-brand-color-3); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06); outline: none; } @@ -108,11 +108,11 @@ .channel-card__badge { background: color-mix(in srgb, var(--td-brand-color) 10%, transparent); color: var(--td-brand-color); - font-size: 20px; + font-size: var(--app-text-3xl); } .channel-card__title { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; color: inherit; } @@ -122,7 +122,7 @@ flex-shrink: 0; width: 36px; height: 36px; - border-radius: 8px; + border-radius: var(--app-radius-md); display: flex; align-items: center; justify-content: center; @@ -153,7 +153,7 @@ flex: 1; min-width: 0; margin: 0; - font-size: 14px; + font-size: var(--app-text-base); font-weight: 600; line-height: 1.4; color: var(--td-text-color-primary); @@ -165,7 +165,7 @@ &__agent-name { display: block; margin-top: 4px; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.4; color: var(--td-text-color-placeholder); overflow: hidden; diff --git a/frontend/src/components/css/chat-citations.less b/frontend/src/components/css/chat-citations.less index a6c0ec98..e1bc2f34 100644 --- a/frontend/src/components/css/chat-citations.less +++ b/frontend/src/components/css/chat-citations.less @@ -5,7 +5,7 @@ gap: 2px; vertical-align: baseline; box-sizing: border-box; - border-radius: 999px; + border-radius: var(--app-radius-pill); padding: 0 5px; font-size: 0.72em; line-height: 1.45; @@ -55,7 +55,7 @@ cursor: pointer; white-space: nowrap; position: relative; - transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease; + transition: background var(--app-motion-fast) ease, box-shadow var(--app-motion-fast) ease, color var(--app-motion-fast) ease; } :deep(.citation-kb:hover) { @@ -73,7 +73,7 @@ white-space: nowrap; position: relative; text-decoration: none; - transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease; + transition: background var(--app-motion-fast) ease, box-shadow var(--app-motion-fast) ease, color var(--app-motion-fast) ease; } :deep(.citation-web:hover) { @@ -97,7 +97,7 @@ border-bottom: 1px dashed var(--td-brand-color); text-decoration: none; font-weight: 500; - transition: border-bottom-style 0.15s ease; + transition: border-bottom-style var(--app-motion-fast) ease; &:hover { border-bottom-style: solid; @@ -117,10 +117,10 @@ z-index: 10000; max-width: 320px; padding: 10px 12px; - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-container); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-primary); diff --git a/frontend/src/components/css/chat-citations.test.mjs b/frontend/src/components/css/chat-citations.test.mjs index 0da9af39..e51a0371 100644 --- a/frontend/src/components/css/chat-citations.test.mjs +++ b/frontend/src/components/css/chat-citations.test.mjs @@ -8,7 +8,7 @@ const here = dirname(fileURLToPath(import.meta.url)) const css = readFileSync(join(here, 'chat-citations.less'), 'utf8') test('citation pills use compact baseline-aligned source styling', () => { - assert.match(css, /border-radius:\s*999px/) + assert.match(css, /border-radius:\s*(?:999px|var\(--app-radius-pill\))/) assert.match(css, /font-size:\s*0\.72em/) assert.match(css, /box-shadow:\s*inset 0 0 0 1px/) }) diff --git a/frontend/src/components/css/chat-markdown.less b/frontend/src/components/css/chat-markdown.less index c6165a45..2a26df94 100644 --- a/frontend/src/components/css/chat-markdown.less +++ b/frontend/src/components/css/chat-markdown.less @@ -11,7 +11,7 @@ // Tuned against ChatGPT markdown test doc: 16px body, 24px line-height on paragraphs, // stepped headings, dotted links, light tables, pill inline code, kbd chips. .chat-markdown-typography() { - font-size: 16px; + font-size: var(--app-text-xl); color: var(--td-text-color-primary); line-height: 1.625; letter-spacing: normal; @@ -116,7 +116,7 @@ :deep(code):not(pre code) { background: color-mix(in srgb, var(--td-text-color-primary) 8%, transparent); padding: 0.15em 0.3em; - border-radius: 4px; + border-radius: var(--app-radius-xs); font-family: var(--app-font-family-mono); font-size: 0.875em; font-weight: 500; @@ -126,11 +126,11 @@ background: var(--td-bg-color-secondarycontainer); padding: 14px 16px; border: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); overflow-x: auto; margin: 0.75em 0; line-height: 1.55; - font-size: 13px; + font-size: var(--app-text-md); code { background: none; @@ -143,7 +143,7 @@ :deep(.chat-code-block) { margin: 0.75em 0; border: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); overflow: hidden; background: var(--td-bg-color-container); box-shadow: 0 1px 2px color-mix(in srgb, var(--td-text-color-primary) 6%, transparent); @@ -161,7 +161,7 @@ } :deep(.chat-code-block__lang) { - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 600; line-height: 1.2; color: var(--td-text-color-secondary); @@ -176,14 +176,14 @@ margin: 0; padding: 4px 8px; border: 1px solid transparent; - border-radius: 6px; + border-radius: var(--app-radius-sm); background: transparent; color: var(--td-text-color-secondary); - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; line-height: 1; cursor: pointer; - transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; + transition: background var(--app-motion-fast) ease, color var(--app-motion-fast) ease, border-color var(--app-motion-fast) ease; &:hover { background: color-mix(in srgb, var(--td-text-color-primary) 6%, var(--td-bg-color-secondarycontainer)); @@ -210,7 +210,7 @@ border-radius: 0; background: color-mix(in srgb, var(--td-bg-color-secondarycontainer) 88%, var(--td-bg-color-container)); overflow-x: auto; - font-size: 13px; + font-size: var(--app-text-md); line-height: 1.55; code { @@ -227,7 +227,7 @@ :deep(.chat-mermaid-block) { margin: 0.75em 0; border: 1px solid var(--td-component-stroke); - border-radius: 10px; + border-radius: var(--app-radius-lg); overflow: hidden; background: var(--td-bg-color-container); box-shadow: 0 1px 3px color-mix(in srgb, var(--td-text-color-primary) 5%, transparent); @@ -248,7 +248,7 @@ display: inline-flex; align-items: center; gap: 6px; - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; @@ -264,11 +264,11 @@ margin: 0; padding: 0; border: 1px solid transparent; - border-radius: 6px; + border-radius: var(--app-radius-sm); background: transparent; color: var(--td-text-color-secondary); cursor: pointer; - transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; + transition: background var(--app-motion-fast) ease, color var(--app-motion-fast) ease, border-color var(--app-motion-fast) ease; &:hover:not(:disabled) { background: color-mix(in srgb, var(--td-text-color-primary) 6%, var(--td-bg-color-secondarycontainer)); @@ -330,7 +330,7 @@ margin: 0.75em 0; padding: 20px 16px; border: 1px solid var(--td-component-stroke); - border-radius: 10px; + border-radius: var(--app-radius-lg); background: var(--td-bg-color-secondarycontainer); overflow-x: auto; text-align: center; @@ -516,7 +516,7 @@ margin: 0.875em 0 1em; overflow-x: auto; border: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-container); -webkit-overflow-scrolling: touch; } @@ -526,7 +526,7 @@ border-collapse: separate; border-spacing: 0; display: table; - font-size: 14px; + font-size: var(--app-text-base); line-height: 1.55; width: max-content; min-width: 0; @@ -586,13 +586,13 @@ max-height: 300px; width: auto; height: auto; - border-radius: 8px; + border-radius: var(--app-radius-md); display: block; margin: 1.25em 0; border: 0.5px solid var(--td-component-stroke); object-fit: contain; cursor: pointer; - transition: transform 0.2s ease; + transition: transform var(--app-motion-base) ease; } // Protected images not yet hydrated still carry the 1x1 placeholder gif. @@ -614,9 +614,9 @@ cursor: default; background: linear-gradient( 100deg, - var(--td-bg-color-secondarycontainer, #f3f3f3) 30%, - var(--td-bg-color-container-hover, #eaeaea) 50%, - var(--td-bg-color-secondarycontainer, #f3f3f3) 70% + var(--td-bg-color-secondarycontainer) 30%, + var(--td-bg-color-container-hover) 50%, + var(--td-bg-color-secondarycontainer) 70% ); background-size: 200% 100%; animation: chat-img-skeleton 1.2s ease-in-out infinite; @@ -651,12 +651,12 @@ margin: 0.75em 0; box-sizing: border-box; padding: 12px 8px; - border-radius: 8px; + border-radius: var(--app-radius-md); background: transparent; cursor: pointer; vertical-align: middle; text-align: left; - transition: background 0.15s ease; + transition: background var(--app-motion-fast) ease; &:hover { background: var(--td-bg-color-container-hover); @@ -698,7 +698,7 @@ } :deep(.artifact-ref-card__name) { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; letter-spacing: 0.01em; line-height: 1.35; @@ -710,7 +710,7 @@ :deep(.artifact-ref-card__hint) { margin-top: 2px; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.3; color: var(--td-text-color-placeholder); } diff --git a/frontend/src/components/css/chat-message-shared.less b/frontend/src/components/css/chat-message-shared.less index f6efcd8c..2d83f18e 100644 --- a/frontend/src/components/css/chat-message-shared.less +++ b/frontend/src/components/css/chat-message-shared.less @@ -6,23 +6,24 @@ justify-content: flex-start; gap: 4px; margin-top: 6px; - margin-left: -7px; - min-height: 30px; + margin-left: -6px; + min-height: 28px; color: var(--td-text-color-primary); + // 与用户消息的操作键、输入框控制键同规格:28px、6px 圆角 :deep(.t-button) { display: inline-flex; align-items: center; justify-content: center; min-width: auto; - width: 30px; - height: 30px; + width: 28px; + height: 28px; padding: 0; border: none; - border-radius: 8px; + border-radius: var(--app-radius-sm); background: transparent; color: var(--td-text-color-secondary); - transition: background-color 0.15s ease, color 0.15s ease; + transition: background-color var(--app-motion-fast) ease, color var(--app-motion-fast) ease; .t-button__content { display: inline-flex !important; @@ -44,7 +45,7 @@ opacity: 1; align-items: center; justify-content: center; - font-size: 16px; + font-size: var(--app-text-xl); width: 16px; height: 16px; flex-shrink: 0; @@ -105,17 +106,7 @@ } .answer-toolbar__artifact-spinner { - animation: answer-toolbar-artifact-spin 0.8s linear infinite; -} - -@keyframes answer-toolbar-artifact-spin { - from { - transform: rotate(0deg); - } - - to { - transform: rotate(360deg); - } + animation: wk-spin 0.8s linear infinite; } @keyframes artifact-toolbar-arrive { @@ -147,7 +138,7 @@ border-radius: 7px; background: var(--td-brand-color); color: var(--td-text-color-anti); - font-size: 10px; + font-size: var(--app-text-2xs); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; @@ -190,7 +181,7 @@ padding-left: 9px; border-left: 1px solid var(--td-component-stroke); color: var(--td-text-color-placeholder); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 18px; white-space: nowrap; @@ -198,7 +189,7 @@ flex: none; width: 14px; height: 14px; - font-size: 14px; + font-size: var(--app-text-base); } .answer-toolbar__follow-up-label { @@ -256,7 +247,7 @@ width: clamp(150px, 30vw, 260px); max-width: 100%; aspect-ratio: 4 / 3; - border-radius: 10px; + border-radius: var(--app-radius-lg); border: 1px solid rgba(175, 190, 210, 0.55); background: linear-gradient( 145deg, diff --git a/frontend/src/components/css/chat-resource-chips.less b/frontend/src/components/css/chat-resource-chips.less index 950c66ac..54ab4235 100644 --- a/frontend/src/components/css/chat-resource-chips.less +++ b/frontend/src/components/css/chat-resource-chips.less @@ -28,9 +28,9 @@ min-height: 26px; max-width: 200px; padding: 3px 8px; - border-radius: var(--td-radius-medium, 6px); + border-radius: var(--td-radius-medium); box-sizing: border-box; - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; line-height: 18px; cursor: default; @@ -68,7 +68,7 @@ align-items: center; justify-content: center; flex-shrink: 0; - font-size: 14px; + font-size: var(--app-text-base); } .tag_name { diff --git a/frontend/src/components/css/markdown.less b/frontend/src/components/css/markdown.less index 4bebe936..195886ac 100644 --- a/frontend/src/components/css/markdown.less +++ b/frontend/src/components/css/markdown.less @@ -13,7 +13,7 @@ margin: 16px 0; padding: 16px; background: var(--td-bg-color-secondarycontainer); - border-radius: 8px; + border-radius: var(--app-radius-md); overflow-x: auto; text-align: center; @@ -33,8 +33,8 @@ font-weight: bold; color: var(--td-text-color-primary); font-family: var(--app-font-family); - transition: all 0.2s ease-out; - font-size: 20px; + transition: all var(--app-motion-base) ease-out; + font-size: var(--app-text-3xl); } .hljs-title, @@ -91,22 +91,22 @@ ol, dl, table { - font-size: 14px; + font-size: var(--app-text-base); margin: 10px 0; font-family: var(--app-font-family); } h2 { - font-size: 18px; + font-size: var(--app-text-2xl); } h3 { - font-size: 16px; + font-size: var(--app-text-xl); font-weight: 500; } summary { - font-size: 14px; + font-size: var(--app-text-base); cursor: pointer; } @@ -208,7 +208,7 @@ table { padding: 0; word-break: initial; - /* border-radius: 4px; */ + /* border-radius: var(--app-radius-xs); */ border-collapse: collapse; border-spacing: 0; width: 100%; @@ -257,7 +257,7 @@ } figure { - border-radius: 8px; + border-radius: var(--app-radius-md); margin-left: 0; margin-right: 0; background: var(--td-bg-color-container); @@ -271,7 +271,7 @@ @media print { html { - font-size: 13px; + font-size: var(--app-text-md); } table, @@ -367,7 +367,7 @@ } .code-tooltip { - border-radius: 4px; + border-radius: var(--app-radius-xs); border: 1px solid var(--td-component-stroke); background-color: var(--td-bg-color-secondarycontainer); } @@ -387,11 +387,11 @@ h6.md-end-block.md-heading:after { color: var(--td-text-color-disabled) !important; border: 1px solid; - border-radius: 4px; + border-radius: var(--app-radius-xs); position: absolute; left: -2.5rem; float: left; - font-size: 14px; + font-size: var(--app-text-base); padding-left: 4px; padding-right: 5px; vertical-align: bottom; diff --git a/frontend/src/components/css/provider-card.less b/frontend/src/components/css/provider-card.less new file mode 100644 index 00000000..07067917 --- /dev/null +++ b/frontend/src/components/css/provider-card.less @@ -0,0 +1,161 @@ +// 设置区「提供方卡片」(模型 / 向量库 / 网络搜索 / 存储后端 / 解析引擎 / 沙箱 / MCP / 技能)共用的视觉规范。 +// 页面保留自己的 BEM 前缀(.model-card__badge 等),把重复声明换成这里的 mixin。 +// +// @import (reference) '@/components/css/provider-card.less'; +// .model-card { .provider-card(); &--add { .provider-card-add(); } } +// .model-card__badge { .provider-card-badge(); } +// .model-card--chat .model-card__badge { .provider-card-badge-color(#0052d9); } + +.provider-card() { + position: relative; + display: flex; + align-items: flex-start; + gap: 12px; + min-width: 0; + padding: 14px 16px; + border: 1px solid var(--td-component-stroke); + border-radius: var(--app-radius-lg); + background: var(--td-bg-color-container); + transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease; +} + +// 可点击(进入编辑)的卡片 hover / focus 反馈 +.provider-card-interactive() { + cursor: pointer; + + &:hover { + border-color: var(--td-brand-color-3); + box-shadow: 0 4px 14px color-mix(in srgb, var(--td-text-color-primary) 6%, transparent); + } + + &:focus-visible { + outline: 2px solid var(--td-brand-color); + outline-offset: 2px; + } +} + +// 虚线「新增」卡片 +.provider-card-add() { + flex-direction: column; + align-items: center; + justify-content: center; + gap: 8px; + min-height: 68px; + border-style: dashed; + background: transparent; + color: var(--td-text-color-placeholder); + cursor: pointer; + font: inherit; + text-align: center; + + &:hover, + &:focus-visible { + color: var(--td-brand-color); + border-color: var(--td-brand-color); + background: color-mix(in srgb, var(--td-brand-color) 6%, transparent); + } +} + +// 左侧徽标:默认 36px;MCP / 技能等紧凑卡片传 26px +.provider-card-badge(@size: 36px, @radius: 9px) { + flex-shrink: 0; + display: flex; + align-items: center; + justify-content: center; + width: @size; + height: @size; + border-radius: @radius; + margin-top: 1px; + font-size: var(--app-text-lg); + font-weight: 600; + letter-spacing: 0.02em; + background: var(--td-bg-color-secondarycontainer); + color: var(--td-text-color-secondary); + + &--logo { + background: var(--td-bg-color-container); + box-shadow: inset 0 0 0 1px var(--td-component-stroke); + } + + &--mono::before { + content: ''; + width: 22px; + height: 22px; + background-color: currentColor; + -webkit-mask-image: var(--logo-url); + -webkit-mask-position: center; + -webkit-mask-repeat: no-repeat; + -webkit-mask-size: contain; + mask-image: var(--logo-url); + mask-position: center; + mask-repeat: no-repeat; + mask-size: contain; + } +} + +// 厂商品牌色:前景向文字主色靠拢(深色模式下自动变亮),底色为同色 12% 透明叠加 +.provider-card-badge-color(@c) { + color: color-mix(in srgb, @c 75%, var(--td-text-color-primary)); + background: color-mix(in srgb, @c 12%, transparent); +} + +.provider-card-badge-img() { + width: 24px; + height: 24px; + object-fit: contain; + display: block; +} + +.provider-card-body() { + flex: 1; + min-width: 0; + display: flex; + flex-direction: column; + gap: 4px; +} + +.provider-card-header() { + display: flex; + align-items: center; + gap: 6px; + min-width: 0; +} + +.provider-card-title() { + flex: 1; + min-width: 0; + margin: 0; + font-size: var(--app-text-base); + font-weight: 600; + line-height: 1.4; + color: var(--td-text-color-primary); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.provider-card-subtitle() { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 4px; + min-width: 0; + font-size: var(--app-text-sm); + line-height: 1.4; + color: var(--td-text-color-secondary); +} + +// 右上角「更多」:hover / 聚焦时显现 +.provider-card-more() { + flex-shrink: 0; + padding: 2px; + color: var(--td-text-color-placeholder); + opacity: 0; + transition: opacity var(--app-motion-fast) ease, color var(--app-motion-fast) ease, background-color var(--app-motion-fast) ease; + + &:hover, + &:focus-visible { + background: var(--td-bg-color-secondarycontainer); + color: var(--td-text-color-primary); + } +} diff --git a/frontend/src/components/css/resource-card.less b/frontend/src/components/css/resource-card.less new file mode 100644 index 00000000..ca6733b0 --- /dev/null +++ b/frontend/src/components/css/resource-card.less @@ -0,0 +1,231 @@ +// 列表页资源卡片(知识库 / 智能体 / 共享空间)共用的视觉规范。 +// 以 mixin 形式提供,消费方保留自己的根 class(.kb-card / .agent-card / .org-card) +// 与特有变体(类型渐变、收藏星标、装饰图案),基础尺寸、hover、更多按钮、徽标由这里统一。 +// +// 用法(在消费方 - + diff --git a/frontend/src/views/chat/components/BrowserTaskPreview.vue b/frontend/src/views/chat/components/BrowserTaskPreview.vue index 0af04d63..516751f9 100644 --- a/frontend/src/views/chat/components/BrowserTaskPreview.vue +++ b/frontend/src/views/chat/components/BrowserTaskPreview.vue @@ -106,16 +106,16 @@ onMounted(() => { document.addEventListener('visibilitychange', onVisible); void onBeforeUnmount(() => { alive = false; document.removeEventListener('visibilitychange', onVisible); revision++; cancelTimer?.(); controller.abort(); preview.value = '' }) diff --git a/frontend/src/views/chat/components/ChatArtifactsDrawer.vue b/frontend/src/views/chat/components/ChatArtifactsDrawer.vue index 51bee671..16184bf2 100644 --- a/frontend/src/views/chat/components/ChatArtifactsDrawer.vue +++ b/frontend/src/views/chat/components/ChatArtifactsDrawer.vue @@ -468,15 +468,15 @@ onUnmounted(() => { display: flex; align-items: center; justify-content: center; - background: rgba(7, 192, 95, 0.1); + background: color-mix(in srgb, var(--td-brand-color) 10%, transparent); color: var(--td-brand-color); - font-size: 16px; + font-size: var(--app-text-xl); } .artifact-drawer-header-title { min-width: 0; flex: 1; - font-size: 15px; + font-size: var(--app-text-lg); font-weight: 600; line-height: 1.4; color: var(--td-text-color-primary); @@ -501,7 +501,7 @@ onUnmounted(() => { gap: 8px; padding: 48px 16px; color: var(--td-text-color-placeholder); - font-size: 13px; + font-size: var(--app-text-md); } .artifact-list { @@ -516,7 +516,7 @@ onUnmounted(() => { gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); &:last-child { border-bottom: none; @@ -539,14 +539,14 @@ onUnmounted(() => { flex-shrink: 0; width: 28px; height: 28px; - border-radius: 6px; + border-radius: var(--app-radius-sm); display: inline-flex; align-items: center; justify-content: center; - font-size: 16px; + font-size: var(--app-text-xl); background: var(--td-bg-color-secondarycontainer); color: var(--td-text-color-secondary); - transition: color 0.15s ease; + transition: color var(--app-motion-fast) ease; } .artifact-body { @@ -555,7 +555,7 @@ onUnmounted(() => { } .artifact-name { - font-size: 14px; + font-size: var(--app-text-base); font-weight: 600; letter-spacing: 0.01em; line-height: 1.35; @@ -567,7 +567,7 @@ onUnmounted(() => { .artifact-meta { margin-top: 2px; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.3; color: var(--td-text-color-placeholder); display: flex; @@ -615,7 +615,7 @@ onUnmounted(() => { border-radius: 1px; background: var(--td-component-border); opacity: 0.55; - transition: opacity 0.15s ease, background 0.15s ease; + transition: opacity var(--app-motion-fast) ease, background var(--app-motion-fast) ease; } .artifact-preview-resize-handle:hover .artifact-preview-resize-line, diff --git a/frontend/src/views/chat/components/ChatArtifactsPanel.vue b/frontend/src/views/chat/components/ChatArtifactsPanel.vue index 48d9a481..370190d4 100644 --- a/frontend/src/views/chat/components/ChatArtifactsPanel.vue +++ b/frontend/src/views/chat/components/ChatArtifactsPanel.vue @@ -342,7 +342,7 @@ async function handleDownload(item: SessionArtifactItem) { .artifact-panel-header-title { min-width: 0; flex: 1; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; line-height: 1.4; color: var(--td-text-color-primary); @@ -368,7 +368,7 @@ async function handleDownload(item: SessionArtifactItem) { gap: 8px; padding: 32px 16px; color: var(--td-text-color-placeholder); - font-size: 13px; + font-size: var(--app-text-md); text-align: center; } @@ -377,19 +377,13 @@ async function handleDownload(item: SessionArtifactItem) { align-items: center; gap: 8px; padding: 8px 14px; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-secondary); border-bottom: 1px solid var(--td-component-stroke); } .artifact-panel-banner-spin { - animation: artifact-panel-spin 0.8s linear infinite; -} - -@keyframes artifact-panel-spin { - to { - transform: rotate(360deg); - } + animation: wk-spin 0.8s linear infinite; } .artifact-list { @@ -406,7 +400,7 @@ async function handleDownload(item: SessionArtifactItem) { align-items: center; gap: 12px; padding: 12px 8px; - border-radius: 8px; + border-radius: var(--app-radius-md); &.is-previewable { cursor: pointer; @@ -431,7 +425,7 @@ async function handleDownload(item: SessionArtifactItem) { align-self: flex-start; gap: 2px; padding: 3px; - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-secondarycontainer); button { @@ -444,7 +438,7 @@ async function handleDownload(item: SessionArtifactItem) { background: transparent; color: var(--td-text-color-secondary); font: inherit; - font-size: 12px; + font-size: var(--app-text-sm); cursor: pointer; &[aria-pressed='true'] { @@ -460,7 +454,7 @@ async function handleDownload(item: SessionArtifactItem) { span { color: var(--td-text-color-placeholder); - font-size: 11px; + font-size: var(--app-text-xs); font-variant-numeric: tabular-nums; } } @@ -483,7 +477,7 @@ async function handleDownload(item: SessionArtifactItem) { gap: 12px; padding: 0; border: 0; - border-radius: 4px; + border-radius: var(--app-radius-xs); background: transparent; color: inherit; font: inherit; @@ -498,7 +492,7 @@ async function handleDownload(item: SessionArtifactItem) { .artifact-name { display: block; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; letter-spacing: 0.01em; line-height: 1.35; @@ -510,7 +504,7 @@ async function handleDownload(item: SessionArtifactItem) { .artifact-meta { margin-top: 2px; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.3; color: var(--td-text-color-placeholder); display: flex; @@ -528,7 +522,7 @@ async function handleDownload(item: SessionArtifactItem) { height: 30px; border-radius: 7px; color: var(--td-text-color-secondary); - transition: background-color 0.15s ease, color 0.15s ease; + transition: background-color var(--app-motion-fast) ease, color var(--app-motion-fast) ease; &:not(.t-is-disabled):not(.t-is-loading):hover { background: color-mix(in srgb, var(--td-text-color-primary) 10%, var(--td-bg-color-container)); diff --git a/frontend/src/views/chat/components/ChatMemoryStep.vue b/frontend/src/views/chat/components/ChatMemoryStep.vue index 27cc3249..d2da6949 100644 --- a/frontend/src/views/chat/components/ChatMemoryStep.vue +++ b/frontend/src/views/chat/components/ChatMemoryStep.vue @@ -116,7 +116,7 @@ const memoryKindLabel = (kind: string) => { .memory-chevron { flex-shrink: 0; - font-size: 13px; + font-size: var(--app-text-md); color: var(--agent-step-icon-color, var(--td-text-color-placeholder)); } @@ -134,7 +134,7 @@ const memoryKindLabel = (kind: string) => { } .memory-chevron { - font-size: 14px; + font-size: var(--app-text-base); color: currentColor; } } @@ -163,7 +163,7 @@ const memoryKindLabel = (kind: string) => { border-radius: 3px; background: var(--td-bg-color-secondarycontainer); color: var(--td-text-color-placeholder); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 18px; } @@ -181,11 +181,11 @@ const memoryKindLabel = (kind: string) => { outline: none; background: transparent; color: var(--td-text-color-placeholder); - font-size: 13px; + font-size: var(--app-text-md); line-height: 1; cursor: pointer; opacity: 0; - transition: opacity 0.15s ease, color 0.15s ease; + transition: opacity var(--app-motion-fast) ease, color var(--app-motion-fast) ease; &:focus-visible { opacity: 1; diff --git a/frontend/src/views/chat/components/RagPipelineProgress.vue b/frontend/src/views/chat/components/RagPipelineProgress.vue index d0d93597..d703ad6a 100644 --- a/frontend/src/views/chat/components/RagPipelineProgress.vue +++ b/frontend/src/views/chat/components/RagPipelineProgress.vue @@ -627,10 +627,10 @@ onBeforeUnmount(() => { margin: 0; padding: 0; border: 0; - border-radius: 4px; + border-radius: var(--app-radius-xs); background: transparent; color: var(--td-text-color-secondary); - font-size: 14px; + font-size: var(--app-text-base); line-height: 22px; cursor: pointer; flex: 0 1 auto; @@ -668,7 +668,7 @@ onBeforeUnmount(() => { .tree-root-expand__icon { flex-shrink: 0; - font-size: 14px; + font-size: var(--app-text-base); color: currentColor; } diff --git a/frontend/src/views/chat/components/SandboxDesktop.vue b/frontend/src/views/chat/components/SandboxDesktop.vue index 1c079abe..c6ccc045 100644 --- a/frontend/src/views/chat/components/SandboxDesktop.vue +++ b/frontend/src/views/chat/components/SandboxDesktop.vue @@ -155,15 +155,12 @@ defineExpose({ start }) .sandbox-desktop__overlay-text { margin: 0; - font-size: 13px; + font-size: var(--app-text-md); line-height: 1.6; } .sandbox-desktop__spinner { - animation: sandbox-desktop-spin 1s linear infinite; + animation: wk-spin 1s linear infinite; } -@keyframes sandbox-desktop-spin { - to { transform: rotate(360deg); } -} diff --git a/frontend/src/views/chat/components/SandboxTerminal.vue b/frontend/src/views/chat/components/SandboxTerminal.vue index 113ec973..41517f5a 100644 --- a/frontend/src/views/chat/components/SandboxTerminal.vue +++ b/frontend/src/views/chat/components/SandboxTerminal.vue @@ -368,7 +368,7 @@ defineExpose({ display: flex; flex-direction: column; background: var(--td-bg-color-container); - border-radius: 8px; + border-radius: var(--app-radius-md); overflow: hidden; cursor: text; } @@ -418,22 +418,13 @@ defineExpose({ .sandbox-terminal__overlay-text { margin: 0; - font-size: 13px; + font-size: var(--app-text-md); line-height: 1.6; white-space: pre-line; } .sandbox-terminal__spinner { - animation: sandbox-terminal-spin 0.9s linear infinite; + animation: wk-spin 0.9s linear infinite; } -@keyframes sandbox-terminal-spin { - from { - transform: rotate(0deg); - } - - to { - transform: rotate(360deg); - } -} diff --git a/frontend/src/views/chat/components/ToolResultRenderer.vue b/frontend/src/views/chat/components/ToolResultRenderer.vue index 2c4afc9b..26efe10f 100644 --- a/frontend/src/views/chat/components/ToolResultRenderer.vue +++ b/frontend/src/views/chat/components/ToolResultRenderer.vue @@ -162,7 +162,7 @@ const toolArguments = computed(() => props.arguments || {}); padding: 0 4px; .fallback-label { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-secondary); font-weight: 500; line-height: 1.5; @@ -173,14 +173,14 @@ const toolArguments = computed(() => props.arguments || {}); position: relative; background: var(--td-bg-color-secondarycontainer); border: 1px solid var(--td-component-stroke); - border-radius: 6px; + border-radius: var(--app-radius-sm); overflow: hidden; margin: 0; padding: 0; .detail-output { font-family: var(--app-font-family-mono); - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-primary); padding: 16px; margin: 0; @@ -201,12 +201,12 @@ const toolArguments = computed(() => props.arguments || {}); &::-webkit-scrollbar-track { background: var(--td-bg-color-secondarycontainer); - border-radius: 4px; + border-radius: var(--app-radius-xs); } &::-webkit-scrollbar-thumb { background: var(--td-component-border); - border-radius: 4px; + border-radius: var(--app-radius-xs); &:hover { background: var(--td-text-color-placeholder); diff --git a/frontend/src/views/chat/components/agent-interaction-card.less b/frontend/src/views/chat/components/agent-interaction-card.less index 93a74416..e39cdc5c 100644 --- a/frontend/src/views/chat/components/agent-interaction-card.less +++ b/frontend/src/views/chat/components/agent-interaction-card.less @@ -31,7 +31,7 @@ .results-summary-text { color: var(--td-text-color-placeholder); - transition: color 0.15s ease; + transition: color var(--app-motion-fast) ease; } &:hover .results-summary-text { @@ -62,7 +62,7 @@ } .action-timer { - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.55; font-variant-numeric: tabular-nums; color: var(--td-text-color-placeholder); @@ -81,7 +81,7 @@ .inline-dot { color: var(--td-text-color-placeholder); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1; user-select: none; } @@ -96,7 +96,7 @@ line-height: 1.55; color: var(--td-text-color-placeholder); cursor: pointer; - transition: color 0.15s ease; + transition: color var(--app-motion-fast) ease; &:hover:not(:disabled) { color: var(--td-text-color-secondary); @@ -153,7 +153,7 @@ } .action-timer { - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.55; font-variant-numeric: tabular-nums; color: var(--td-text-color-placeholder); @@ -251,6 +251,6 @@ .args-toggle-icon { flex-shrink: 0; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); } diff --git a/frontend/src/views/chat/components/answerToolbarCompletion.test.mjs b/frontend/src/views/chat/components/answerToolbarCompletion.test.mjs index fc101ca2..fd61a65f 100644 --- a/frontend/src/views/chat/components/answerToolbarCompletion.test.mjs +++ b/frontend/src/views/chat/components/answerToolbarCompletion.test.mjs @@ -52,7 +52,8 @@ test('artifact toolbar uses a folder icon and replaces it while collecting', () assert.match(agentStream, /answer-toolbar__artifact[\s\S]{0,800}name="folder"/) assert.match(botMessage, /class="answer-toolbar__artifact-spinner"/) assert.match(agentStream, /class="answer-toolbar__artifact-spinner"/) - assert.match(sharedStyles, /answer-toolbar-artifact-spin/) + // 旋转动画统一为 theme.css 里的全局 wk-spin + assert.match(sharedStyles, /answer-toolbar__artifact-spinner[\s\S]{0,400}animation: wk-spin/) assert.doesNotMatch(botMessage, /answer-toolbar__artifact[\s\S]{0,800}:loading=/) assert.doesNotMatch(agentStream, /answer-toolbar__artifact[\s\S]{0,800}:loading=/) }) @@ -65,7 +66,7 @@ test('follow-up loading is shown compactly inside both answer toolbars', () => { assert.match(botMessage, /transition name="follow-up-toolbar-loading"/) assert.match(agentStream, /transition name="follow-up-toolbar-loading"/) assert.match(sharedStyles, /border-left: 1px solid/) - assert.match(sharedStyles, /font-size: 12px/) + assert.match(sharedStyles, /font-size: (?:12px|var\(--app-text-sm\))/) assert.match(sharedStyles, /followUpToolbarShimmer 1\.5s linear infinite/) assert.match(sharedStyles, /background-clip: text/) assert.match(sharedStyles, /follow-up-toolbar-loading-leave-to/) diff --git a/frontend/src/views/chat/components/botmsg.vue b/frontend/src/views/chat/components/botmsg.vue index ced655f1..42ddb0a2 100644 --- a/frontend/src/views/chat/components/botmsg.vue +++ b/frontend/src/views/chat/components/botmsg.vue @@ -538,13 +538,13 @@ onBeforeUnmount(() => { max-height: 300px; width: auto; height: auto; - border-radius: 8px; + border-radius: var(--app-radius-md); display: block; cursor: pointer; object-fit: contain; margin: 8px 0 8px 16px; border: 0.5px solid var(--td-component-stroke); - transition: transform 0.2s ease; + transition: transform var(--app-motion-base) ease; &:hover { transform: scale(1.02); @@ -553,9 +553,9 @@ onBeforeUnmount(() => { .bot_msg { // background: var(--td-bg-color-container); - border-radius: 4px; + border-radius: var(--app-radius-xs); color: var(--td-text-color-primary); - font-size: 16px; + font-size: var(--app-text-xl); // padding: 10px 12px; margin-right: auto; width: 100%; @@ -579,10 +579,10 @@ onBeforeUnmount(() => { align-items: center; justify-content: center; flex-direction: column; - font-size: 12px; + font-size: var(--app-text-sm); gap: 4px; margin-left: 16px; - border-radius: 8px; + border-radius: var(--app-radius-md); } :deep(.t-loading__gradient-conic) { diff --git a/frontend/src/views/chat/components/chatLinksNewTab.test.mjs b/frontend/src/views/chat/components/chatLinksNewTab.test.mjs index 06264f42..12de7694 100644 --- a/frontend/src/views/chat/components/chatLinksNewTab.test.mjs +++ b/frontend/src/views/chat/components/chatLinksNewTab.test.mjs @@ -84,6 +84,6 @@ test('citation highlighting waits for drawer entry and only scrolls its own body test('references drawer smoothly shifts the chat area while opening', () => { assert.match(referenceDrawer, /\.chat-references-panel \{[\s\S]*?position: fixed;/) assert.match(chatView, /'has-references-panel': referencesDrawerVisible/) - assert.match(chatView, /transition: padding-right 0\.3s cubic-bezier\(0\.22, 0\.61, 0\.36, 1\)/) + assert.match(chatView, /transition: padding-right (?:0\.3s|var\(--app-motion-slow\)) cubic-bezier\(0\.22, 0\.61, 0\.36, 1\)/) assert.match(chatView, /&\.has-references-panel:not\(\.is-embedded\)[\s\S]*?padding-right:\s*420px/) }) diff --git a/frontend/src/views/chat/components/deepThink.vue b/frontend/src/views/chat/components/deepThink.vue index 506f3340..05291ee2 100644 --- a/frontend/src/views/chat/components/deepThink.vue +++ b/frontend/src/views/chat/components/deepThink.vue @@ -83,9 +83,9 @@ const toggleFold = () => { .deep-think { display: flex; flex-direction: column; - font-size: 12px; + font-size: var(--app-text-sm); width: 100%; - border-radius: 8px; + border-radius: var(--app-radius-md); background-color: var(--td-bg-color-container); border: .5px solid var(--td-component-stroke); box-shadow: 0 2px 4px color-mix(in srgb, var(--td-brand-color) 8%, transparent); @@ -145,7 +145,7 @@ const toggleFold = () => { } .thinking-text { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-primary); white-space: nowrap; } @@ -162,19 +162,19 @@ const toggleFold = () => { } .done-text { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-primary); white-space: nowrap; } } .toggle-icon-wrapper { - font-size: 14px; + font-size: var(--app-text-base); padding: 0 2px 1px 2px; color: var(--td-brand-color); .toggle-icon { - transition: transform 0.2s; + transition: transform var(--app-motion-base); } } } @@ -184,7 +184,7 @@ const toggleFold = () => { .content-inner { padding: 8px 14px; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.6; color: var(--td-text-color-secondary); max-height: 200px; diff --git a/frontend/src/views/chat/components/docInfo.vue b/frontend/src/views/chat/components/docInfo.vue index 927afa7a..d71154b3 100644 --- a/frontend/src/views/chat/components/docInfo.vue +++ b/frontend/src/views/chat/components/docInfo.vue @@ -219,9 +219,9 @@ const getWebSearchDisplayText = (item) => { display: flex; flex-direction: column; - font-size: 12px; + font-size: var(--app-text-sm); width: 100%; - border-radius: 8px; + border-radius: var(--app-radius-md); background-color: var(--td-bg-color-container); border: .5px solid var(--td-component-stroke); box-shadow: 0 2px 4px var(--refer-brand-8); @@ -244,7 +244,7 @@ const getWebSearchDisplayText = (item) => { border: 0; box-shadow: none; margin-bottom: 0; - font-size: 13px; + font-size: var(--app-text-md); .refer_header { padding: 0; @@ -252,7 +252,7 @@ const getWebSearchDisplayText = (item) => { color: var(--td-text-color-secondary); .refer_title span { - font-size: 14px; + font-size: var(--app-text-base); white-space: normal; } } @@ -281,14 +281,14 @@ const getWebSearchDisplayText = (item) => { .doc-group-title { color: var(--td-text-color-secondary); font-weight: 400; - font-size: 13px; + font-size: var(--app-text-md); max-width: min(520px, 100%); } .doc-group-count, .doc-chunk-text, .doc-chunk-index { - font-size: 12px; + font-size: var(--app-text-sm); } .doc-group-icon { @@ -325,12 +325,12 @@ const getWebSearchDisplayText = (item) => { span { white-space: nowrap; - font-size: 12px; + font-size: var(--app-text-sm); } } .refer_show_icon { - font-size: 14px; + font-size: var(--app-text-base); padding: 0 2px 1px 2px; color: var(--td-brand-color); flex-shrink: 0; @@ -368,7 +368,7 @@ const getWebSearchDisplayText = (item) => { text-overflow: ellipsis; line-height: 20px; padding: 2px 0; - transition: all 0.2s ease; + transition: all var(--app-motion-base) ease; border-bottom: 1px dashed var(--td-brand-color); &:hover { @@ -391,9 +391,9 @@ const getWebSearchDisplayText = (item) => { align-items: center; justify-content: space-between; padding: 4px 4px; - border-radius: 4px; + border-radius: var(--app-radius-xs); cursor: pointer; - transition: background-color 0.15s ease; + transition: background-color var(--app-motion-fast) ease; &:hover { background-color: var(--refer-brand-4); @@ -429,7 +429,7 @@ const getWebSearchDisplayText = (item) => { .doc-group-count { color: var(--td-text-color-placeholder); - font-size: 11px; + font-size: var(--app-text-xs); margin-left: 6px; white-space: nowrap; flex-shrink: 0; @@ -446,11 +446,11 @@ const getWebSearchDisplayText = (item) => { justify-content: center; width: 22px; height: 22px; - border-radius: 4px; + border-radius: var(--app-radius-xs); color: var(--td-brand-color); cursor: pointer; text-decoration: none; - transition: all 0.15s ease; + transition: all var(--app-motion-fast) ease; &:hover { background-color: var(--refer-brand-12); @@ -467,12 +467,12 @@ const getWebSearchDisplayText = (item) => { .doc-chunk-text { display: block; color: var(--td-text-color-secondary); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 18px; padding: 3px 6px; - border-radius: 4px; + border-radius: var(--app-radius-xs); cursor: pointer; - transition: background-color 0.15s ease; + transition: background-color var(--app-motion-fast) ease; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -484,7 +484,7 @@ const getWebSearchDisplayText = (item) => { .doc-chunk-index { color: var(--td-text-color-placeholder); - font-size: 11px; + font-size: var(--app-text-xs); margin-right: 4px; } } diff --git a/frontend/src/views/chat/components/tool-results/ChunkDetail.vue b/frontend/src/views/chat/components/tool-results/ChunkDetail.vue index f7ea7536..f2d37944 100644 --- a/frontend/src/views/chat/components/tool-results/ChunkDetail.vue +++ b/frontend/src/views/chat/components/tool-results/ChunkDetail.vue @@ -62,7 +62,7 @@ const copyToClipboard = () => { code { font-family: var(--app-font-family-mono); - font-size: 11px; + font-size: var(--app-text-xs); background: var(--td-bg-color-secondarycontainer); padding: 2px 4px; border-radius: 3px; diff --git a/frontend/src/views/chat/components/tool-results/ContentPopup.vue b/frontend/src/views/chat/components/tool-results/ContentPopup.vue index 61bbfd83..33f8d79f 100644 --- a/frontend/src/views/chat/components/tool-results/ContentPopup.vue +++ b/frontend/src/views/chat/components/tool-results/ContentPopup.vue @@ -85,7 +85,7 @@ const blocks = computed(() => { max-height: 420px; max-width: 500px; border: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-container); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); word-wrap: break-word; @@ -101,7 +101,7 @@ const blocks = computed(() => { } .full-content { - font-size: 13px; + font-size: var(--app-text-md); color: var(--td-text-color-primary); line-height: 1.7; white-space: pre-wrap; @@ -125,7 +125,7 @@ const blocks = computed(() => { } .chunk-block__label { - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 600; color: var(--td-text-color-placeholder); margin-bottom: 4px; @@ -151,7 +151,7 @@ const blocks = computed(() => { .popup-footer__item { font-family: var(--app-font-family-mono); - font-size: 10px; + font-size: var(--app-text-2xs); color: var(--td-text-color-placeholder); overflow: hidden; text-overflow: ellipsis; diff --git a/frontend/src/views/chat/components/tool-results/DatabaseQuery.vue b/frontend/src/views/chat/components/tool-results/DatabaseQuery.vue index d7f67d86..dcee857e 100644 --- a/frontend/src/views/chat/components/tool-results/DatabaseQuery.vue +++ b/frontend/src/views/chat/components/tool-results/DatabaseQuery.vue @@ -50,7 +50,7 @@ const formatValue = (value: any): string => { diff --git a/frontend/src/views/chat/components/tool-results/DocumentInfo.vue b/frontend/src/views/chat/components/tool-results/DocumentInfo.vue index e08e941e..838da19c 100644 --- a/frontend/src/views/chat/components/tool-results/DocumentInfo.vue +++ b/frontend/src/views/chat/components/tool-results/DocumentInfo.vue @@ -168,11 +168,11 @@ const formatMetadataValue = (value: unknown) => { } .meta-chip { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-secondary); background: var(--td-bg-color-secondarycontainer); border: 1px solid @card-border; - border-radius: 10px; + border-radius: var(--app-radius-lg); padding: 2px 8px; line-height: 1.5; white-space: nowrap; @@ -197,16 +197,16 @@ const formatMetadataValue = (value: unknown) => { } .doc-title { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; color: var(--td-text-color-primary); } .status-pill { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-brand-color); - border: 1px solid rgba(7, 192, 95, 0.3); - border-radius: 10px; + border: 1px solid color-mix(in srgb, var(--td-brand-color) 30%, transparent); + border-radius: var(--app-radius-lg); padding: 2px 8px; line-height: 1.4; } @@ -230,7 +230,7 @@ const formatMetadataValue = (value: unknown) => { gap: 4px; li { - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-primary); } @@ -240,7 +240,7 @@ const formatMetadataValue = (value: unknown) => { display: flex; gap: 10px; margin-bottom: 5px; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; &--block { @@ -275,7 +275,7 @@ const formatMetadataValue = (value: unknown) => { gap: 3px; li { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-primary); line-height: 1.5; } @@ -293,7 +293,7 @@ const formatMetadataValue = (value: unknown) => { } .empty-state { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); text-align: center; padding: 14px; @@ -304,7 +304,7 @@ const formatMetadataValue = (value: unknown) => { code { font-family: var(--app-font-family-mono); - font-size: 10px; + font-size: var(--app-text-2xs); background: var(--td-bg-color-secondarycontainer); padding: 2px 4px; border-radius: 2px; diff --git a/frontend/src/views/chat/components/tool-results/GraphQueryResults.vue b/frontend/src/views/chat/components/tool-results/GraphQueryResults.vue index 3ee85eca..0ea9986a 100644 --- a/frontend/src/views/chat/components/tool-results/GraphQueryResults.vue +++ b/frontend/src/views/chat/components/tool-results/GraphQueryResults.vue @@ -111,26 +111,26 @@ const getRelevanceLabel = (level: RelevanceLevel): string => { } .results-header { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; color: var(--td-text-color-primary); padding: 4px 0; } .result-index { - font-size: 13px; + font-size: var(--app-text-md); color: var(--td-text-color-placeholder); font-weight: 600; } .knowledge-title { - font-size: 13px; + font-size: var(--app-text-md); color: var(--td-text-color-primary); flex: 1; } .score { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); font-weight: 500; } diff --git a/frontend/src/views/chat/components/tool-results/KnowledgeBaseList.vue b/frontend/src/views/chat/components/tool-results/KnowledgeBaseList.vue index 7842e219..424539da 100644 --- a/frontend/src/views/chat/components/tool-results/KnowledgeBaseList.vue +++ b/frontend/src/views/chat/components/tool-results/KnowledgeBaseList.vue @@ -56,7 +56,7 @@ const props = defineProps<{ border: .5px solid @card-border; border-radius: @card-radius; padding: 12px; - transition: all 0.2s ease; + transition: all var(--app-motion-base) ease; &:hover { border-color: @card-hover-border; @@ -72,13 +72,13 @@ const props = defineProps<{ } .kb-index { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); font-weight: 600; } .kb-name { - font-size: 14px; + font-size: var(--app-text-base); font-weight: 600; color: var(--td-text-color-primary); } @@ -90,7 +90,7 @@ const props = defineProps<{ } .kb-description { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-secondary); line-height: 1.5; margin-top: 4px; @@ -98,7 +98,7 @@ const props = defineProps<{ code { font-family: var(--app-font-family-mono); - font-size: 11px; + font-size: var(--app-text-xs); background: var(--td-bg-color-secondarycontainer); padding: 2px 4px; border-radius: 3px; diff --git a/frontend/src/views/chat/components/tool-results/KnowledgeChunksList.vue b/frontend/src/views/chat/components/tool-results/KnowledgeChunksList.vue index 4cf312e2..a7ecc947 100644 --- a/frontend/src/views/chat/components/tool-results/KnowledgeChunksList.vue +++ b/frontend/src/views/chat/components/tool-results/KnowledgeChunksList.vue @@ -36,7 +36,7 @@ const summaryHtml = computed(() => getKnowledgeChunksSummaryHtml(t, props.data)) } .empty-state { - font-size: 13px; + font-size: var(--app-text-md); color: var(--td-text-color-placeholder); } } diff --git a/frontend/src/views/chat/components/tool-results/McpToolResult.vue b/frontend/src/views/chat/components/tool-results/McpToolResult.vue index 072d57c0..11189d4d 100644 --- a/frontend/src/views/chat/components/tool-results/McpToolResult.vue +++ b/frontend/src/views/chat/components/tool-results/McpToolResult.vue @@ -134,13 +134,13 @@ const statusLabel = (status: string) => { diff --git a/frontend/src/views/chat/components/tool-results/PlanDisplay.vue b/frontend/src/views/chat/components/tool-results/PlanDisplay.vue index e342409c..47d426cf 100644 --- a/frontend/src/views/chat/components/tool-results/PlanDisplay.vue +++ b/frontend/src/views/chat/components/tool-results/PlanDisplay.vue @@ -36,7 +36,7 @@ const props = defineProps(); diff --git a/frontend/src/views/chat/components/tool-results/ReadSkillResult.vue b/frontend/src/views/chat/components/tool-results/ReadSkillResult.vue index b5c70b6f..dd3b6d2b 100644 --- a/frontend/src/views/chat/components/tool-results/ReadSkillResult.vue +++ b/frontend/src/views/chat/components/tool-results/ReadSkillResult.vue @@ -76,14 +76,14 @@ const bodyLabel = computed(() => .read-skill-desc { margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.55; color: var(--td-text-color-secondary); } .read-skill-heading { margin-bottom: 4px; - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; line-height: 1.4; color: var(--td-text-color-secondary); @@ -92,14 +92,14 @@ const bodyLabel = computed(() => .read-skill-stream { min-width: 0; border: 1px solid var(--td-component-stroke); - border-radius: 6px; + border-radius: var(--app-radius-sm); overflow: hidden; background: var(--td-bg-color-container); } .read-skill-stream-label { padding: 6px 12px; - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; line-height: 1.4; color: var(--td-text-color-secondary); @@ -113,7 +113,7 @@ const bodyLabel = computed(() => max-height: 280px; overflow: auto; font-family: var(--app-font-family-mono); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.55; color: var(--td-text-color-primary); white-space: pre-wrap; @@ -126,7 +126,7 @@ const bodyLabel = computed(() => &::-webkit-scrollbar-thumb { background: var(--td-component-border); - border-radius: 4px; + border-radius: var(--app-radius-xs); } } diff --git a/frontend/src/views/chat/components/tool-results/RelatedChunks.vue b/frontend/src/views/chat/components/tool-results/RelatedChunks.vue index 7800ab58..f12361f9 100644 --- a/frontend/src/views/chat/components/tool-results/RelatedChunks.vue +++ b/frontend/src/views/chat/components/tool-results/RelatedChunks.vue @@ -61,17 +61,17 @@ const props = defineProps<{ padding: 0; .info-field { - font-size: 11px; + font-size: var(--app-text-xs); margin-bottom: 4px; .field-label { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-placeholder); min-width: 70px; } .field-value { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-secondary); } } @@ -112,18 +112,18 @@ const props = defineProps<{ gap: 6px; flex: 1; min-width: 0; - font-size: 12px; + font-size: var(--app-text-sm); } .chunk-index { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-primary); font-weight: 600; flex-shrink: 0; } .chunk-position { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-placeholder); } @@ -136,7 +136,7 @@ const props = defineProps<{ overflow-y: auto; overflow-x: hidden; padding: 0; - border-radius: 6px; + border-radius: var(--app-radius-sm); box-shadow: var(--td-shadow-3); word-wrap: break-word; word-break: break-word; @@ -145,7 +145,7 @@ const props = defineProps<{ code { font-family: var(--app-font-family-mono); - font-size: 11px; + font-size: var(--app-text-xs); background: var(--td-bg-color-secondarycontainer); padding: 2px 4px; border-radius: 3px; diff --git a/frontend/src/views/chat/components/tool-results/ResultRow.vue b/frontend/src/views/chat/components/tool-results/ResultRow.vue index 834ca627..42bff811 100644 --- a/frontend/src/views/chat/components/tool-results/ResultRow.vue +++ b/frontend/src/views/chat/components/tool-results/ResultRow.vue @@ -65,8 +65,8 @@ withDefaults( gap: 6px; min-width: 0; padding: 4px 8px; - border-radius: 4px; - font-size: 12px; + border-radius: var(--app-radius-xs); + font-size: var(--app-text-sm); line-height: 1.4; user-select: none; @@ -86,12 +86,12 @@ withDefaults( justify-content: center; width: 20px; height: 20px; - border-radius: 4px; - font-size: 14px; + border-radius: var(--app-radius-xs); + font-size: var(--app-text-base); color: var(--td-text-color-placeholder); cursor: pointer; opacity: 0.5; - transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease; + transition: opacity var(--app-motion-fast) ease, color var(--app-motion-fast) ease, background var(--app-motion-fast) ease; &:hover { opacity: 1; @@ -103,7 +103,7 @@ withDefaults( .result-row__index { flex-shrink: 0; min-width: 22px; - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 600; color: var(--td-text-color-placeholder); } @@ -120,7 +120,7 @@ withDefaults( .result-row__meta { flex-shrink: 0; - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 400; color: var(--td-text-color-placeholder); } diff --git a/frontend/src/views/chat/components/tool-results/SandboxFilesResult.vue b/frontend/src/views/chat/components/tool-results/SandboxFilesResult.vue index fe9031a5..0930da79 100644 --- a/frontend/src/views/chat/components/tool-results/SandboxFilesResult.vue +++ b/frontend/src/views/chat/components/tool-results/SandboxFilesResult.vue @@ -82,7 +82,7 @@ function metaFor(item: SkillFileListItem): string { } .empty-state { - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-placeholder); } diff --git a/frontend/src/views/chat/components/tool-results/ShellExecResult.vue b/frontend/src/views/chat/components/tool-results/ShellExecResult.vue index a70afe4d..f5aabcca 100644 --- a/frontend/src/views/chat/components/tool-results/ShellExecResult.vue +++ b/frontend/src/views/chat/components/tool-results/ShellExecResult.vue @@ -84,7 +84,7 @@ const durationLabel = computed(() => { gap: 8px; padding: 10px 12px; border: 1px solid var(--td-component-stroke); - border-radius: 6px; + border-radius: var(--app-radius-sm); background: var(--td-bg-color-secondarycontainer); } @@ -92,7 +92,7 @@ const durationLabel = computed(() => { flex-shrink: 0; margin-top: 1px; font-family: var(--app-font-family-mono); - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 600; line-height: 1.55; color: var(--td-text-color-placeholder); @@ -103,7 +103,7 @@ const durationLabel = computed(() => { min-width: 0; margin: 0; font-family: var(--app-font-family-mono); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.55; color: var(--td-text-color-primary); white-space: pre-wrap; @@ -114,7 +114,7 @@ const durationLabel = computed(() => { display: flex; flex-wrap: wrap; gap: 4px 12px; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.4; color: var(--td-text-color-placeholder); @@ -125,7 +125,7 @@ const durationLabel = computed(() => { .shell-exec-note, .shell-exec-empty { - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.4; color: var(--td-text-color-placeholder); } @@ -133,7 +133,7 @@ const durationLabel = computed(() => { .shell-exec-stream { min-width: 0; border: 1px solid var(--td-component-stroke); - border-radius: 6px; + border-radius: var(--app-radius-sm); overflow: hidden; background: var(--td-bg-color-container); @@ -144,7 +144,7 @@ const durationLabel = computed(() => { .shell-exec-stream-label { padding: 6px 12px; - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; line-height: 1.4; color: var(--td-text-color-secondary); @@ -158,7 +158,7 @@ const durationLabel = computed(() => { max-height: 280px; overflow: auto; font-family: var(--app-font-family-mono); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.55; color: var(--td-text-color-primary); white-space: pre-wrap; @@ -171,7 +171,7 @@ const durationLabel = computed(() => { &::-webkit-scrollbar-thumb { background: var(--td-component-border); - border-radius: 4px; + border-radius: var(--app-radius-xs); } } diff --git a/frontend/src/views/chat/components/tool-results/ThinkingDisplay.vue b/frontend/src/views/chat/components/tool-results/ThinkingDisplay.vue index 5a62d056..4f8ffcd0 100644 --- a/frontend/src/views/chat/components/tool-results/ThinkingDisplay.vue +++ b/frontend/src/views/chat/components/tool-results/ThinkingDisplay.vue @@ -30,18 +30,18 @@ useI18n(); // ensure component reacts to locale changes if needed gap: 10px; padding: 12px 14px; background: var(--td-bg-color-secondarycontainer); - border-radius: 6px; + border-radius: var(--app-radius-sm); border-left: 3px solid var(--td-text-color-placeholder); } .thinking-icon { - font-size: 16px; + font-size: var(--app-text-xl); flex-shrink: 0; line-height: 1.5; } .thinking-text { - font-size: 15px; + font-size: var(--app-text-lg); color: var(--td-text-color-primary); line-height: 1.65; white-space: pre-wrap; diff --git a/frontend/src/views/chat/components/tool-results/WebFetchResults.vue b/frontend/src/views/chat/components/tool-results/WebFetchResults.vue index 4780ee6a..b7899811 100644 --- a/frontend/src/views/chat/components/tool-results/WebFetchResults.vue +++ b/frontend/src/views/chat/components/tool-results/WebFetchResults.vue @@ -250,7 +250,7 @@ const indexKey = (index: number, item: WebFetchResultItem): string => { } .result-index { - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 600; color: var(--td-text-color-placeholder); } @@ -260,10 +260,10 @@ const indexKey = (index: number, item: WebFetchResultItem): string => { align-items: center; gap: 4px; color: var(--td-text-color-primary); - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; text-decoration: none; - transition: color 0.15s ease; + transition: color var(--app-motion-fast) ease; &:hover { color: var(--td-brand-color); @@ -272,7 +272,7 @@ const indexKey = (index: number, item: WebFetchResultItem): string => { } .result-domain { - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; color: var(--td-text-color-primary); } @@ -281,13 +281,13 @@ const indexKey = (index: number, item: WebFetchResultItem): string => { display: inline-flex; align-items: center; padding: 2px 6px; - border-radius: 999px; - font-size: 10px; + border-radius: var(--app-radius-pill); + font-size: var(--app-text-2xs); font-weight: 600; line-height: 1.4; &.status-success { - background: rgba(7, 192, 95, 0.08); + background: color-mix(in srgb, var(--td-brand-color) 8%, transparent); color: var(--td-success-color); } @@ -302,13 +302,13 @@ const indexKey = (index: number, item: WebFetchResultItem): string => { } &.method { - background: rgba(7, 192, 95, 0.08); + background: color-mix(in srgb, var(--td-brand-color) 8%, transparent); color: var(--td-success-color); } } .meta-text { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-secondary); } @@ -326,7 +326,7 @@ const indexKey = (index: number, item: WebFetchResultItem): string => { } .raw-length { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-placeholder); margin-left: 4px; font-weight: normal; diff --git a/frontend/src/views/chat/components/tool-results/WebSearchResults.vue b/frontend/src/views/chat/components/tool-results/WebSearchResults.vue index 60feb227..85c6c05e 100644 --- a/frontend/src/views/chat/components/tool-results/WebSearchResults.vue +++ b/frontend/src/views/chat/components/tool-results/WebSearchResults.vue @@ -170,7 +170,7 @@ const formatDate = (dateStr: string): string => { display: flex; align-items: center; gap: 6px; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-secondary); /* Align with title start (after index column) */ padding-left: 34px; @@ -184,7 +184,7 @@ const formatDate = (dateStr: string): string => { display: inline-flex; align-items: center; padding: 1px 6px; - border-radius: 4px; + border-radius: var(--app-radius-xs); background: var(--td-bg-color-secondarycontainer); border: 1px solid var(--td-component-stroke); color: var(--td-text-color-primary); @@ -192,7 +192,7 @@ const formatDate = (dateStr: string): string => { } .group-count { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-secondary); } @@ -222,7 +222,7 @@ const formatDate = (dateStr: string): string => { } .result-index { - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 600; color: var(--td-text-color-placeholder); flex-shrink: 0; @@ -237,7 +237,7 @@ const formatDate = (dateStr: string): string => { flex: 1; text-decoration: none; color: var(--td-text-color-primary); - transition: color 0.15s ease; + transition: color var(--app-motion-fast) ease; &:hover { color: var(--td-brand-color); @@ -249,7 +249,7 @@ const formatDate = (dateStr: string): string => { } .result-title { - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; line-height: 1.4; color: inherit; @@ -272,7 +272,7 @@ const formatDate = (dateStr: string): string => { flex: 1; .result-title { - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 500; line-height: 1.4; color: var(--td-text-color-primary); @@ -286,7 +286,7 @@ const formatDate = (dateStr: string): string => { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--td-bg-color-secondarycontainer); - font-size: 10px; + font-size: var(--app-text-2xs); color: var(--td-text-color-placeholder); .meta-item { @@ -296,7 +296,7 @@ const formatDate = (dateStr: string): string => { } .meta-icon { - font-size: 10px; + font-size: var(--app-text-2xs); } } @@ -304,10 +304,10 @@ const formatDate = (dateStr: string): string => { padding: 16px; text-align: center; color: var(--td-text-color-placeholder); - font-size: 12px; + font-size: var(--app-text-sm); font-style: italic; background: var(--td-bg-color-secondarycontainer); - border-radius: 6px; + border-radius: var(--app-radius-sm); border: 1px dashed var(--td-component-stroke); } diff --git a/frontend/src/views/chat/components/tool-results/WikiEditResult.vue b/frontend/src/views/chat/components/tool-results/WikiEditResult.vue index f0b691c9..1fe9e078 100644 --- a/frontend/src/views/chat/components/tool-results/WikiEditResult.vue +++ b/frontend/src/views/chat/components/tool-results/WikiEditResult.vue @@ -169,13 +169,13 @@ const headerTitle = computed(() => { .wiki-header { .wiki-icon { - font-size: 14px; + font-size: var(--app-text-base); width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; - border-radius: 4px; + border-radius: var(--app-radius-xs); flex-shrink: 0; &.created { @@ -184,7 +184,7 @@ const headerTitle = computed(() => { } &.updated { color: var(--td-brand-color); - background: rgba(7, 192, 95, 0.1); + background: color-mix(in srgb, var(--td-brand-color) 10%, transparent); } &.renamed { color: var(--td-warning-color); @@ -197,17 +197,17 @@ const headerTitle = computed(() => { } .wiki-title-text { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; color: var(--td-text-color-primary); } } .action-badge { - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 600; padding: 2px 8px; - border-radius: 10px; + border-radius: var(--app-radius-lg); line-height: 1.5; &.created { @@ -217,8 +217,8 @@ const headerTitle = computed(() => { } &.updated { color: var(--td-brand-color); - background: rgba(7, 192, 95, 0.1); - border: 1px solid rgba(7, 192, 95, 0.2); + background: color-mix(in srgb, var(--td-brand-color) 10%, transparent); + border: 1px solid color-mix(in srgb, var(--td-brand-color) 20%, transparent); } &.renamed { color: var(--td-warning-color); @@ -235,10 +235,10 @@ const headerTitle = computed(() => { .diff-block { margin-top: 8px; border: 1px solid @card-border; - border-radius: 4px; + border-radius: var(--app-radius-xs); overflow: hidden; font-family: var(--app-font-family-mono); - font-size: 12px; + font-size: var(--app-text-sm); } .diff-line { @@ -286,7 +286,7 @@ const headerTitle = computed(() => { font-weight: 600; } .rename-arrow { - font-size: 16px; + font-size: var(--app-text-xl); color: var(--td-text-color-placeholder); } } @@ -299,7 +299,7 @@ const headerTitle = computed(() => { padding-left: 90px; .affected-slug { - font-size: 11px; + font-size: var(--app-text-xs); padding: 2px 6px; border-radius: 3px; background: var(--td-bg-color-secondarycontainer); @@ -309,7 +309,7 @@ const headerTitle = computed(() => { code { font-family: var(--app-font-family-mono); - font-size: 11px; + font-size: var(--app-text-xs); background: var(--td-bg-color-secondarycontainer); padding: 2px 5px; border-radius: 3px; 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 63d80a82..9756aab7 100644 --- a/frontend/src/views/chat/components/tool-results/tool-results.less +++ b/frontend/src/views/chat/components/tool-results/tool-results.less @@ -15,7 +15,7 @@ @card-hover-border: var(--td-brand-color); @card-radius: 6px; @card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); -@card-shadow-hover: 0 2px 6px rgba(7, 192, 95, 0.08); +@card-shadow-hover: 0 2px 6px color-mix(in srgb, var(--td-brand-color) 8%, transparent); // Animation timing @transition-time: 0.2s; @@ -31,7 +31,7 @@ align-items: center; padding: 2px 6px; border-radius: 3px; - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 600; gap: 3px; line-height: 1.4; @@ -63,7 +63,7 @@ align-items: center; padding: 2px 6px; border-radius: 3px; - font-size: 10px; + font-size: var(--app-text-2xs); background-color: var(--td-bg-color-secondarycontainer); color: var(--td-text-color-secondary); gap: 2px; @@ -96,10 +96,10 @@ gap: 8px; position: relative; z-index: 1; - transition: background-color 0.15s ease; + transition: background-color var(--app-motion-fast) ease; &:hover { - background: rgba(7, 192, 95, 0.04); + background: color-mix(in srgb, var(--td-brand-color) 4%, transparent); } * { @@ -112,7 +112,7 @@ align-items: center; gap: 6px; flex: 1; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; line-height: 1.4; } @@ -121,7 +121,7 @@ display: flex; align-items: center; gap: 6px; - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-secondary); flex-shrink: 0; } @@ -143,9 +143,9 @@ } .expand-icon { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); - transition: transform 0.15s ease, color 0.15s ease; + transition: transform var(--app-motion-fast) ease, color var(--app-motion-fast) ease; &.expanded { transform: rotate(180deg); @@ -162,7 +162,7 @@ } .info-section-title { - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 600; color: var(--td-text-color-secondary); text-transform: uppercase; @@ -174,7 +174,7 @@ display: flex; gap: 8px; margin-bottom: 6px; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; .field-label { @@ -193,15 +193,15 @@ // Statistics card (for KB counts, etc.) .stats-card { - background: rgba(7, 192, 95, 0.04); - border: 1px solid rgba(7, 192, 95, 0.15); + background: color-mix(in srgb, var(--td-brand-color) 4%, transparent); + border: 1px solid color-mix(in srgb, var(--td-brand-color) 15%, transparent); border-radius: @card-radius; padding: 10px 12px; margin-bottom: 10px; } .stats-title { - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 600; color: var(--td-text-color-primary); margin-bottom: 6px; @@ -214,7 +214,7 @@ } .stats-item { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-secondary); display: flex; justify-content: space-between; @@ -244,7 +244,7 @@ // Content preview (truncated) .content-preview { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-primary); line-height: 1.6; max-height: 60px; @@ -257,33 +257,33 @@ // Full content .full-content { - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-primary); line-height: 1.6; white-space: pre-wrap; word-break: break-word; padding: 10px; background: var(--td-bg-color-secondarycontainer); - border-radius: 4px; + border-radius: var(--app-radius-xs); border: 1px solid @card-border; } // Action buttons .action-button { padding: 4px 10px; - font-size: 11px; - border-radius: 4px; + font-size: var(--app-text-xs); + border-radius: var(--app-radius-xs); border: 1px solid @card-border; background: var(--td-bg-color-container); color: var(--td-text-color-secondary); cursor: pointer; - transition: all 0.15s ease; + transition: all var(--app-motion-fast) ease; font-weight: 500; &:hover { border-color: @card-hover-border; color: @card-hover-border; - background: rgba(7, 192, 95, 0.04); + background: color-mix(in srgb, var(--td-brand-color) 4%, transparent); } } @@ -292,7 +292,7 @@ padding: 20px; text-align: center; color: var(--td-text-color-placeholder); - font-size: 12px; + font-size: var(--app-text-sm); font-style: italic; background: var(--td-bg-color-secondarycontainer); border-radius: @card-radius; @@ -302,10 +302,10 @@ // Code block .code-block { font-family: var(--app-font-family-mono); - font-size: 11px; + font-size: var(--app-text-xs); background: var(--td-bg-color-secondarycontainer); padding: 8px; - border-radius: 4px; + border-radius: var(--app-radius-xs); border: 1px solid @card-border; overflow-x: auto; line-height: 1.5; diff --git a/frontend/src/views/chat/components/usermsg.vue b/frontend/src/views/chat/components/usermsg.vue index e713283f..b447e0ed 100644 --- a/frontend/src/views/chat/components/usermsg.vue +++ b/frontend/src/views/chat/components/usermsg.vue @@ -266,11 +266,11 @@ const closePreImg = () => { align-items: flex-start; gap: 4px; flex: 1 0 0; - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-secondarycontainer); margin-left: auto; color: var(--td-text-color-primary); - font-size: 16px; + font-size: var(--app-text-xl); line-height: 1.6; text-align: left; word-break: break-word; @@ -301,19 +301,19 @@ const closePreImg = () => { align-items: center; gap: 10px; padding: 8px 12px; - border-radius: 8px; - border: 1px solid var(--td-border-level-1-color, #e7e7e7); - background: var(--td-bg-color-container, #fff); + border-radius: var(--app-radius-md); + border: 1px solid var(--td-border-level-1-color); + background: var(--td-bg-color-container); max-width: 260px; min-width: 160px; cursor: default; &.is-previewable { cursor: pointer; - transition: border-color 0.2s, box-shadow 0.2s; + transition: border-color var(--app-motion-base), box-shadow var(--app-motion-base); &:hover { - border-color: var(--td-brand-color-2, rgba(0, 82, 217, 0.25)); + border-color: var(--td-brand-color-2); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); } } @@ -334,17 +334,17 @@ const closePreImg = () => { } .attachment_card_name { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; - color: var(--td-text-color-primary, #333); + color: var(--td-text-color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .attachment_card_meta { - font-size: 11px; - color: var(--td-text-color-secondary, #999); + font-size: var(--app-text-xs); + color: var(--td-text-color-secondary); white-space: nowrap; box-sizing: border-box; } @@ -354,10 +354,10 @@ const closePreImg = () => { width: 120px; height: 120px; object-fit: cover; - border-radius: 6px; + border-radius: var(--app-radius-sm); cursor: pointer; - border: 1px solid var(--td-border-level-2-color, #e7e7e7); - transition: opacity 0.2s; + border: 1px solid var(--td-border-level-2-color); + transition: opacity var(--app-motion-base); &:hover { opacity: 0.85; @@ -369,29 +369,29 @@ const closePreImg = () => { align-items: center; padding: 1px 6px; border-radius: 3px; - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 500; line-height: 18px; background: var(--td-bg-color-secondarycontainer); color: var(--td-text-color-placeholder); - border: 1px solid var(--td-border-level-2-color, #e7e7e7); + border: 1px solid var(--td-border-level-2-color); &.channel-web { color: var(--td-brand-color); background: var(--td-brand-color-light); - border-color: var(--td-brand-color-2, rgba(0, 82, 217, 0.1)); + border-color: var(--td-brand-color-2); } &.channel-api { color: var(--td-success-color); - background: var(--td-success-color-1, rgba(0, 168, 112, 0.06)); - border-color: var(--td-success-color-2, rgba(0, 168, 112, 0.15)); + background: var(--td-success-color-1); + border-color: var(--td-success-color-2); } &.channel-im { color: var(--td-warning-color); - background: var(--td-warning-color-1, rgba(237, 123, 0, 0.06)); - border-color: var(--td-warning-color-2, rgba(237, 123, 0, 0.15)); + background: var(--td-warning-color-1); + border-color: var(--td-warning-color-2); } } @@ -404,9 +404,9 @@ html[theme-mode="dark"] { diff --git a/frontend/src/views/integrations/McpServerIntegrationSettings.vue b/frontend/src/views/integrations/McpServerIntegrationSettings.vue index 1d5872fc..0cd607a4 100644 --- a/frontend/src/views/integrations/McpServerIntegrationSettings.vue +++ b/frontend/src/views/integrations/McpServerIntegrationSettings.vue @@ -568,7 +568,7 @@ onMounted(() => { .form-label { display: block; margin-bottom: 6px; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 500; color: var(--td-text-color-primary); line-height: 1.4; @@ -585,7 +585,7 @@ onMounted(() => { .form-desc { margin: 4px 0 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.45; color: var(--td-text-color-placeholder); @@ -618,7 +618,7 @@ onMounted(() => { .tool-group { border: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); padding: 10px 12px; } @@ -630,7 +630,7 @@ onMounted(() => { } .tool-group__name { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; color: var(--td-text-color-primary); } @@ -655,26 +655,26 @@ onMounted(() => { .tool-item__code { margin-left: 6px; - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-placeholder); background: var(--td-bg-color-secondarycontainer); padding: 1px 5px; - border-radius: 4px; + border-radius: var(--app-radius-xs); } .code-toolbar { position: relative; margin: 6px 0 10px; border: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-secondarycontainer); } .code-toolbar__code { margin: 0; padding: 10px 40px 10px 12px; - font-family: var(--td-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace); - font-size: 12px; + font-family: var(--td-font-family-mono); + font-size: var(--app-text-sm); line-height: 1.5; white-space: pre-wrap; word-break: break-all; @@ -714,7 +714,7 @@ onMounted(() => { gap: 6px; flex: 1; min-width: 0; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); padding: 0; border: none; @@ -757,7 +757,7 @@ onMounted(() => { display: flex; align-items: center; justify-content: center; - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 600; border: 1px solid var(--td-component-stroke); color: var(--td-text-color-placeholder); @@ -777,7 +777,7 @@ onMounted(() => { } .im-step-check { - font-size: 12px; + font-size: var(--app-text-sm); } .im-step-body { diff --git a/frontend/src/views/integrations/integration-landing.less b/frontend/src/views/integrations/integration-landing.less index 80b16362..4d3c8bb3 100644 --- a/frontend/src/views/integrations/integration-landing.less +++ b/frontend/src/views/integrations/integration-landing.less @@ -28,7 +28,7 @@ align-items: flex-start; gap: 16px; padding: 16px 18px; - border-radius: 10px; + border-radius: var(--app-radius-lg); border: 1px solid var(--td-component-stroke); background: linear-gradient( 135deg, @@ -55,7 +55,7 @@ &__title { margin: 0 0 4px; - font-size: 16px; + font-size: var(--app-text-xl); font-weight: 600; line-height: 1.35; color: var(--td-text-color-primary); @@ -63,7 +63,7 @@ &__subtitle { margin: 0; - font-size: 13px; + font-size: var(--app-text-md); line-height: 1.55; color: var(--td-text-color-secondary); } @@ -88,7 +88,7 @@ width: 100%; min-height: 52px; padding: 10px 12px; - border-radius: 8px; + border-radius: var(--app-radius-md); border: 1px dashed color-mix(in srgb, var(--td-brand-color) 28%, var(--td-component-stroke)); background: color-mix(in srgb, var(--td-bg-color-container) 55%, transparent); cursor: pointer; @@ -157,7 +157,7 @@ flex-shrink: 0; width: 34px; height: 34px; - border-radius: 8px; + border-radius: var(--app-radius-md); display: inline-flex; align-items: center; justify-content: center; @@ -183,14 +183,14 @@ } &__label { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; line-height: 1.35; color: var(--td-text-color-primary); } &__hint { - font-size: 11px; + font-size: var(--app-text-xs); line-height: 1.4; color: var(--td-text-color-placeholder); } @@ -209,7 +209,7 @@ } &__arrow { - font-size: 15px; + font-size: var(--app-text-lg); line-height: 0; display: inline-flex; align-items: center; @@ -289,8 +289,8 @@ .scenario-tag { padding: 2px 8px; - border-radius: 4px; - font-size: 11px; + border-radius: var(--app-radius-xs); + font-size: var(--app-text-xs); line-height: 1.45; color: var(--td-text-color-secondary); background: color-mix(in srgb, var(--td-bg-color-container) 70%, transparent); @@ -324,7 +324,7 @@ flex-direction: column; padding: 2px 16px 14px; border: 1px solid var(--td-component-stroke); - border-radius: 10px; + border-radius: var(--app-radius-lg); background: var(--td-bg-color-container); box-sizing: border-box; @@ -347,7 +347,7 @@ } .setting-drawer__section-title { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; color: var(--td-text-color-primary); margin: 0; @@ -370,8 +370,8 @@ .section-head-extra { margin-left: auto; padding: 1px 7px; - border-radius: 10px; - font-size: 11px; + border-radius: var(--app-radius-lg); + font-size: var(--app-text-xs); font-weight: 500; color: var(--td-text-color-disabled); background: var(--td-bg-color-secondarycontainer); @@ -402,7 +402,7 @@ gap: 8px; padding: 12px; border: 1px solid var(--td-component-stroke); - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-secondarycontainer); box-sizing: border-box; @@ -428,7 +428,7 @@ &__title { margin: 0; - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; line-height: 1.4; color: var(--td-text-color-primary); @@ -436,7 +436,7 @@ &__desc { margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-secondary); } @@ -447,20 +447,20 @@ align-items: flex-start; gap: 8px; padding: 10px 12px; - border-radius: 8px; + border-radius: var(--app-radius-md); background: var(--td-bg-color-secondarycontainer); border: 1px solid var(--td-component-stroke); &__icon { flex-shrink: 0; margin-top: 1px; - font-size: 14px; + font-size: var(--app-text-base); color: var(--td-text-color-placeholder); } p { margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.55; color: var(--td-text-color-secondary); } @@ -473,7 +473,7 @@ .field-desc { margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.55; color: var(--td-text-color-placeholder); } @@ -485,7 +485,7 @@ :deep(.mono-text-input input) { font-family: var(--app-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace); - font-size: 12px; + font-size: var(--app-text-sm); } } @@ -512,7 +512,7 @@ display: flex; align-items: center; gap: 0; - border-radius: 8px; + border-radius: var(--app-radius-md); border: 1px solid var(--td-component-stroke); overflow: hidden; background: var(--td-bg-color-secondarycontainer); @@ -523,7 +523,7 @@ margin: 0; padding: 10px 12px; font-family: var(--app-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace); - font-size: 11px; + font-size: var(--app-text-xs); line-height: 1.55; color: var(--td-text-color-primary); overflow-x: auto; @@ -574,7 +574,7 @@ display: flex; align-items: center; justify-content: center; - font-size: 11px; + font-size: var(--app-text-xs); font-weight: 600; background: color-mix(in srgb, var(--td-brand-color) 12%, transparent); color: var(--td-brand-color); @@ -586,7 +586,7 @@ } .landing-step-title { - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 600; line-height: 1.4; color: var(--td-text-color-primary); @@ -595,7 +595,7 @@ .landing-step-desc { margin: 0; - font-size: 11px; + font-size: var(--app-text-xs); line-height: 1.5; color: var(--td-text-color-secondary); } @@ -622,20 +622,20 @@ gap: 4px; width: 100%; padding: 10px 12px; - border-radius: 8px; + border-radius: var(--app-radius-md); border: 1px solid var(--td-component-stroke); background: var(--td-bg-color-secondarycontainer); box-sizing: border-box; &__note { margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.55; color: var(--td-text-color-secondary); } } .landing-meta { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-placeholder); } diff --git a/frontend/src/views/knowledge/KnowledgeBase.vue b/frontend/src/views/knowledge/KnowledgeBase.vue index 1e9b6df1..c6203e1a 100644 --- a/frontend/src/views/knowledge/KnowledgeBase.vue +++ b/frontend/src/views/knowledge/KnowledgeBase.vue @@ -2692,16 +2692,16 @@ async function createNewSession(value: string): Promise { align-items: center; padding: 8px 16px; cursor: pointer; - transition: all 0.2s ease; + transition: all var(--app-motion-base) ease; color: var(--td-text-color-primary); font-family: var(--app-font-family); - font-size: 14px; + font-size: var(--app-text-base); font-weight: 400; } .tag-more-popup .tag-menu-item .menu-icon { margin-right: 8px; - font-size: 16px; + font-size: var(--app-text-xl); } .tag-more-popup .tag-menu-item:hover { @@ -2728,7 +2728,7 @@ async function createNewSession(value: string): Promise { cursor: pointer; color: var(--td-text-color-placeholder); font-weight: 400; - transition: color 0.15s; + transition: color var(--app-motion-fast); display: inline-flex; align-items: center; gap: 4px; @@ -2751,7 +2751,7 @@ async function createNewSession(value: string): Promise { display: inline-flex; align-items: center; color: var(--td-brand-color); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1; } @@ -2821,11 +2821,11 @@ async function createNewSession(value: string): Promise { margin-right: 4px; padding: 0; border: 1px solid var(--td-component-border); - border-radius: 6px; + border-radius: var(--app-radius-sm); background: var(--td-bg-color-container); color: var(--td-text-color-secondary); cursor: pointer; - transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease; + transition: border-color var(--app-motion-fast) ease, color var(--app-motion-fast) ease, background var(--app-motion-fast) ease; &:hover { border-color: var(--td-brand-color); @@ -2838,17 +2838,17 @@ async function createNewSession(value: string): Promise { max-width: 220px; padding: 2px 4px; border: 0; - border-radius: 4px; + border-radius: var(--app-radius-xs); background: transparent; color: var(--td-text-color-secondary); font-family: var(--app-font-family); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; - transition: color 0.15s ease, background 0.15s ease; + transition: color var(--app-motion-fast) ease, background var(--app-motion-fast) ease; &:hover { color: var(--td-brand-color); @@ -2869,7 +2869,7 @@ async function createNewSession(value: string): Promise { &__sep { flex-shrink: 0; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); } } @@ -2979,7 +2979,7 @@ async function createNewSession(value: string): Promise { align-items: center; padding: 2px; background: var(--td-bg-color-secondarycontainer); - border-radius: 6px; + border-radius: var(--app-radius-sm); gap: 0; .doc-view-toggle-btn { @@ -2990,18 +2990,18 @@ async function createNewSession(value: string): Promise { justify-content: center; border: 0; background: transparent; - border-radius: 4px; - color: var(--td-text-color-secondary, #888); + border-radius: var(--app-radius-xs); + color: var(--td-text-color-secondary); cursor: pointer; - transition: background-color 0.12s ease, color 0.12s ease; + transition: background-color var(--app-motion-instant) ease, color var(--app-motion-instant) ease; &:hover { - color: var(--td-text-color-primary, #232323); + color: var(--td-text-color-primary); } &.active { - background: var(--td-bg-color-container, #fff); - color: var(--td-brand-color, #0052d9); + background: var(--td-bg-color-container); + color: var(--td-brand-color); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); } } @@ -3023,10 +3023,10 @@ async function createNewSession(value: string): Promise { } :deep(.t-input) { - font-size: 13px; + font-size: var(--app-text-md); background-color: var(--td-bg-color-secondarycontainer); border-color: transparent; - border-radius: 6px; + border-radius: var(--app-radius-sm); box-shadow: none !important; &:hover, @@ -3040,10 +3040,10 @@ async function createNewSession(value: string): Promise { :deep(.t-select) { .t-input { - font-size: 13px; + font-size: var(--app-text-md); background-color: var(--td-bg-color-secondarycontainer); border-color: transparent; - border-radius: 6px; + border-radius: var(--app-radius-sm); box-shadow: none !important; &:hover, @@ -3147,7 +3147,7 @@ async function createNewSession(value: string): Promise { align-items: center; gap: 6px; margin: 0; - font-size: 20px; + font-size: var(--app-text-3xl); font-weight: 600; color: var(--td-text-color-primary); } @@ -3163,8 +3163,8 @@ async function createNewSession(value: string): Promise { display: inline-flex; align-items: center; gap: 4px; - border-radius: 6px; - transition: all 0.12s ease; + border-radius: var(--app-radius-sm); + transition: all var(--app-motion-instant) ease; &:hover:not(:disabled) { color: var(--td-success-color); @@ -3180,8 +3180,8 @@ async function createNewSession(value: string): Promise { padding-right: 6px; :deep(.t-icon) { - font-size: 14px; - transition: transform 0.12s ease; + font-size: var(--app-text-base); + transition: transform var(--app-motion-instant) ease; } &:hover:not(:disabled) { @@ -3193,7 +3193,7 @@ async function createNewSession(value: string): Promise { } .breadcrumb-separator { - font-size: 14px; + font-size: var(--app-text-base); color: var(--td-text-color-placeholder); } @@ -3206,7 +3206,7 @@ async function createNewSession(value: string): Promise { margin: 0; color: var(--td-text-color-primary); font-family: var(--app-font-family); - font-size: 24px; + font-size: var(--app-text-4xl); font-weight: 600; line-height: 32px; } @@ -3215,7 +3215,7 @@ async function createNewSession(value: string): Promise { margin: 0; color: var(--td-text-color-placeholder); font-family: var(--app-font-family); - font-size: 14px; + font-size: var(--app-text-base); font-weight: 400; line-height: 20px; } @@ -3226,10 +3226,10 @@ async function createNewSession(value: string): Promise { gap: 4px; margin: 2px 0 0; color: var(--td-warning-color); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.4; cursor: pointer; - transition: color 0.15s ease; + transition: color var(--app-motion-fast) ease; &:hover { color: var(--td-warning-color-active); @@ -3240,7 +3240,7 @@ async function createNewSession(value: string): Promise { } .parser-hint-icon { - font-size: 12px; + font-size: var(--app-text-sm); flex-shrink: 0; } @@ -3257,10 +3257,10 @@ async function createNewSession(value: string): Promise { gap: 4px; margin: 2px 0 0; color: var(--td-warning-color); - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.4; cursor: pointer; - transition: color 0.15s ease; + transition: color var(--app-motion-fast) ease; &:hover { color: var(--td-warning-color-active); @@ -3271,7 +3271,7 @@ async function createNewSession(value: string): Promise { } .warning-icon { - font-size: 12px; + font-size: var(--app-text-sm); flex-shrink: 0; } @@ -3299,7 +3299,7 @@ async function createNewSession(value: string): Promise { justify-content: center; color: var(--td-text-color-secondary); cursor: pointer; - transition: all 0.2s ease; + transition: all var(--app-motion-base) ease; padding: 0; &:hover:not(:disabled) { @@ -3314,7 +3314,7 @@ async function createNewSession(value: string): Promise { } :deep(.t-icon) { - font-size: 18px; + font-size: var(--app-text-2xl); } } @@ -3437,14 +3437,14 @@ async function createNewSession(value: string): Promise { flex-direction: column; border: 1px solid var(--td-component-border); height: 136px; - border-radius: 8px; + border-radius: var(--app-radius-md); overflow: hidden; box-sizing: border-box; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); background: var(--td-bg-color-container); position: relative; cursor: pointer; - transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease; + transition: border-color var(--app-motion-base) ease, box-shadow var(--app-motion-base) ease, background-color var(--app-motion-base) ease; .card-content { flex: 1; diff --git a/frontend/src/views/knowledge/KnowledgeBaseEditorModal.vue b/frontend/src/views/knowledge/KnowledgeBaseEditorModal.vue index 6012e932..f12eb8f6 100644 --- a/frontend/src/views/knowledge/KnowledgeBaseEditorModal.vue +++ b/frontend/src/views/knowledge/KnowledgeBaseEditorModal.vue @@ -1,182 +1,146 @@ +
+ +
+
+
+
{{ $t('settings.roleDenied.title') }}
+
{{ $t('settings.roleDenied.desc') }}
- - + +
+ diff --git a/frontend/src/views/settings/SystemInfo.vue b/frontend/src/views/settings/SystemInfo.vue index eddae205..c97e18f4 100644 --- a/frontend/src/views/settings/SystemInfo.vue +++ b/frontend/src/views/settings/SystemInfo.vue @@ -314,26 +314,14 @@ onUnmounted(() => { @@ -2335,20 +2321,6 @@ watch( .permissions-popup-overlay { z-index: 3050 !important; - .t-popup__content { - padding: 0 !important; - border-radius: 12px !important; - background: var(--td-bg-color-container) !important; - border: 0.5px solid var(--td-component-stroke) !important; - box-shadow: - 0 0 0 0.5px rgba(0, 0, 0, 0.03), - 0 2px 4px rgba(0, 0, 0, 0.04), - 0 8px 24px rgba(0, 0, 0, 0.1) !important; - backdrop-filter: blur(20px) saturate(180%) !important; - -webkit-backdrop-filter: blur(20px) saturate(180%) !important; - overflow: hidden; - } - .permissions-compact.permissions-compact--popover { padding: 12px 14px; margin: 0; @@ -2363,13 +2335,13 @@ watch( margin-bottom: 10px; .permissions-compact-title { - font-size: 13px; + font-size: var(--app-text-md); font-weight: 600; color: var(--td-text-color-primary); } .permissions-compact-desc { - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.45; color: var(--td-text-color-secondary); } @@ -2383,7 +2355,7 @@ watch( .perm-role-block { border: 1px solid var(--td-component-stroke); - border-radius: 6px; + border-radius: var(--app-radius-sm); padding: 8px 10px; background: var(--td-bg-color-container); @@ -2396,19 +2368,19 @@ watch( display: flex; align-items: center; gap: 4px; - font-size: 12px; + font-size: var(--app-text-sm); font-weight: 600; color: var(--td-text-color-primary); margin-bottom: 6px; .me-badge { margin-left: auto; - font-size: 10px; + font-size: var(--app-text-2xs); font-weight: 500; color: var(--td-brand-color); padding: 1px 5px; background: var(--td-brand-color-light); - border-radius: 4px; + border-radius: var(--app-radius-xs); } } @@ -2421,7 +2393,7 @@ watch( display: flex; align-items: flex-start; gap: 4px; - font-size: 11px; + font-size: var(--app-text-xs); line-height: 1.35; color: var(--td-text-color-secondary); @@ -2466,20 +2438,6 @@ watch( .member-invite-popup-overlay { z-index: 3050 !important; - .t-popup__content { - padding: 14px 16px !important; - min-width: 300px; - max-width: min(392px, calc(100vw - 24px)); - border-radius: 12px !important; - background: var(--td-bg-color-container) !important; - border: 0.5px solid var(--td-component-stroke) !important; - box-shadow: - 0 0 0 0.5px rgba(0, 0, 0, 0.03), - 0 2px 4px rgba(0, 0, 0, 0.04), - 0 8px 24px rgba(0, 0, 0, 0.1) !important; - backdrop-filter: blur(20px) saturate(180%) !important; - -webkit-backdrop-filter: blur(20px) saturate(180%) !important; - } } :root[theme-mode='dark'] .member-invite-popup-overlay .t-popup__content { @@ -2501,7 +2459,7 @@ watch( gap: 8px; } .role-option-icon { - font-size: 14px; + font-size: var(--app-text-base); color: var(--td-text-color-secondary); } } diff --git a/frontend/src/views/settings/UserProfile.vue b/frontend/src/views/settings/UserProfile.vue index d7e88507..94464a8d 100644 --- a/frontend/src/views/settings/UserProfile.vue +++ b/frontend/src/views/settings/UserProfile.vue @@ -87,7 +87,7 @@ trigger="click" placement="bottom-end" destroy-on-close - overlay-class-name="user-profile-password-popup-overlay" + overlay-class-name="wk-popover user-profile-password-popup-overlay" > @@ -213,10 +213,10 @@ onBeforeUnmount(() => { generation++; emit('busy', false) }) padding: 0 !important; width: 400px; max-width: calc(100vw - 24px); - border-radius: 8px !important; + border-radius: var(--app-radius-md) !important; background: var(--td-bg-color-container) !important; border: 1px solid var(--td-component-stroke) !important; - box-shadow: var(--td-shadow-2, 0 3px 14px 2px rgba(0, 0, 0, 0.05)) !important; + box-shadow: var(--td-shadow-2) !important; } } @@ -234,7 +234,7 @@ onBeforeUnmount(() => { generation++; emit('busy', false) }) border-bottom: 2px solid transparent; background: transparent; font: inherit; - font-size: 13px; + font-size: var(--app-text-md); line-height: 1.2; color: var(--td-text-color-secondary); cursor: pointer; @@ -258,7 +258,7 @@ onBeforeUnmount(() => { generation++; emit('busy', false) }) .tool-detail__desc { margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.65; color: var(--td-text-color-secondary); white-space: pre-wrap; @@ -267,7 +267,7 @@ onBeforeUnmount(() => { generation++; emit('busy', false) }) .tool-detail__empty { margin: 0; - font-size: 12px; + font-size: var(--app-text-sm); color: var(--td-text-color-placeholder); } @@ -293,7 +293,7 @@ onBeforeUnmount(() => { generation++; emit('busy', false) }) } .tool-detail__param-title span { - font-size: 11px; + font-size: var(--app-text-xs); color: var(--td-text-color-secondary); } @@ -303,7 +303,7 @@ onBeforeUnmount(() => { generation++; emit('busy', false) }) .tool-detail__param p { margin: 4px 0 0; - font-size: 12px; + font-size: var(--app-text-sm); line-height: 1.5; color: var(--td-text-color-secondary); white-space: pre-wrap; diff --git a/frontend/src/views/settings/modelUsageDetails.test.ts b/frontend/src/views/settings/modelUsageDetails.test.ts index 48f4f4b2..c11720e1 100644 --- a/frontend/src/views/settings/modelUsageDetails.test.ts +++ b/frontend/src/views/settings/modelUsageDetails.test.ts @@ -35,9 +35,10 @@ test('referenced knowledge bases and agents open their relevant configuration pa /editingAgent\.value\?\.id === agent\.id[\s\S]*focusAgentEditorSection\(requestedSection\)[\s\S]*editorVisible\.value = false\s*await nextTick\(\)\s*if \(generation !== editOpenGeneration\) return[\s\S]*editorVisible\.value = true/, ) assert.match(agentListSource, /const agent = resolveAgentForEdit\([\s\S]*if \(!agent\) return[\s\S]*router\.replace/) - assert.match(agentEditorSource, /v-if="editorInitializing"[\s\S]*:disabled="editorInitializing"/) + // 加载遮罩由 SettingsModalShell 的 :loading 渲染(旧写法是模板内 v-if),两种都接受 + assert.match(agentEditorSource, /(?:v-if|:loading)="editorInitializing"[\s\S]*:disabled="editorInitializing"/) assert.match(agentEditorSource, /generation !== editorInitializationGeneration \|\| !props\.visible/) - assert.match(knowledgeBaseEditorSource, /v-if="loading"[\s\S]*:disabled="loading"/) + assert.match(knowledgeBaseEditorSource, /(?:v-if|:loading)="loading"[\s\S]*:disabled="loading"/) assert.match(knowledgeBaseEditorSource, /isCurrentKBLoad\(generation, kbId\)/) assert.match(knowledgeBaseEditorSource, /generation !== kbEditorLoadGeneration \|\| !props\.visible/) assert.match(knowledgeBaseEditorSource, /setTimeout\(\(\) => \{\s*if \(props\.visible\) return\s*resetState\(\)/) diff --git a/frontend/src/views/system/CreateUserDialog.vue b/frontend/src/views/system/CreateUserDialog.vue index 181dd47e..24250b0f 100644 --- a/frontend/src/views/system/CreateUserDialog.vue +++ b/frontend/src/views/system/CreateUserDialog.vue @@ -15,7 +15,7 @@ -->