From c77cef5a69037d58ab24615bd86e7b34ab06cb1a Mon Sep 17 00:00:00 2001 From: wizardchen Date: Thu, 7 May 2026 21:00:20 +0800 Subject: [PATCH] feat(frontend): unify external doc-link style and outline add buttons - Add global .doc-link utility in theme.css (brand color text + link icon, underline on hover). - Convert all external doc/console links across settings to use .doc-link with a trailing , matching the Ollama browse-library style. - Switch primary section-toolbar 'Add X' buttons (Model/WebSearch/VectorStore/MCP/DataSource) to outline variant for a lighter, more consistent look. - Drop redundant per-component CSS for builtin-hint-link, weknoracloud-hint-link, engine-doc-link, engine-link, hint-link, section-doc-link, ds-doc-link-inline, model-link, etc. --- frontend/src/assets/theme/theme.css | 19 +++++++++ frontend/src/components/IMChannelPanel.vue | 41 +++++++------------ frontend/src/components/ModelEditorDialog.vue | 15 +++---- frontend/src/views/agent/AgentEditorModal.vue | 23 ++--------- .../settings/DataSourceEditorDialog.vue | 19 ++++----- .../knowledge/settings/DataSourceSettings.vue | 2 +- frontend/src/views/settings/ApiInfo.vue | 16 -------- frontend/src/views/settings/McpSettings.vue | 4 +- frontend/src/views/settings/ModelSettings.vue | 18 ++------ .../src/views/settings/OllamaSettings.vue | 20 +-------- .../views/settings/ParserEngineSettings.vue | 17 +++----- .../views/settings/StorageEngineSettings.vue | 24 ++++------- .../views/settings/VectorStoreSettings.vue | 2 +- .../views/settings/WeKnoraCloudSettings.vue | 17 +------- .../src/views/settings/WebSearchSettings.vue | 9 ++-- 15 files changed, 80 insertions(+), 166 deletions(-) diff --git a/frontend/src/assets/theme/theme.css b/frontend/src/assets/theme/theme.css index 85b9d5b4..78221c46 100644 --- a/frontend/src/assets/theme/theme.css +++ b/frontend/src/assets/theme/theme.css @@ -160,6 +160,25 @@ color: var(--td-text-color-anti) !important; } +/* 全局文档/外链样式:品牌色文字 + link 图标,hover 加下划线 */ +.doc-link { + display: inline-flex; + align-items: center; + gap: 4px; + font-weight: 500; + color: var(--td-brand-color); + text-decoration: none; + transition: color 0.2s ease; +} +.doc-link:hover { + color: var(--td-brand-color-active); + text-decoration: underline; +} +.doc-link .link-icon { + font-size: 12px; + flex-shrink: 0; +} + /* 覆盖浏览器自动填充的背景色(Chrome 会强制加浅蓝/浅黄底色) */ input:-webkit-autofill, input:-webkit-autofill:hover, diff --git a/frontend/src/components/IMChannelPanel.vue b/frontend/src/components/IMChannelPanel.vue index 2d1e2c09..3cead90b 100644 --- a/frontend/src/components/IMChannelPanel.vue +++ b/frontend/src/components/IMChannelPanel.vue @@ -180,9 +180,9 @@