From 91933bbd19e88b1c174ff2c0158a7d4062674813 Mon Sep 17 00:00:00 2001 From: Anima Date: Sat, 14 Mar 2026 20:45:55 +0800 Subject: [PATCH] perf: webui theme color improvement (#6263) * fix: update scrollbar styles to follow theme variables * fix: update theme colors to use CSS variables for consistency * fix: change login button color to primary for better visibility * fix: update theme colors for Dark and Light themes; change login button color to secondary * fix: update border and theme colors for consistency in DarkTheme * fix: update sidebar list class to conditionally hide scrollbar in mini sidebar mode * fix: simplify button visibility logic and remove unnecessary leftPadding style * fix: refactor language switcher to use grouped menu for better UX * fix: update theme colors to use primary color for consistency across components * fix: add preview text for template output in multiple languages --- dashboard/src/components/chat/ChatInput.vue | 22 +-- .../components/chat/ConversationSidebar.vue | 170 ++++++++++++++---- .../chat/message_list_comps/RefNode.vue | 13 +- .../components/shared/LanguageSwitcher.vue | 9 +- dashboard/src/components/shared/Logo.vue | 5 +- .../src/components/shared/StyledMenu.vue | 32 ++-- .../src/i18n/locales/en-US/core/shared.json | 1 + .../src/i18n/locales/ru-RU/core/shared.json | 1 + .../src/i18n/locales/zh-CN/core/shared.json | 1 + .../full/vertical-header/VerticalHeader.vue | 90 +++++++--- .../full/vertical-sidebar/VerticalSidebar.vue | 2 +- .../src/scss/components/_VScrollbar.scss | 81 +++------ dashboard/src/scss/layout/_sidebar.scss | 15 +- dashboard/src/theme/DarkTheme.ts | 18 +- dashboard/src/theme/LightTheme.ts | 8 +- .../views/authentication/auth/LoginPage.vue | 4 +- 16 files changed, 288 insertions(+), 184 deletions(-) diff --git a/dashboard/src/components/chat/ChatInput.vue b/dashboard/src/components/chat/ChatInput.vue index 87cc82c66..d2d9c4b88 100644 --- a/dashboard/src/components/chat/ChatInput.vue +++ b/dashboard/src/components/chat/ChatInput.vue @@ -15,7 +15,7 @@
- mdi-cloud-upload + mdi-cloud-upload {{ tm('input.dropToUpload') }}
@@ -41,7 +41,7 @@ @@ -87,7 +87,7 @@ {{ tm('voice.liveMode') }} --> - @@ -95,13 +95,13 @@ {{ isRecording ? tm('voice.speaking') : tm('voice.startRecording') }} - + {{ tm('input.stopGenerating') }} - @@ -117,7 +117,7 @@
- + {{ tm('voice.recording') }} @@ -126,7 +126,7 @@
- + {{ file.original_name }} @@ -399,8 +399,8 @@ defineExpose({ left: 0; right: 0; bottom: 0; - background-color: rgba(103, 58, 183, 0.15); - border: 2px dashed rgba(103, 58, 183, 0.5); + background-color: rgba(var(--v-theme-primary), 0.12); + border: 2px dashed rgba(var(--v-theme-primary), 0.45); border-radius: 24px; display: flex; align-items: center; @@ -419,7 +419,7 @@ defineExpose({ .drop-text { font-size: 16px; font-weight: 500; - color: #673ab7; + color: rgb(var(--v-theme-primary)); } /* Fade transition for drop overlay */ @@ -439,7 +439,7 @@ defineExpose({ justify-content: space-between; padding: 8px 16px; margin: 8px 8px 0 8px; - background-color: rgba(103, 58, 183, 0.06); + background-color: rgba(var(--v-theme-primary), 0.06); border-radius: 12px; gap: 8px; max-height: 500px; diff --git a/dashboard/src/components/chat/ConversationSidebar.vue b/dashboard/src/components/chat/ConversationSidebar.vue index 01a5fccfb..37dee4041 100644 --- a/dashboard/src/components/chat/ConversationSidebar.vue +++ b/dashboard/src/components/chat/ConversationSidebar.vue @@ -5,7 +5,7 @@ 'mobile-sidebar-open': isMobile && mobileMenuOpen, 'mobile-sidebar': isMobile }" - :style="{ 'background-color': isDark ? sidebarCollapsed ? '#1e1e1e' : '#2d2d2d' : sidebarCollapsed ? '#ffffff' : '#f1f4f9' }"> + :style="{ backgroundColor: sidebarCollapsed && !isMobile ? 'rgb(var(--v-theme-surface))' : 'rgb(var(--v-theme-mcpCardBg))' }">