From d2dbf7209963f0a9f6fafb70358ef9baec999aa3 Mon Sep 17 00:00:00 2001 From: lyingbug Date: Sun, 11 Oct 2026 15:01:12 +0800 Subject: [PATCH] style: polish sidebar, list pages, toolbox and citation UI (#4154) * Compact and align collapsed sidebar icons * Unify chat composer control sizing and styling * Polish sidebar, list pages, toolbox and citation popover styling * Update tests for compact sidebar and borderless citation pills --- frontend/src/assets/theme/theme.css | 4 + frontend/src/components/ChatCitationFloat.vue | 28 ++- .../components/Input-field.browser.test.mjs | 12 +- frontend/src/components/Input-field.vue | 106 +++++------ .../src/components/ResourceListToolbar.vue | 10 +- .../src/components/ResourceSortControl.vue | 50 ++---- frontend/src/components/UserMenu.vue | 6 +- .../src/components/css/chat-citations.less | 167 ++++++++++-------- .../components/css/chat-citations.test.mjs | 14 -- .../src/components/css/resource-card.less | 10 +- frontend/src/components/menu.vue | 98 ++++++---- frontend/src/i18n/locales/ko-KR.ts | 2 +- frontend/src/i18n/locales/zh-CN.ts | 2 +- frontend/src/i18n/locales/zh-TW.ts | 2 +- frontend/src/stores/uiSidebar.test.ts | 3 +- frontend/src/utils/sidebarWidth.ts | 2 +- frontend/src/views/agent/AgentList.vue | 66 ++----- .../src/views/artifacts/ArtifactLibrary.vue | 15 +- .../src/views/knowledge/KnowledgeBaseList.vue | 70 +++----- .../knowledge/components/KbTypeAvatar.vue | 34 ++++ .../src/views/knowledge/wiki/WikiBrowser.vue | 2 + .../views/organization/OrganizationList.vue | 49 +---- frontend/src/views/settings/McpSettings.vue | 24 +-- frontend/src/views/settings/SkillSettings.vue | 73 +++++--- frontend/src/views/toolbox/Toolbox.vue | 97 ++++++---- 25 files changed, 497 insertions(+), 449 deletions(-) delete mode 100644 frontend/src/components/css/chat-citations.test.mjs create mode 100644 frontend/src/views/knowledge/components/KbTypeAvatar.vue diff --git a/frontend/src/assets/theme/theme.css b/frontend/src/assets/theme/theme.css index 8da37b80..678ebd63 100644 --- a/frontend/src/assets/theme/theme.css +++ b/frontend/src/assets/theme/theme.css @@ -212,9 +212,13 @@ select:-webkit-autofill { /* 应用级强调色:智能体 / 图谱等「非品牌但反复出现」的语义色,透明叠加请用 color-mix */ :root { --app-accent-purple: #7c4dff; + --app-accent-blue: #2f6bff; + --app-accent-teal: #0f8f83; } :root[theme-mode="dark"] { --app-accent-purple: #9d7cff; + --app-accent-blue: #6f9bff; + --app-accent-teal: #3cc4b4; } /* 引用原文定位:纸面荧光笔色,文字与整块区域使用不同强度。 */ diff --git a/frontend/src/components/ChatCitationFloat.vue b/frontend/src/components/ChatCitationFloat.vue index 60086d88..038e5051 100644 --- a/frontend/src/components/ChatCitationFloat.vue +++ b/frontend/src/components/ChatCitationFloat.vue @@ -1,28 +1,35 @@ diff --git a/frontend/src/views/knowledge/wiki/WikiBrowser.vue b/frontend/src/views/knowledge/wiki/WikiBrowser.vue index 9b0bdc76..b6022a3e 100644 --- a/frontend/src/views/knowledge/wiki/WikiBrowser.vue +++ b/frontend/src/views/knowledge/wiki/WikiBrowser.vue @@ -6520,6 +6520,8 @@ span.graph-focus-name { } .graph-unlinked-toggle { + margin: 0; + padding: 0; border: 0; background: transparent; font: inherit; diff --git a/frontend/src/views/organization/OrganizationList.vue b/frontend/src/views/organization/OrganizationList.vue index ab1ec6fa..5e7b7280 100644 --- a/frontend/src/views/organization/OrganizationList.vue +++ b/frontend/src/views/organization/OrganizationList.vue @@ -123,7 +123,7 @@
-
+
{{ org.description || $t('organization.noDescription') }}
@@ -1249,47 +1249,14 @@ watch(keyword, () => { collapsedOrgSections.value = new Set() }) line-height: 1; } - &.stat-member { - background: color-mix(in srgb, var(--td-text-color-secondary) 8%, transparent); - color: var(--td-text-color-secondary); + &.stat-kb .t-icon { color: var(--td-brand-color); } - .t-icon { - color: var(--td-text-color-secondary); - } - - &:hover { - background: color-mix(in srgb, var(--td-text-color-secondary) 12%, transparent); - } - } - - &.stat-kb { - background: var(--td-bg-color-secondarycontainer); - color: var(--td-text-color-secondary); - - .t-icon { - color: var(--td-text-color-secondary); - } - - &:hover { - background: var(--td-bg-color-container-hover); - } - } - - &.stat-agent { - background: color-mix(in srgb, var(--app-accent-purple) 8%, transparent); - color: var(--td-brand-color); - - .stat-agent-icon { - width: 14px; - height: 14px; - flex-shrink: 0; - /* 将绿色 icon 着色为紫色,与标签统一 */ - filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(236deg); - } - - &:hover { - background: color-mix(in srgb, var(--app-accent-purple) 12%, transparent); - } + .stat-agent-icon { + width: 14px; + height: 14px; + flex-shrink: 0; + /* 将绿色 icon 着色为紫色,与智能体能力色一致 */ + filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(236deg); } } diff --git a/frontend/src/views/settings/McpSettings.vue b/frontend/src/views/settings/McpSettings.vue index 7d0e1f74..a6efcce8 100644 --- a/frontend/src/views/settings/McpSettings.vue +++ b/frontend/src/views/settings/McpSettings.vue @@ -12,10 +12,12 @@