From 4ab97486268e6baf2bc454d47429e5b102131531 Mon Sep 17 00:00:00 2001 From: Hisn00w <1415574326@qq.com> Date: Wed, 19 Nov 2025 10:47:29 +0800 Subject: [PATCH 01/12] Add dark/light theme toggle feature --- web/src/App.vue | 9 +- web/src/assets/css/App.vue | 25 ++++ web/src/assets/css/base.css | 203 +++++++++++++++++++++++++++++ web/src/components/ThemeToggle.vue | 33 +++++ web/src/layouts/AppLayout.vue | 12 +- web/src/stores/theme.js | 83 ++++++++++++ 6 files changed, 360 insertions(+), 5 deletions(-) create mode 100644 web/src/assets/css/App.vue create mode 100644 web/src/components/ThemeToggle.vue create mode 100644 web/src/stores/theme.js diff --git a/web/src/App.vue b/web/src/App.vue index 3d705f8cd..a43e3d0fa 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -1,11 +1,13 @@ diff --git a/web/src/assets/css/App.vue b/web/src/assets/css/App.vue new file mode 100644 index 000000000..a43e3d0fa --- /dev/null +++ b/web/src/assets/css/App.vue @@ -0,0 +1,25 @@ + + diff --git a/web/src/assets/css/base.css b/web/src/assets/css/base.css index 0b3d78cd5..33e621029 100644 --- a/web/src/assets/css/base.css +++ b/web/src/assets/css/base.css @@ -112,3 +112,206 @@ --min-width: 400px; } + +/* 深色模式 */ +:root.dark { + --main-1000: #e1f6fb; + --main-900: #c4eaf5; + --main-800: #a3d8e8; + --main-700: #82c3d6; + --main-600: #5faec2; + --main-500: #4a9fb8; + --main-400: #3996ae; + --main-300: #24839a; + --main-200: #046a82; + --main-100: #035065; + --main-50: #023944; + --main-40: #01151f; + --main-30: #010d14; + --main-20: #010a0f; + --main-10: #00070a; + --main-5: #000405; + --main-1: #000102; + --main-0: #000000; + + --gray-10000: #ffffff; + --gray-2000: #f8fafa; + --gray-1000: #f5f7f7; + --gray-900: #eff2f2; + --gray-800: #eef0f0; + --gray-700: #e4e6e6; + --gray-600: #d7d9d9; + --gray-500: #bdbfbf; + --gray-400: #979999; + --gray-300: #697070; + --gray-200: #4c4d4d; + --gray-150: #323333; + --gray-100: #1e1f1f; + --gray-50: #151616; + --gray-25: #0c0d0d; + --gray-10: #050505; + --gray-0: #000000; + + --main-color: #4a9fb8; + --main-bright: #5faec2; + --secondry-color: #8fa5b0; + --error-color: #ff6b6b; + --color-primary: #4a9fb8; + --color-primary-bg: #1a3a42; + --color-success: #52c41a; + --color-error: #ff4d4f; + --color-info: #3d8fff; + --color-warning: #faad14; + + /* Chart Colors - 深色模式图表颜色 */ + --chart-primary: var(--main-500); + --chart-primary-light: var(--main-600); + --chart-primary-dark: var(--main-400); + + --chart-success: #52c41a; + --chart-success-light: #73d13d; + --chart-success-dark: #389e0d; + + --chart-warning: #faad14; + --chart-warning-light: #ffc53d; + --chart-warning-dark: #d48806; + + --chart-error: #ff4d4f; + --chart-error-light: #ff7875; + --chart-error-dark: #cf1322; + + --chart-info: #1890ff; + --chart-info-light: #40a9ff; + --chart-info-dark: #096dd9; + + --chart-secondary: #722ed1; + --chart-secondary-light: #9254de; + --chart-secondary-dark: #531dab; + + --chart-accent: #13c2c2; + --chart-accent-light: #36cfc9; + --chart-accent-dark: #08979c; + + /* Stats Card Colors - 深色模式统计卡片 */ + --stats-primary-bg: #1e3a8a; + --stats-primary-color: #93c5fd; + --stats-success-bg: #14532d; + --stats-success-color: #86efac; + --stats-info-bg: #0c4a6e; + --stats-info-color: #7dd3fc; + --stats-warning-bg: #78350f; + --stats-warning-color: #fcd34d; + --stats-secondary-bg: #581c87; + --stats-secondary-color: #d8b4fe; + --stats-error-bg: #7f1d1d; + --stats-error-color: #fca5a5; + + --bg-sider: #1f1f1f; + --color-text: #ffffff; +} + +/* 深色模式全局样式 */ +:root.dark { + background-color: #141414; + color: rgba(255, 255, 255, 0.85); +} + +:root.dark body { + background-color: #141414; + color: rgba(255, 255, 255, 0.85); +} + +:root.dark #app { + background-color: #141414; + color: rgba(255, 255, 255, 0.85); +} + +:root.dark #app-router-view { + background-color: #141414; + color: rgba(255, 255, 255, 0.85); +} + +/* 深色模式下覆盖所有白色背景 */ +:root.dark .action-button, +:root.dark .database, +:root.dark .graphbase, +:root.dark .left-panel, +:root.dark .right-panel, +:root.dark .agent-card, +:root.dark .database-card, +:root.dark .setting-card { + background-color: #1f1f1f !important; + border-color: #434343 !important; +} + +/* 深色模式下的浅色背景区域 */ +:root.dark [style*="background-color: #fafafa"], +:root.dark [style*="background-color: #f5f5f5"], +:root.dark [style*="background: white"], +:root.dark [style*="background-color: #fff"] { + background-color: #262626 !important; +} + +/* 深色模式下的聊天和内容区域 */ +:root.dark .agent-view, +:root.dark .agent-view-body, +:root.dark .content, +:root.dark .chat-container, +:root.dark .message-list, +:root.dark .chat-component, +:root.dark .messages-container, +:root.dark .chat-header, +:root.dark .input-container, +:root.dark .chat { + background-color: #141414 !important; + color: rgba(255, 255, 255, 0.85) !important; +} + +/* 深色模式下的输入区域 */ +:root.dark .bottom, +:root.dark .message-input-wrapper { + background-color: #141414 !important; +} + +/* 深色模式下的消息区域 */ +:root.dark .chat-box, +:root.dark .conv-box, +:root.dark .message-bubble, +:root.dark .user-message { + background-color: #1f1f1f !important; + border-color: #434343 !important; +} + +:root.dark .assistant-message { + background-color: #262626 !important; + border-color: #434343 !important; +} + +/* 深色模式下的消息内容 */ +:root.dark .message-content, +:root.dark .markdown-body, +:root.dark .message-md, +:root.dark .md-editor-preview-wrapper, +:root.dark .md-editor-preview { + background-color: transparent !important; + color: rgba(255, 255, 255, 0.85) !important; +} + +/* 深色模式下的 markdown 编辑器 */ +:root.dark .md-editor, +:root.dark .md-editor-content { + background-color: #1f1f1f !important; + color: rgba(255, 255, 255, 0.85) !important; +} + +/* 深色模式下的代码块 */ +:root.dark pre, +:root.dark code { + background-color: #1f1f1f !important; + border-color: #434343 !important; +} + +/* 平滑过渡 */ +* { + transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; +} diff --git a/web/src/components/ThemeToggle.vue b/web/src/components/ThemeToggle.vue new file mode 100644 index 000000000..02c391f3d --- /dev/null +++ b/web/src/components/ThemeToggle.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/web/src/layouts/AppLayout.vue b/web/src/layouts/AppLayout.vue index 22358cf27..6dd024ff1 100644 --- a/web/src/layouts/AppLayout.vue +++ b/web/src/layouts/AppLayout.vue @@ -16,6 +16,7 @@ import { storeToRefs } from 'pinia' import UserInfoComponent from '@/components/UserInfoComponent.vue' import DebugComponent from '@/components/DebugComponent.vue' import TaskCenterDrawer from '@/components/TaskCenterDrawer.vue' +import ThemeToggle from '@/components/ThemeToggle.vue' const configStore = useConfigStore() const databaseStore = useDatabaseStore() @@ -169,7 +170,7 @@ const mainList = [{ - + {{ (githubStars / 1000).toFixed(1) }}k @@ -189,6 +190,11 @@ const mainList = [{ + + +
-

对话/工具调用分布 (TOP 3)

+

对话/工具调用分布

@@ -182,31 +182,11 @@ const initConversationToolChart = () => { const conversationData = props.agentStats.agent_conversation_counts || [] const toolData = props.agentStats.agent_tool_usage || [] - // 获取所有智能体ID并按对话数+工具调用数排序,取前3个 - const allAgentStats = {} - - // 统计每个智能体的总数据量(对话数 + 工具调用数) - conversationData.forEach(item => { - if (!allAgentStats[item.agent_id]) { - allAgentStats[item.agent_id] = { conversation: 0, tool: 0, total: 0 } - } - allAgentStats[item.agent_id].conversation = item.conversation_count - allAgentStats[item.agent_id].total += item.conversation_count - }) - - toolData.forEach(item => { - if (!allAgentStats[item.agent_id]) { - allAgentStats[item.agent_id] = { conversation: 0, tool: 0, total: 0 } - } - allAgentStats[item.agent_id].tool = item.tool_usage_count - allAgentStats[item.agent_id].total += item.tool_usage_count - }) - - // 按总数据量降序排序,取前3个 - const topAgentIds = Object.entries(allAgentStats) - .sort(([,a], [,b]) => b.total - a.total) - .slice(0, 3) - .map(([agentId]) => agentId) + // 获取所有智能体ID + const allAgentIds = [...new Set([ + ...conversationData.map(item => item.agent_id), + ...toolData.map(item => item.agent_id) + ])] const option = { tooltip: { @@ -236,7 +216,7 @@ const initConversationToolChart = () => { }, xAxis: { type: 'category', - data: topAgentIds, + data: allAgentIds, axisLine: { lineStyle: { color: '#e8e8e8' @@ -268,7 +248,7 @@ const initConversationToolChart = () => { { name: '对话数', type: 'bar', - data: topAgentIds.map(agentId => { + data: allAgentIds.map(agentId => { const item = conversationData.find(d => d.agent_id === agentId) return item ? item.conversation_count : 0 }), @@ -287,7 +267,7 @@ const initConversationToolChart = () => { { name: '工具调用数', type: 'bar', - data: topAgentIds.map(agentId => { + data: allAgentIds.map(agentId => { const item = toolData.find(d => d.agent_id === agentId) return item ? item.tool_usage_count : 0 }), @@ -373,4 +353,17 @@ defineExpose({ :deep(.ant-progress-bg) { transition: all 0.3s ease; } + +// 深色模式适配 +:root.dark { + .top-performers, .metrics-comparison { + h4 { + color: rgba(255, 255, 255, 0.85); + } + + h5 { + color: rgba(255, 255, 255, 0.65); + } + } +} \ No newline at end of file diff --git a/web/src/components/dashboard/FeedbackModalComponent.vue b/web/src/components/dashboard/FeedbackModalComponent.vue index 891f12f3f..c8b295340 100644 --- a/web/src/components/dashboard/FeedbackModalComponent.vue +++ b/web/src/components/dashboard/FeedbackModalComponent.vue @@ -339,6 +339,72 @@ watch(() => props.agentId, () => { } +// 深色模式适配 +:root.dark { + .feedback-cards-container { + &::-webkit-scrollbar-track { + background: #262626; + } + + &::-webkit-scrollbar-thumb { + background: #434343; + + &:hover { + background: #595959; + } + } + } + + .feedback-card { + background: #1f1f1f; + border-color: #434343; + + &:hover { + border-color: var(--main-500); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); + } + } + + .card-header { + background: #262626; + border-bottom-color: #434343; + } + + .user-details .username { + color: rgba(255, 255, 255, 0.85); + } + + .message-content { + background: #262626; + color: rgba(255, 255, 255, 0.85); + } + + .info-item { + .label { + color: rgba(255, 255, 255, 0.65); + } + + .value { + color: rgba(255, 255, 255, 0.85); + } + } + + .reason-content { + background: rgba(250, 173, 20, 0.15); + border-left-color: #faad14; + color: rgba(255, 255, 255, 0.85); + } + + .card-footer { + background: #262626; + border-top-color: #434343; + } + + .time-info { + color: rgba(255, 255, 255, 0.65); + } +} + // 响应式设计 @media (max-width: 768px) { .feedback-cards-container { diff --git a/web/src/views/AgentView.vue b/web/src/views/AgentView.vue index 786ec6cc6..47368db74 100644 --- a/web/src/views/AgentView.vue +++ b/web/src/views/AgentView.vue @@ -737,6 +737,47 @@ const handlePreview = () => { } } +// 深色模式适配 - 多选卡片 +:root.dark { + .multi-select-cards { + .multi-select-label { + color: rgba(255, 255, 255, 0.65); + } + + .option-card { + background: #262626; + border-color: #434343; + + &:hover { + border-color: var(--main-500); + } + + &.selected { + border-color: var(--main-500); + background: rgba(74, 159, 184, 0.15); + + .option-indicator { + color: var(--main-400); + } + + .option-text { + color: var(--main-400); + } + } + + &.unselected { + .option-indicator { + color: rgba(255, 255, 255, 0.45); + } + + .option-text { + color: rgba(255, 255, 255, 0.65); + } + } + } + } +} + // 智能体选择器样式 .agent-selector { border: 1px solid var(--gray-300); @@ -880,6 +921,71 @@ const handlePreview = () => { } } +// 深色模式适配 - 智能体选择器和模态框 +:root.dark { + .agent-selector { + background: #1f1f1f; + border-color: #434343; + + &:hover { + border-color: var(--main-500); + } + + .selected-agent-display { + .agent-name { + color: rgba(255, 255, 255, 0.85); + } + } + } + + .agent-modal { + :deep(.ant-modal-header) { + background: #1f1f1f; + border-bottom-color: #434343; + + .ant-modal-title { + color: rgba(255, 255, 255, 0.85); + } + } + + :deep(.ant-modal-body) { + background: #1f1f1f; + } + + .agent-modal-content { + .agent-card { + background: #262626; + border-color: #434343; + + &:hover { + border-color: var(--main-500); + } + + .agent-card-header .agent-card-title .agent-card-name { + color: rgba(255, 255, 255, 0.85); + } + + .agent-card-description { + color: rgba(255, 255, 255, 0.65); + } + + &.selected { + border-color: var(--main-500); + background: rgba(74, 159, 184, 0.15); + + .agent-card-header .agent-card-title .agent-card-name { + color: var(--main-400); + } + + .agent-card-description { + color: rgba(255, 255, 255, 0.85); + } + } + } + } + } +} + // 自定义更多菜单样式 .more-popup-menu { position: fixed; @@ -937,6 +1043,33 @@ const handlePreview = () => { } } +// 深色模式适配 +:root.dark .more-popup-menu { + background: #1f1f1f; + border-color: #434343; + box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2); + + .menu-item { + color: rgba(255, 255, 255, 0.85); + + .menu-icon { + color: rgba(255, 255, 255, 0.65); + } + + &:hover { + background: #262626; + } + + &:active { + background: #303030; + } + } + + .menu-divider { + background: #434343; + } +} + // 菜单淡入淡出动画 .menu-fade-enter-active { animation: menuSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1); diff --git a/web/src/views/DashboardView.vue b/web/src/views/DashboardView.vue index 9c852424d..df06b0ddd 100644 --- a/web/src/views/DashboardView.vue +++ b/web/src/views/DashboardView.vue @@ -696,4 +696,88 @@ onUnmounted(() => { } } } + +// 深色模式适配 +:root.dark { + .dashboard-container { + background-color: #141414; + } + + .conversations-section, + .call-stats-section { + background-color: #1f1f1f; + border-color: #434343; + + &:hover { + background-color: #1f1f1f; + border-color: #595959; + } + + :deep(.ant-card-head) { + background-color: #1f1f1f; + border-bottom-color: #434343; + + .ant-card-head-title { + color: rgba(255, 255, 255, 0.85); + } + } + + :deep(.ant-card-body) { + background-color: #1f1f1f; + } + } + + .conversations-section { + .conversation-title { + color: var(--main-400); + + &:hover { + color: var(--main-500); + } + } + + .time-text { + color: rgba(255, 255, 255, 0.65); + } + } + + .call-stats-section { + .call-stats-container { + .call-summary { + .summary-card { + background: linear-gradient(135deg, #262626 0%, #2a2a2a 100%); + border-color: #434343; + + .summary-value { + color: rgba(255, 255, 255, 0.85); + } + + .summary-label { + color: rgba(255, 255, 255, 0.65); + } + } + } + } + } + + .placeholder-content { + color: rgba(255, 255, 255, 0.65); + + .placeholder-icon { + background-color: #262626; + + .icon { + color: rgba(255, 255, 255, 0.45); + } + } + + .placeholder-text { + color: rgba(255, 255, 255, 0.85); + } + + .placeholder-subtitle { + color: rgba(255, 255, 255, 0.65); + } + } +} From 50d6467584599fa57ec1f2e12dbb6b856251fab8 Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Wed, 19 Nov 2025 20:24:04 +0800 Subject: [PATCH 06/12] =?UTF-8?q?style:=20=E6=9B=BF=E6=8D=A2=E7=A1=AC?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E9=A2=9C=E8=89=B2=E5=80=BC=E4=B8=BACSS?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E4=BB=A5=E6=94=AF=E6=8C=81=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将多处硬编码的颜色值(如#fff、#f0f0f0等)替换为CSS变量(如--gray-0、--gray-150等),统一管理颜色样式,便于主题切换和样式维护。主要修改包括背景色、边框色、文字色等视觉元素,同时移除不再需要的深色模式适配代码。 --- web/src/assets/css/base.css | 388 +---------- web/src/assets/css/sigma.css | 18 +- web/src/components/AgentChatComponent.vue | 18 - web/src/components/AgentConfigSidebar.vue | 360 +--------- web/src/components/AgentMessageComponent.vue | 2 +- .../components/AttachmentStatusIndicator.vue | 4 +- web/src/components/DebugComponent.vue | 8 +- web/src/components/FileTable.vue | 4 +- web/src/components/GraphInfoPanel.vue | 2 +- web/src/components/HeaderComponent.vue | 4 +- web/src/components/HumanApprovalModal.vue | 4 +- web/src/components/ImagePreviewComponent.vue | 2 +- web/src/components/KnowledgeBaseCard.vue | 2 +- web/src/components/KnowledgeGraphSection.vue | 2 +- web/src/components/KnowledgeGraphViewer.vue | 76 +-- web/src/components/MarkdownContentViewer.vue | 22 +- web/src/components/MessageInputComponent.vue | 6 +- web/src/components/MindMapSection.vue | 32 +- .../components/ModelProvidersComponent.vue | 28 +- web/src/components/ModelSelectorComponent.vue | 42 -- web/src/components/RefsSidebar.vue | 624 ------------------ web/src/components/SearchConfigTab.vue | 2 +- web/src/components/StatusBar.vue | 6 +- web/src/components/TaskCenterDrawer.vue | 24 +- web/src/components/UserInfoComponent.vue | 14 +- .../components/UserManagementComponent.vue | 2 +- .../dashboard/AgentStatsComponent.vue | 14 +- .../dashboard/CallStatsComponent.vue | 2 +- .../dashboard/FeedbackModalComponent.vue | 72 +- .../dashboard/ToolStatsComponent.vue | 2 +- .../dashboard/UserStatsComponent.vue | 2 +- web/src/layouts/AppLayout.vue | 74 ++- web/src/views/AgentSingleView.vue | 2 +- web/src/views/AgentView.vue | 163 +---- web/src/views/DashboardView.vue | 84 --- web/src/views/DataBaseInfoView.vue | 27 +- web/src/views/DataBaseView.vue | 30 +- web/src/views/GraphView.vue | 54 +- web/src/views/HomeView.vue | 14 +- web/src/views/LoginView.vue | 34 +- web/src/views/SettingView.vue | 2 +- 41 files changed, 304 insertions(+), 1968 deletions(-) delete mode 100644 web/src/components/RefsSidebar.vue diff --git a/web/src/assets/css/base.css b/web/src/assets/css/base.css index ec2a9c46b..55083dc50 100644 --- a/web/src/assets/css/base.css +++ b/web/src/assets/css/base.css @@ -119,6 +119,15 @@ --shadow-5: rgba(0, 0, 0, 0.20); --min-width: 400px; + + /* Ant Design 兼容变量 */ + --color-bg-container: var(--main-0); + --color-bg-elevated: var(--gray-10); + --color-text-secondary: rgba(0, 0, 0, 0.65); + --color-text-tertiary: rgba(0, 0, 0, 0.45); + --color-trans-light: rgba(255, 255, 255, 0.85); + --color-trans-dark: rgba(0, 0, 0, 0.85); + --color-border: var(--gray-200); } /* 深色模式 */ @@ -217,6 +226,13 @@ --bg-sider: #141414; --color-text: #ffffff; + /* Ant Design 兼容变量 - 深色模式 */ + --color-bg-container: #1f1f1f; + --color-bg-elevated: #262626; + --color-text-secondary: rgba(255, 255, 255, 0.65); + --color-text-tertiary: rgba(255, 255, 255, 0.45); + --color-border: #434343; + /* Shadow System - 深色模式阴影系统 */ --shadow-0: rgba(0, 0, 0, 0.1); --shadow-1: rgba(0, 0, 0, 0.2); @@ -224,376 +240,40 @@ --shadow-3: rgba(0, 0, 0, 0.4); --shadow-4: rgba(0, 0, 0, 0.5); --shadow-5: rgba(0, 0, 0, 0.6); + + + --color-trans-light: rgba(0, 0, 0, 0.85); + --color-trans-dark: rgba(255, 255, 255, 0.85); } /* 深色模式全局样式 */ :root.dark { background-color: #141414; - color: rgba(255, 255, 255, 0.85); + color: var(--color-trans-dark); } -:root.dark body { - background-color: #141414; - color: rgba(255, 255, 255, 0.85); +/* md-editor - 深色模式 */ +:root.dark .md-editor { + background-color: var(--gray-0); } -:root.dark #app { - background-color: #141414; - color: rgba(255, 255, 255, 0.85); +/* 覆盖 Ant Design 全局样式 */ +:root.dark .ant-tag { + background-color: var(--gray-50); + border-color: currentColor; } -:root.dark #app-router-view { +:root.dark body { background-color: #141414; - color: rgba(255, 255, 255, 0.85); -} - -/* 深色模式下的卡片和面板 */ -:root.dark .left-panel, -:root.dark .right-panel { - background-color: #1f1f1f; - border-color: #434343; -} - -/* 深色模式下的浅色背景区域 */ -:root.dark [style*="background-color: #fafafa"], -:root.dark [style*="background-color: #f5f5f5"], -:root.dark [style*="background: white"], -:root.dark [style*="background-color: #fff"] { - background-color: #262626 !important; + color: var(--color-trans-dark); } -/* 深色模式下的聊天和内容区域 */ -:root.dark .agent-view, -:root.dark .agent-view-body, -:root.dark .content { +:root.dark #app { background-color: #141414; - color: rgba(255, 255, 255, 0.85); + color: var(--color-trans-dark); } -/* 深色模式下的输入区域 */ -:root.dark .message-input-wrapper { +:root.dark #app-router-view { background-color: #141414; -} - -/* 深色模式下的输入框 */ -:root.dark .input-box { - background-color: #1f1f1f !important; - border-color: #434343 !important; - box-shadow: 0 2px 12px var(--shadow-2) !important; -} - -:root.dark .input-box .user-input { - background-color: transparent !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -:root.dark .input-box .user-input::placeholder { - color: rgba(255, 255, 255, 0.45) !important; -} - -/* 深色模式下的消息区域 */ -:root.dark .chat-box, -:root.dark .conv-box, -:root.dark .message-bubble, -:root.dark .user-message { - background-color: #1f1f1f !important; - border-color: #434343 !important; -} - -:root.dark .assistant-message { - background-color: #262626 !important; - border-color: #434343 !important; -} - -/* 深色模式下的消息内容 */ -:root.dark .message-content, -:root.dark .markdown-body, -:root.dark .message-md, -:root.dark .md-editor-preview-wrapper, -:root.dark .md-editor-preview { - background-color: transparent !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -/* 深色模式下的 markdown 编辑器 */ -:root.dark .md-editor, -:root.dark .md-editor-content { - background-color: #1f1f1f !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -/* 深色模式下的代码块 */ -:root.dark pre, -:root.dark code { - background-color: #1f1f1f !important; - border-color: #434343 !important; -} - -/* 深色模式下的设置页面 */ -:root.dark .setting-view, -:root.dark .setting-container, -:root.dark .setting { - background-color: #141414 !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -:root.dark .setting-view .card, -:root.dark .setting-view .service-link-card { - background-color: #1f1f1f !important; - border-color: #434343 !important; -} - -:root.dark .setting-view .card:hover, -:root.dark .setting-view .service-link-card:hover { - box-shadow: 0 1px 8px var(--shadow-2) !important; -} - -:root.dark .setting-view .sider { - background-color: #141414 !important; - border-color: #434343 !important; -} - -/* 深色模式下的图表组件 */ -:root.dark .graph-container, -:root.dark .graph-canvas-container { - background-color: #141414 !important; -} - -:root.dark .status-wrapper { - color: rgba(255, 255, 255, 0.65) !important; -} - -/* 深色模式下的配置侧边栏 */ -:root.dark .agent-config-sidebar { - background-color: #1f1f1f !important; - border-color: #434343 !important; -} - -:root.dark .agent-config-sidebar .sidebar-header, -:root.dark .agent-config-sidebar .sidebar-content, -:root.dark .agent-config-sidebar .config-section { - background-color: #1f1f1f !important; -} - -:root.dark .agent-config-sidebar .config-card, -:root.dark .agent-config-sidebar .model-card { - background-color: #141414 !important; - border-color: #434343 !important; -} - -:root.dark .agent-config-sidebar .ant-btn, -:root.dark .agent-config-sidebar button { - background-color: #141414 !important; - border-color: #434343 !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -:root.dark .agent-config-sidebar .ant-btn-primary { - background-color: var(--color-primary) !important; - border-color: var(--color-primary) !important; - color: #ffffff !important; -} - -/* 深色模式下的通用文本颜色 - 排除图谱容器,避免影响 G6 渲染 */ -:root.dark h1:not(.graph-canvas *), -:root.dark h2:not(.graph-canvas *), -:root.dark h3:not(.graph-canvas *), -:root.dark h4:not(.graph-canvas *), -:root.dark h5:not(.graph-canvas *), -:root.dark h6:not(.graph-canvas *), -:root.dark p:not(.graph-canvas *), -:root.dark span:not(.graph-canvas *), -:root.dark div:not(.graph-canvas *), -:root.dark label:not(.graph-canvas *), -:root.dark a:not(.graph-canvas *) { - color: rgba(255, 255, 255, 0.85); -} - -/* 深色模式下的次要文本 */ -:root.dark .text-secondary, -:root.dark .ant-typography-secondary { - color: rgba(255, 255, 255, 0.65) !important; -} - -/* 深色模式下的禁用文本 */ -:root.dark .text-disabled, -:root.dark .ant-typography-disabled { - color: rgba(255, 255, 255, 0.45) !important; -} - -/* 深色模式下的输入框 */ -:root.dark input, -:root.dark textarea, -:root.dark .ant-input, -:root.dark .ant-input-affix-wrapper { - background-color: #1f1f1f !important; - border-color: #434343 !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -:root.dark input::placeholder, -:root.dark textarea::placeholder, -:root.dark .ant-input::placeholder { - color: rgba(255, 255, 255, 0.45) !important; -} - -/* 深色模式下的按钮 */ -:root.dark .ant-btn-default { - background-color: #1f1f1f !important; - border-color: #434343 !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -:root.dark .ant-btn-default:hover { - background-color: #262626 !important; - border-color: #4a9fb8 !important; - color: #4a9fb8 !important; -} - -/* 深色模式下的卡片 */ -:root.dark .ant-card { - background-color: #1f1f1f !important; - border-color: #434343 !important; -} - -:root.dark .ant-card-head { - background-color: #1f1f1f !important; - border-color: #434343 !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -:root.dark .ant-card-body { - background-color: #1f1f1f !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -/* 深色模式下的表格 */ -:root.dark .ant-table { - background-color: #1f1f1f !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -:root.dark .ant-table-thead > tr > th { - background-color: #262626 !important; - border-color: #434343 !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -:root.dark .ant-table-tbody > tr > td { - border-color: #434343 !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -:root.dark .ant-table-tbody > tr:hover > td { - background-color: #262626 !important; -} - -/* 深色模式下的模态框 */ -:root.dark .ant-modal-content { - background-color: #1f1f1f !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -:root.dark .ant-modal-header { - background-color: #1f1f1f !important; - border-color: #434343 !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -:root.dark .ant-modal-footer { - background-color: #1f1f1f !important; - border-color: #434343 !important; -} - -/* 深色模式下的下拉菜单 */ -:root.dark .ant-dropdown-menu { - background-color: #1f1f1f !important; - border-color: #434343 !important; -} - -:root.dark .ant-dropdown-menu-item { - color: rgba(255, 255, 255, 0.85) !important; -} - -:root.dark .ant-dropdown-menu-item:hover { - background-color: #262626 !important; -} - -/* 深色模式下的选择器 */ -:root.dark .ant-select-selector { - background-color: #1f1f1f !important; - border-color: #434343 !important; - color: rgba(255, 255, 255, 0.85) !important; -} - -:root.dark .ant-select-dropdown { - background-color: #1f1f1f !important; - border-color: #434343 !important; -} - -:root.dark .ant-select-item { - color: rgba(255, 255, 255, 0.85) !important; -} - -:root.dark .ant-select-item-option-selected { - background-color: #262626 !important; -} - -:root.dark .ant-select-item-option-active { - background-color: #262626 !important; -} - -/* 深色模式下的标签 */ -:root.dark .ant-tag { - border-color: #434343 !important; -} - -/* 预设颜色标签在深色模式下的适配 */ -:root.dark .ant-tag-blue { - background-color: rgba(61, 143, 255, 0.18) !important; - border-color: var(--color-info) !important; - color: rgba(255, 255, 255, 0.9) !important; -} - -:root.dark .ant-tag-green { - background-color: rgba(82, 196, 26, 0.22) !important; - border-color: var(--color-success) !important; - color: rgba(255, 255, 255, 0.9) !important; -} - -:root.dark .ant-tag-red { - background-color: rgba(255, 77, 79, 0.22) !important; - border-color: var(--color-error) !important; - color: rgba(255, 255, 255, 0.9) !important; -} - -/* 深色模式下的分割线 */ -:root.dark .ant-divider { - border-color: #434343 !important; -} - -/* 深色模式下的空状态 */ -:root.dark .ant-empty-description { - color: rgba(255, 255, 255, 0.65) !important; -} - -/* 深色模式下的图谱相关组件 - 已禁用,改为在 GraphView.vue 中单独控制 */ -/* :root.dark .graph-container, -:root.dark .graph-section, -:root.dark .container-outter { - background-color: #141414 !important; - color: rgba(255, 255, 255, 0.85) !important; -} */ - -/* 深色模式下的操作按钮区域 */ -:root.dark .actions, -:root.dark .actions-left, -:root.dark .actions-right, -:root.dark .footer { - color: rgba(255, 255, 255, 0.85) !important; -} - -/* 平滑过渡 - 移除 color transition,防止 Canvas 读取中间态颜色 */ -*:not(.graph-canvas):not(.graph-canvas *) { - transition: background-color 0.3s ease, border-color 0.3s ease; + color: var(--color-trans-dark); } diff --git a/web/src/assets/css/sigma.css b/web/src/assets/css/sigma.css index ec73888e8..8e4ee98de 100644 --- a/web/src/assets/css/sigma.css +++ b/web/src/assets/css/sigma.css @@ -3,7 +3,7 @@ position: relative; width: 100%; height: 100%; - background: #fafafa; + background: var(--gray-25); } .sigma-container canvas { @@ -22,34 +22,34 @@ /* 高亮样式 */ .node-highlighted { - stroke: #ff0000 !important; + stroke: var(--color-error) !important; stroke-width: 3px !important; } .edge-highlighted { - stroke: #ff0000 !important; + stroke: var(--color-error) !important; stroke-width: 3px !important; } /* 选中样式 */ .node-selected { - stroke: #1890ff !important; + stroke: var(--color-info) !important; stroke-width: 4px !important; } .edge-selected { - stroke: #1890ff !important; + stroke: var(--color-info) !important; stroke-width: 4px !important; } /* 悬停样式 */ .node-focused { - stroke: #52c41a !important; + stroke: var(--color-success) !important; stroke-width: 2px !important; } .edge-focused { - stroke: #52c41a !important; + stroke: var(--color-success) !important; stroke-width: 2px !important; } @@ -65,8 +65,8 @@ /* 工具提示 */ .sigma-tooltip { position: absolute; - background: rgba(0, 0, 0, 0.8); - color: white; + background: var(--shadow-5); + color: var(--gray-0); padding: 8px 12px; border-radius: 4px; font-size: 12px; diff --git a/web/src/components/AgentChatComponent.vue b/web/src/components/AgentChatComponent.vue index 43501b980..2a547ec0a 100644 --- a/web/src/components/AgentChatComponent.vue +++ b/web/src/components/AgentChatComponent.vue @@ -1875,24 +1875,6 @@ watch(conversations, () => { } } -/* 深色模式适配 */ -:root.dark .agent-nav-btn { - color: rgba(255, 255, 255, 0.85); - - &:hover:not(.is-disabled) { - background-color: #262626; - } - - &.agent-state-btn.has-content { - color: var(--main-500); - - &:hover:not(.is-disabled) { - color: var(--main-400); - background-color: rgba(74, 159, 184, 0.15); - } - } -} - @keyframes spin { from { transform: rotate(0deg); diff --git a/web/src/components/AgentConfigSidebar.vue b/web/src/components/AgentConfigSidebar.vue index 2c0ae6fc5..0af27ec2b 100644 --- a/web/src/components/AgentConfigSidebar.vue +++ b/web/src/components/AgentConfigSidebar.vue @@ -592,7 +592,7 @@ watch(() => props.isOpen, (newVal) => { align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--gray-200); - background: #fff; + background: var(--gray-0); flex-shrink: 0; min-width: 400px; @@ -645,7 +645,7 @@ watch(() => props.isOpen, (newVal) => { bottom: 0px; padding: 12px 0; border-top: 1px solid var(--gray-100); - background: #fff; + background: var(--gray-0); // min-width: 400px; z-index: 10; @@ -664,7 +664,7 @@ watch(() => props.isOpen, (newVal) => { &.changed { background-color: var(--main-color); - color: #fff; + color: var(--gray-0); } &:hover { @@ -972,7 +972,7 @@ watch(() => props.isOpen, (newVal) => { height: 36px; font-size: 14px; transition: all 0.2s ease; - background: white; + background: var(--gray-0); .search-icon { color: var(--gray-500); @@ -1002,7 +1002,7 @@ watch(() => props.isOpen, (newVal) => { overflow-y: auto; border-radius: 8px; margin-bottom: 16px; - background: white; + background: var(--gray-0); // 在小屏幕下调整为单列布局 @media (max-width: 480px) { @@ -1034,7 +1034,7 @@ watch(() => props.isOpen, (newVal) => { transition: all 0.2s ease; border-radius: 8px; margin-bottom: 4px; - background: white; + background: var(--gray-0); border: 1px solid var(--gray-200); &:hover { @@ -1129,7 +1129,7 @@ watch(() => props.isOpen, (newVal) => { &.ant-btn-default { border: 1px solid var(--gray-300); color: var(--gray-700); - background: white; + background: var(--gray-0); &:hover { border-color: var(--main-color); @@ -1140,7 +1140,7 @@ watch(() => props.isOpen, (newVal) => { &.ant-btn-primary { background: var(--main-color); border: none; - color: white; + color: var(--gray-0); &:hover { background: var(--main-color); @@ -1159,348 +1159,4 @@ watch(() => props.isOpen, (newVal) => { width: 100vw; } } - -// 深色模式适配 -:root.dark { - .agent-config-sidebar { - background: #1f1f1f; - border-left-color: #434343; - - .sidebar-header { - background: #1f1f1f; - border-bottom-color: #434343; - - .sidebar-title { - color: rgba(255, 255, 255, 0.85); - - .title-icon { - color: var(--main-500); - } - } - - .close-btn { - color: rgba(255, 255, 255, 0.65); - - &:hover { - color: rgba(255, 255, 255, 0.85); - background: #262626; - } - } - } - - .sidebar-content { - .agent-info { - .agent-basic-info { - .agent-description { - color: rgba(255, 255, 255, 0.65); - } - } - } - - .sidebar-footer { - background: #1f1f1f; - border-top-color: #434343; - - .form-actions { - .save-btn { - background-color: #262626; - color: rgba(255, 255, 255, 0.85); - - &.changed { - background-color: var(--main-500); - color: #fff; - } - - &:hover { - opacity: 0.9; - } - } - - .reset-btn { - border-color: #434343; - color: rgba(255, 255, 255, 0.85); - background: #262626; - - &:hover { - border-color: var(--main-500); - color: var(--main-400); - } - } - } - } - - .config-form-content { - .config-form { - .config-item { - .config-description { - color: rgba(255, 255, 255, 0.65); - } - - .system-prompt-input { - background: #262626; - border-color: #434343; - color: rgba(255, 255, 255, 0.85); - - &::placeholder { - color: rgba(255, 255, 255, 0.45); - } - } - - .system-prompt-display { - background: #262626; - border-color: #434343; - - &:hover { - border-color: var(--main-500); - background: #2a2a2a; - } - - .system-prompt-content { - color: rgba(255, 255, 255, 0.85); - - &.is-placeholder { - color: rgba(255, 255, 255, 0.45); - } - } - - .edit-hint { - color: rgba(255, 255, 255, 0.65); - background: rgba(31, 31, 31, 0.9); - } - } - } - } - } - } - } - - // 工具选择器深色模式 - .tools-selector { - .tools-summary { - background: #262626; - border-color: #434343; - - .tools-summary-info { - color: rgba(255, 255, 255, 0.85); - - .tools-count { - color: rgba(255, 255, 255, 0.85); - } - } - - .select-tools-btn { - background: var(--main-500); - - &:hover { - background: var(--main-500); - } - } - } - - .selected-tools-preview { - .tool-tag { - background: #262626; - border-color: #434343; - color: rgba(255, 255, 255, 0.85); - - :deep(.anticon-close) { - color: rgba(255, 255, 255, 0.65); - - &:hover { - color: rgba(255, 255, 255, 0.85); - } - } - } - } - } - - // 多选卡片深色模式 - .multi-select-cards { - .multi-select-label { - color: rgba(255, 255, 255, 0.65); - } - - .option-card { - background: #262626; - border-color: #434343; - - &:hover { - border-color: var(--main-500); - } - - &.selected { - border-color: var(--main-500); - background: rgba(74, 159, 184, 0.15); - - .option-indicator { - color: var(--main-400); - } - - .option-text { - color: var(--main-400); - } - } - - &.unselected { - .option-indicator { - color: rgba(255, 255, 255, 0.45); - } - - .option-text { - color: rgba(255, 255, 255, 0.65); - } - } - } - } - - // 工具选择弹窗深色模式 - .tools-modal { - :deep(.ant-modal-content) { - background: #1f1f1f; - border-color: #434343; - } - - :deep(.ant-modal-header) { - background: #1f1f1f; - border-bottom-color: #434343; - - .ant-modal-title { - color: rgba(255, 255, 255, 0.85); - } - } - - :deep(.ant-modal-body) { - background: #1f1f1f; - } - - .tools-modal-content { - .tools-search { - .search-input { - background: #262626; - border-color: #434343; - color: rgba(255, 255, 255, 0.85); - - :deep(input) { - background: transparent; - color: rgba(255, 255, 255, 0.85); - - &::placeholder { - color: rgba(255, 255, 255, 0.45); - } - } - - .search-icon { - color: rgba(255, 255, 255, 0.65); - } - - &:focus-within { - border-color: var(--main-500); - - .search-icon { - color: var(--main-400); - } - } - - &:hover { - border-color: #595959; - } - } - } - - .tools-list { - background: #1f1f1f; - - &::-webkit-scrollbar-track { - background: #262626; - } - - &::-webkit-scrollbar-thumb { - background: #434343; - - &:hover { - background: #595959; - } - } - - .tool-item { - background: #262626; - border-color: #434343; - - &:hover { - border-color: #595959; - background: #2a2a2a; - } - - .tool-content { - .tool-header { - .tool-name { - color: rgba(255, 255, 255, 0.85); - } - - .tool-indicator { - color: rgba(255, 255, 255, 0.45); - } - } - - .tool-description { - color: rgba(255, 255, 255, 0.65); - } - } - - &.selected { - background: rgba(74, 159, 184, 0.15); - border-color: var(--main-500); - - .tool-content { - .tool-name { - color: var(--main-400); - } - - .tool-indicator { - color: var(--main-400); - } - - .tool-description { - color: rgba(255, 255, 255, 0.85); - } - } - } - } - } - - .tools-modal-footer { - border-top-color: #434343; - - .selected-count { - background: #262626; - border-color: #434343; - color: rgba(255, 255, 255, 0.85); - } - - .modal-actions { - :deep(.ant-btn) { - &.ant-btn-default { - background: #262626; - border-color: #434343; - color: rgba(255, 255, 255, 0.85); - - &:hover { - border-color: var(--main-500); - color: var(--main-400); - } - } - - &.ant-btn-primary { - background: var(--main-500); - - &:hover { - background: var(--main-500); - } - } - } - } - } - } - } -} diff --git a/web/src/components/AgentMessageComponent.vue b/web/src/components/AgentMessageComponent.vue index 42adc209f..d74f6df2b 100644 --- a/web/src/components/AgentMessageComponent.vue +++ b/web/src/components/AgentMessageComponent.vue @@ -247,7 +247,7 @@ const toggleToolCall = (toolCallId) => { font-size: 15px; line-height: 24px; box-sizing: border-box; - color: black; + color: var(--gray-10000); max-width: 100%; position: relative; letter-spacing: .25px; diff --git a/web/src/components/AttachmentStatusIndicator.vue b/web/src/components/AttachmentStatusIndicator.vue index f165eca4f..50da13573 100644 --- a/web/src/components/AttachmentStatusIndicator.vue +++ b/web/src/components/AttachmentStatusIndicator.vue @@ -159,7 +159,7 @@ const handleRemoveAttachment = (fileId) => { top: -4px; right: -4px; background-color: var(--main-500); - color: white; + color: var(--gray-0); border-radius: 10px; width: 18px; height: 18px; @@ -168,7 +168,7 @@ const handleRemoveAttachment = (fileId) => { align-items: center; justify-content: center; font-weight: 600; - border: 2px solid white; + border: 2px solid var(--gray-0); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } } diff --git a/web/src/components/DebugComponent.vue b/web/src/components/DebugComponent.vue index 32a3d364a..a4a2d0c14 100644 --- a/web/src/components/DebugComponent.vue +++ b/web/src/components/DebugComponent.vue @@ -471,7 +471,7 @@ const printAgentConfig = async () => { - - diff --git a/web/src/components/RefsSidebar.vue b/web/src/components/RefsSidebar.vue deleted file mode 100644 index 4753bebac..000000000 --- a/web/src/components/RefsSidebar.vue +++ /dev/null @@ -1,624 +0,0 @@ - - - - - diff --git a/web/src/components/SearchConfigTab.vue b/web/src/components/SearchConfigTab.vue index af15ce036..3d67047a9 100644 --- a/web/src/components/SearchConfigTab.vue +++ b/web/src/components/SearchConfigTab.vue @@ -173,7 +173,7 @@ onMounted(() => { height: 100%; display: flex; flex-direction: column; - background: #fff; + background: var(--gray-0); } .config-header { diff --git a/web/src/components/StatusBar.vue b/web/src/components/StatusBar.vue index b39dbf3f4..c2eb9b33e 100644 --- a/web/src/components/StatusBar.vue +++ b/web/src/components/StatusBar.vue @@ -121,7 +121,7 @@ onUnmounted(() => { \ No newline at end of file diff --git a/web/src/components/UserManagementComponent.vue b/web/src/components/UserManagementComponent.vue index adc9af3dd..681bd488e 100644 --- a/web/src/components/UserManagementComponent.vue +++ b/web/src/components/UserManagementComponent.vue @@ -670,7 +670,7 @@ onMounted(() => { .user-modal { :deep(.ant-modal-header) { padding: 20px 24px; - border-bottom: 1px solid #f0f0f0; + border-bottom: 1px solid var(--gray-800); .ant-modal-title { font-size: 16px; diff --git a/web/src/components/dashboard/AgentStatsComponent.vue b/web/src/components/dashboard/AgentStatsComponent.vue index faf48986f..17080cc45 100644 --- a/web/src/components/dashboard/AgentStatsComponent.vue +++ b/web/src/components/dashboard/AgentStatsComponent.vue @@ -240,7 +240,7 @@ const initConversationToolChart = () => { }, splitLine: { lineStyle: { - color: '#f0f0f0' + color: 'var(--gray-150)' } } }, @@ -354,16 +354,4 @@ defineExpose({ transition: all 0.3s ease; } -// 深色模式适配 -:root.dark { - .top-performers, .metrics-comparison { - h4 { - color: rgba(255, 255, 255, 0.85); - } - - h5 { - color: rgba(255, 255, 255, 0.65); - } - } -} \ No newline at end of file diff --git a/web/src/components/dashboard/CallStatsComponent.vue b/web/src/components/dashboard/CallStatsComponent.vue index d0542977f..736ff6896 100644 --- a/web/src/components/dashboard/CallStatsComponent.vue +++ b/web/src/components/dashboard/CallStatsComponent.vue @@ -355,7 +355,7 @@ onUnmounted(() => { .simple-toggle.active { background-color: #3996ae; - color: white; + color: var(--gray-0); } .divider { diff --git a/web/src/components/dashboard/FeedbackModalComponent.vue b/web/src/components/dashboard/FeedbackModalComponent.vue index c8b295340..9040b95e2 100644 --- a/web/src/components/dashboard/FeedbackModalComponent.vue +++ b/web/src/components/dashboard/FeedbackModalComponent.vue @@ -198,7 +198,7 @@ watch(() => props.agentId, () => { // 反馈卡片 - 紧凑设计 .feedback-card { - background: white; + background: var(--gray-0); border: 1px solid var(--gray-100); border-radius: 8px; transition: all 0.2s ease; @@ -218,7 +218,7 @@ watch(() => props.agentId, () => { align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--gray-100); - background: #fafafa; + background: var(--gray-25); border-radius: 8px 8px 0 0; } @@ -318,7 +318,7 @@ watch(() => props.agentId, () => { .card-footer { padding: 8px 16px; border-top: 1px solid var(--gray-100); - background: #fafafa; + background: var(--gray-25); border-radius: 0 0 8px 8px; } @@ -339,72 +339,6 @@ watch(() => props.agentId, () => { } -// 深色模式适配 -:root.dark { - .feedback-cards-container { - &::-webkit-scrollbar-track { - background: #262626; - } - - &::-webkit-scrollbar-thumb { - background: #434343; - - &:hover { - background: #595959; - } - } - } - - .feedback-card { - background: #1f1f1f; - border-color: #434343; - - &:hover { - border-color: var(--main-500); - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); - } - } - - .card-header { - background: #262626; - border-bottom-color: #434343; - } - - .user-details .username { - color: rgba(255, 255, 255, 0.85); - } - - .message-content { - background: #262626; - color: rgba(255, 255, 255, 0.85); - } - - .info-item { - .label { - color: rgba(255, 255, 255, 0.65); - } - - .value { - color: rgba(255, 255, 255, 0.85); - } - } - - .reason-content { - background: rgba(250, 173, 20, 0.15); - border-left-color: #faad14; - color: rgba(255, 255, 255, 0.85); - } - - .card-footer { - background: #262626; - border-top-color: #434343; - } - - .time-info { - color: rgba(255, 255, 255, 0.65); - } -} - // 响应式设计 @media (max-width: 768px) { .feedback-cards-container { diff --git a/web/src/components/dashboard/ToolStatsComponent.vue b/web/src/components/dashboard/ToolStatsComponent.vue index 813ba5175..f645201f8 100644 --- a/web/src/components/dashboard/ToolStatsComponent.vue +++ b/web/src/components/dashboard/ToolStatsComponent.vue @@ -168,7 +168,7 @@ const initToolsChart = () => { }, splitLine: { lineStyle: { - color: '#f0f0f0' + color: 'var(--gray-150)' } } }, diff --git a/web/src/components/dashboard/UserStatsComponent.vue b/web/src/components/dashboard/UserStatsComponent.vue index 58ec0129e..7edfe390a 100644 --- a/web/src/components/dashboard/UserStatsComponent.vue +++ b/web/src/components/dashboard/UserStatsComponent.vue @@ -96,7 +96,7 @@ const initActivityChart = () => { }, splitLine: { lineStyle: { - color: '#f0f0f0' + color: 'var(--gray-150)' } } }, diff --git a/web/src/layouts/AppLayout.vue b/web/src/layouts/AppLayout.vue index 6dd024ff1..46cde3b67 100644 --- a/web/src/layouts/AppLayout.vue +++ b/web/src/layouts/AppLayout.vue @@ -3,25 +3,25 @@ import { ref, reactive, onMounted, useTemplateRef, computed } from 'vue' import { RouterLink, RouterView, useRoute } from 'vue-router' import { GithubOutlined, - ExclamationCircleOutlined, } from '@ant-design/icons-vue' -import { Bot, Waypoints, LibraryBig, Settings, BarChart3, BookOpen, CircleCheck } from 'lucide-vue-next'; +import { Bot, Waypoints, LibraryBig, Settings, BarChart3, BookOpen, CircleCheck, Sun, Moon } from 'lucide-vue-next'; import { onLongPress } from '@vueuse/core' import { useConfigStore } from '@/stores/config' import { useDatabaseStore } from '@/stores/database' import { useInfoStore } from '@/stores/info' import { useTaskerStore } from '@/stores/tasker' +import { useThemeStore } from '@/stores/theme' import { storeToRefs } from 'pinia' import UserInfoComponent from '@/components/UserInfoComponent.vue' import DebugComponent from '@/components/DebugComponent.vue' import TaskCenterDrawer from '@/components/TaskCenterDrawer.vue' -import ThemeToggle from '@/components/ThemeToggle.vue' const configStore = useConfigStore() const databaseStore = useDatabaseStore() const infoStore = useInfoStore() const taskerStore = useTaskerStore() +const themeStore = useThemeStore() const { activeCount: activeCountRef, isDrawerOpen } = storeToRefs(taskerStore) const layoutSettings = reactive({ @@ -190,16 +190,22 @@ const mainList = [{ - + -