From 2aef139577afd6d9c11ecdc52718528dce87f8fd Mon Sep 17 00:00:00 2001 From: TwperBody Date: Sun, 10 Aug 2025 22:17:06 +0800 Subject: [PATCH] dark mode --- web/src/app/global.css | 39 ++++---- web/src/app/home/bots/BotDetailDialog.tsx | 2 +- .../components/bot-card/botCard.module.css | 35 ++++++++ .../home/bots/components/bot-form/BotForm.tsx | 4 +- .../dynamic-form/DynamicFormItemComponent.tsx | 10 +-- .../home-sidebar/HomeSidebar.module.css | 90 ++++++++++++++----- .../home-titlebar/HomeTittleBar.module.css | 12 +++ web/src/app/home/knowledge/KBDetailDialog.tsx | 2 +- .../components/kb-card/KBCard.module.css | 37 ++++++++ .../components/kb-docs/documents/columns.tsx | 2 +- .../knowledge/components/kb-form/KBForm.tsx | 2 +- web/src/app/home/layout.module.css | 22 +++++ .../embedding-card/EmbeddingCard.module.css | 31 +++++++ .../embedding-form/EmbeddingForm.tsx | 4 +- .../component/llm-card/LLMCard.module.css | 43 +++++++++ .../models/component/llm-form/LLMForm.tsx | 4 +- web/src/app/home/models/page.tsx | 6 +- .../home/pipelines/PipelineDetailDialog.tsx | 2 +- .../components/debug-dialog/AtBadge.tsx | 4 +- .../components/debug-dialog/DebugDialog.tsx | 24 ++--- .../pipeline-card/pipelineCard.module.css | 37 ++++++++ .../pipeline-form/PipelineFormComponent.tsx | 4 +- web/src/app/home/pipelines/page.tsx | 10 +-- web/src/app/home/plugins/page.tsx | 4 +- .../plugin-card/PluginCardComponent.tsx | 18 ++-- .../plugin-market/PluginMarketComponent.tsx | 12 +-- .../PluginMarketCardComponent.tsx | 14 +-- .../createCartComponent.module.css | 14 +++ web/src/app/layout.tsx | 5 +- web/src/app/login/page.tsx | 8 +- web/src/app/register/page.tsx | 8 +- web/src/app/reset-password/page.tsx | 8 +- .../components/providers/theme-provider.tsx | 18 ++++ web/src/components/ui/pagination.tsx | 4 +- web/src/components/ui/theme-toggle.tsx | 24 +++++ 35 files changed, 450 insertions(+), 113 deletions(-) create mode 100644 web/src/components/providers/theme-provider.tsx create mode 100644 web/src/components/ui/theme-toggle.tsx diff --git a/web/src/app/global.css b/web/src/app/global.css index 079437e8..310d509a 100644 --- a/web/src/app/global.css +++ b/web/src/app/global.css @@ -56,6 +56,15 @@ background: rgba(0, 0, 0, 0.35); /* 悬停加深 */ } +/* 暗黑模式下的滚动条 */ +.dark ::-webkit-scrollbar-thumb { + background: rgba(255, 255, 255, 0.2); /* 半透明白色 */ +} + +.dark ::-webkit-scrollbar-thumb:hover { + background: rgba(255, 255, 255, 0.35); /* 悬停加深 */ +} + /* 兼容 Edge */ @supports (-ms-ime-align: auto) { body { @@ -108,36 +117,36 @@ } .dark { - --background: oklch(0.141 0.005 285.823); + --background: oklch(0.08 0.002 285.823); --foreground: oklch(0.985 0 0); - --card: oklch(0.21 0.006 285.885); + --card: oklch(0.12 0.004 285.885); --card-foreground: oklch(0.985 0 0); - --popover: oklch(0.21 0.006 285.885); + --popover: oklch(0.12 0.004 285.885); --popover-foreground: oklch(0.985 0 0); - --primary: oklch(0.92 0.004 286.32); - --primary-foreground: oklch(0.21 0.006 285.885); - --secondary: oklch(0.274 0.006 286.033); + --primary: oklch(0.62 0.2 255); + --primary-foreground: oklch(1 0 0); + --secondary: oklch(0.18 0.004 286.033); --secondary-foreground: oklch(0.985 0 0); - --muted: oklch(0.274 0.006 286.033); + --muted: oklch(0.18 0.004 286.033); --muted-foreground: oklch(0.705 0.015 286.067); - --accent: oklch(0.274 0.006 286.033); + --accent: oklch(0.18 0.004 286.033); --accent-foreground: oklch(0.985 0 0); --destructive: oklch(0.704 0.191 22.216); - --border: oklch(1 0 0 / 10%); - --input: oklch(1 0 0 / 15%); + --border: oklch(1 0 0 / 8%); + --input: oklch(1 0 0 / 10%); --ring: oklch(0.552 0.016 285.938); --chart-1: oklch(0.488 0.243 264.376); --chart-2: oklch(0.696 0.17 162.48); --chart-3: oklch(0.769 0.188 70.08); --chart-4: oklch(0.627 0.265 303.9); --chart-5: oklch(0.645 0.246 16.439); - --sidebar: oklch(0.21 0.006 285.885); + --sidebar: oklch(0.1 0.003 285.885); --sidebar-foreground: oklch(0.985 0 0); - --sidebar-primary: oklch(0.488 0.243 264.376); - --sidebar-primary-foreground: oklch(0.985 0 0); - --sidebar-accent: oklch(0.274 0.006 286.033); + --sidebar-primary: oklch(0.62 0.2 255); + --sidebar-primary-foreground: oklch(1 0 0); + --sidebar-accent: oklch(0.18 0.004 286.033); --sidebar-accent-foreground: oklch(0.985 0 0); - --sidebar-border: oklch(1 0 0 / 10%); + --sidebar-border: oklch(1 0 0 / 8%); --sidebar-ring: oklch(0.552 0.016 285.938); } diff --git a/web/src/app/home/bots/BotDetailDialog.tsx b/web/src/app/home/bots/BotDetailDialog.tsx index db19e1d4..fbb8c359 100644 --- a/web/src/app/home/bots/BotDetailDialog.tsx +++ b/web/src/app/home/bots/BotDetailDialog.tsx @@ -159,7 +159,7 @@ export default function BotDetailDialog({ diff --git a/web/src/app/home/bots/components/bot-card/botCard.module.css b/web/src/app/home/bots/components/bot-card/botCard.module.css index 396b5831..0c316049 100644 --- a/web/src/app/home/bots/components/bot-card/botCard.module.css +++ b/web/src/app/home/bots/components/bot-card/botCard.module.css @@ -6,12 +6,22 @@ box-shadow: 0px 2px 2px 0 rgba(0, 0, 0, 0.2); padding: 1.2rem; cursor: pointer; + transition: all 0.2s ease; +} + +:global(.dark) .cardContainer { + background-color: #1a1a1e; + box-shadow: 0px 2px 8px 0 rgba(255, 255, 255, 0.1); } .cardContainer:hover { box-shadow: 0px 2px 8px 0 rgba(0, 0, 0, 0.1); } +:global(.dark) .cardContainer:hover { + box-shadow: 0px 4px 12px 0 rgba(255, 255, 255, 0.15); +} + .iconBasicInfoContainer { width: 100%; height: 100%; @@ -47,6 +57,11 @@ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + color: #1a1a1a; +} + +:global(.dark) .basicInfoName { + color: #f0f0f0; } .basicInfoDescription { @@ -58,6 +73,10 @@ text-overflow: ellipsis; } +:global(.dark) .basicInfoDescription { + color: #888888; +} + .basicInfoAdapterContainer { display: flex; flex-direction: row; @@ -71,12 +90,20 @@ color: #626262; } +:global(.dark) .basicInfoAdapterIcon { + color: #a0a0a0; +} + .basicInfoAdapterLabel { font-size: 1.2rem; font-weight: 500; color: #626262; } +:global(.dark) .basicInfoAdapterLabel { + color: #a0a0a0; +} + .basicInfoPipelineContainer { display: flex; flex-direction: row; @@ -90,12 +117,20 @@ margin-top: 0.2rem; } +:global(.dark) .basicInfoPipelineIcon { + color: #a0a0a0; +} + .basicInfoPipelineLabel { font-size: 1.2rem; font-weight: 500; color: #626262; } +:global(.dark) .basicInfoPipelineLabel { + color: #a0a0a0; +} + .bigText { white-space: nowrap; overflow: hidden; diff --git a/web/src/app/home/bots/components/bot-form/BotForm.tsx b/web/src/app/home/bots/components/bot-form/BotForm.tsx index bd757ae0..02291027 100644 --- a/web/src/app/home/bots/components/bot-form/BotForm.tsx +++ b/web/src/app/home/bots/components/bot-form/BotForm.tsx @@ -394,7 +394,7 @@ export default function BotForm({ {t('bots.bindPipeline')} - + @@ -150,7 +150,7 @@ export default function DynamicFormItemComponent({ case DynamicFormItemType.LLM_MODEL_SELECTOR: return ( - + @@ -291,7 +291,7 @@ export default function DynamicFormItemComponent({
{/* 角色选择 */} {index === 0 ? ( -
+
system
) : ( @@ -303,7 +303,7 @@ export default function DynamicFormItemComponent({ field.onChange(newValue); }} > - + diff --git a/web/src/app/home/components/home-sidebar/HomeSidebar.module.css b/web/src/app/home/components/home-sidebar/HomeSidebar.module.css index d525d495..4aeb96e3 100644 --- a/web/src/app/home/components/home-sidebar/HomeSidebar.module.css +++ b/web/src/app/home/components/home-sidebar/HomeSidebar.module.css @@ -13,6 +13,10 @@ /* box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1); */ } +:global(.dark) .sidebarContainer { + background-color: #0a0a0b !important; +} + .langbotIconContainer { width: 200px; height: 70px; @@ -21,32 +25,49 @@ align-items: center; justify-content: center; gap: 0.8rem; +} - .langbotIcon { - width: 2.8rem; - height: 2.8rem; - box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1); - border-radius: 8px; - } +.langbotIcon { + width: 2.8rem; + height: 2.8rem; + box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1); + border-radius: 8px; +} - .langbotTextContainer { - display: flex; - flex-direction: column; - align-items: flex-start; - justify-content: flex-start; - gap: 0.1rem; - } +:global(.dark) .langbotIcon { + box-shadow: 0 0 10px 0 rgba(255, 255, 255, 0.1); +} - .langbotText { - font-size: 1.4rem; - font-weight: 500; - } +.langbotTextContainer { + display: flex; + flex-direction: column; + align-items: flex-start; + justify-content: flex-start; + gap: 0.1rem; +} - .langbotVersion { - font-size: 0.8rem; - font-weight: 700; - color: #6c6c6c; - } +.langbotText { + font-size: 1.4rem; + font-weight: 500; + color: #1a1a1a; +} + +:global(.dark) .langbotText { + font-size: 1.4rem; + font-weight: 500; + color: #f0f0f0 !important; +} + +.langbotVersion { + font-size: 0.8rem; + font-weight: 700; + color: #6c6c6c; +} + +:global(.dark) .langbotVersion { + font-size: 0.8rem; + font-weight: 700; + color: #a0a0a0 !important; } .sidebarTopContainer { @@ -76,6 +97,7 @@ justify-content: flex-start; cursor: pointer; gap: 0.5rem; + transition: all 0.2s ease; /* background-color: aqua; */ } @@ -85,16 +107,40 @@ box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1); } +:global(.dark) .sidebarSelected { + background-color: #2288ee; + color: white; + box-shadow: 0 0 10px 0 rgba(34, 136, 238, 0.3); +} + .sidebarUnselected { color: #6c6c6c; } +:global(.dark) .sidebarUnselected { + color: #a0a0a0 !important; +} + +.sidebarUnselected:hover { + background-color: rgba(34, 136, 238, 0.1); + color: #2288ee; +} + +:global(.dark) .sidebarUnselected:hover { + background-color: rgba(34, 136, 238, 0.2); + color: #66baff; +} + .sidebarChildIcon { width: 20px; height: 20px; background-color: rgba(96, 149, 209, 0); } +.sidebarChildName { + color: inherit; +} + .sidebarBottomContainer { width: 100%; display: flex; diff --git a/web/src/app/home/components/home-titlebar/HomeTittleBar.module.css b/web/src/app/home/components/home-titlebar/HomeTittleBar.module.css index bc740231..73bb2242 100644 --- a/web/src/app/home/components/home-titlebar/HomeTittleBar.module.css +++ b/web/src/app/home/components/home-titlebar/HomeTittleBar.module.css @@ -17,6 +17,10 @@ color: #585858; } +:global(.dark) .titleText { + color: #e0e0e0; +} + .subtitleText { margin-left: 3.2rem; font-size: 0.8rem; @@ -25,8 +29,16 @@ align-items: center; } +:global(.dark) .subtitleText { + color: #b0b0b0; +} + .helpLink { margin-left: 0.2rem; font-size: 0.8rem; color: #8b8b8b; } + +:global(.dark) .helpLink { + color: #a0a0a0; +} diff --git a/web/src/app/home/knowledge/KBDetailDialog.tsx b/web/src/app/home/knowledge/KBDetailDialog.tsx index 7ad8d4a4..33a21267 100644 --- a/web/src/app/home/knowledge/KBDetailDialog.tsx +++ b/web/src/app/home/knowledge/KBDetailDialog.tsx @@ -152,7 +152,7 @@ export default function KBDetailDialog({ diff --git a/web/src/app/home/knowledge/components/kb-card/KBCard.module.css b/web/src/app/home/knowledge/components/kb-card/KBCard.module.css index 2ecbd44a..dfc0002a 100644 --- a/web/src/app/home/knowledge/components/kb-card/KBCard.module.css +++ b/web/src/app/home/knowledge/components/kb-card/KBCard.module.css @@ -10,12 +10,22 @@ flex-direction: row; justify-content: space-between; gap: 0.5rem; + transition: all 0.2s ease; +} + +:global(.dark) .cardContainer { + background-color: #1a1a1e; + box-shadow: 0px 2px 8px 0 rgba(255, 255, 255, 0.1); } .cardContainer:hover { box-shadow: 0px 2px 8px 0 rgba(0, 0, 0, 0.1); } +:global(.dark) .cardContainer:hover { + box-shadow: 0px 4px 12px 0 rgba(255, 255, 255, 0.15); +} + .basicInfoContainer { width: 100%; height: 100%; @@ -35,6 +45,11 @@ .basicInfoNameText { font-size: 1.4rem; font-weight: 500; + color: #1a1a1a; +} + +:global(.dark) .basicInfoNameText { + color: #f0f0f0; } .basicInfoDescriptionText { @@ -48,6 +63,10 @@ color: #b1b1b1; } +:global(.dark) .basicInfoDescriptionText { + color: #888888; +} + .basicInfoLastUpdatedTimeContainer { display: flex; flex-direction: row; @@ -58,11 +77,21 @@ .basicInfoUpdateTimeIcon { width: 1.2rem; height: 1.2rem; + color: #626262; +} + +:global(.dark) .basicInfoUpdateTimeIcon { + color: #a0a0a0; } .basicInfoUpdateTimeText { font-size: 1rem; font-weight: 400; + color: #626262; +} + +:global(.dark) .basicInfoUpdateTimeText { + color: #a0a0a0; } .operationContainer { @@ -86,12 +115,20 @@ color: #ffcd27; } +:global(.dark) .operationDefaultBadgeIcon { + color: #fbbf24; +} + .operationDefaultBadgeText { font-size: 1rem; font-weight: 400; color: #ffcd27; } +:global(.dark) .operationDefaultBadgeText { + color: #fbbf24; +} + .bigText { white-space: nowrap; overflow: hidden; diff --git a/web/src/app/home/knowledge/components/kb-docs/documents/columns.tsx b/web/src/app/home/knowledge/components/kb-docs/documents/columns.tsx index 6142cfc4..45bc1ae8 100644 --- a/web/src/app/home/knowledge/components/kb-docs/documents/columns.tsx +++ b/web/src/app/home/knowledge/components/kb-docs/documents/columns.tsx @@ -77,7 +77,7 @@ export const columns = ( - + {t('knowledge.documentsTab.actions')} diff --git a/web/src/app/home/knowledge/components/kb-form/KBForm.tsx b/web/src/app/home/knowledge/components/kb-form/KBForm.tsx index 54d5d6e4..010d14bf 100644 --- a/web/src/app/home/knowledge/components/kb-form/KBForm.tsx +++ b/web/src/app/home/knowledge/components/kb-form/KBForm.tsx @@ -200,7 +200,7 @@ export default function KBForm({ }} value={field.value} > - + diff --git a/web/src/app/home/layout.module.css b/web/src/app/home/layout.module.css index 78a11beb..ad9725ca 100644 --- a/web/src/app/home/layout.module.css +++ b/web/src/app/home/layout.module.css @@ -7,6 +7,19 @@ background-color: #eee; } +:global(.dark) .homeLayoutContainer { + background-color: #0a0a0b; +} + +/* 侧边栏区域 */ +.sidebar { + background-color: #eee; +} + +:global(.dark) .sidebar { + background-color: #0a0a0b; +} + /* 主内容区域 */ .main { background-color: #fafafa; @@ -23,6 +36,11 @@ box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.05); } +:global(.dark) .main { + background-color: #151518; + box-shadow: 0 0 6px 0 rgba(255, 255, 255, 0.05); +} + .mainContent { padding: 1.5rem; padding-left: 2rem; @@ -30,3 +48,7 @@ overflow-y: auto; background-color: #fafafa; } + +:global(.dark) .mainContent { + background-color: #151518; +} diff --git a/web/src/app/home/models/component/embedding-card/EmbeddingCard.module.css b/web/src/app/home/models/component/embedding-card/EmbeddingCard.module.css index 9c6c54f7..8a43224a 100644 --- a/web/src/app/home/models/component/embedding-card/EmbeddingCard.module.css +++ b/web/src/app/home/models/component/embedding-card/EmbeddingCard.module.css @@ -6,12 +6,22 @@ box-shadow: 0px 2px 2px 0 rgba(0, 0, 0, 0.2); padding: 1.2rem; cursor: pointer; + transition: all 0.2s ease; +} + +:global(.dark) .cardContainer { + background-color: #1a1a1e; + box-shadow: 0px 2px 8px 0 rgba(255, 255, 255, 0.1); } .cardContainer:hover { box-shadow: 0px 2px 8px 0 rgba(0, 0, 0, 0.1); } +:global(.dark) .cardContainer:hover { + box-shadow: 0px 4px 12px 0 rgba(255, 255, 255, 0.15); +} + .iconBasicInfoContainer { width: 100%; height: 100%; @@ -39,6 +49,11 @@ .basicInfoText { font-size: 1.4rem; font-weight: bold; + color: #1a1a1a; +} + +:global(.dark) .basicInfoText { + color: #f0f0f0; } .providerContainer { @@ -56,12 +71,20 @@ color: #626262; } +:global(.dark) .providerIcon { + color: #a0a0a0; +} + .providerLabel { font-size: 1.2rem; font-weight: 600; color: #626262; } +:global(.dark) .providerLabel { + color: #a0a0a0; +} + .baseURLContainer { display: flex; flex-direction: row; @@ -77,6 +100,10 @@ color: #626262; } +:global(.dark) .baseURLIcon { + color: #a0a0a0; +} + .baseURLText { font-size: 1rem; width: 100%; @@ -87,6 +114,10 @@ max-width: 100%; } +:global(.dark) .baseURLText { + color: #a0a0a0; +} + .bigText { white-space: nowrap; overflow: hidden; diff --git a/web/src/app/home/models/component/embedding-form/EmbeddingForm.tsx b/web/src/app/home/models/component/embedding-form/EmbeddingForm.tsx index d50885ae..a7d241db 100644 --- a/web/src/app/home/models/component/embedding-form/EmbeddingForm.tsx +++ b/web/src/app/home/models/component/embedding-form/EmbeddingForm.tsx @@ -404,7 +404,7 @@ export default function EmbeddingForm({ }} value={field.value} > - + @@ -479,7 +479,7 @@ export default function EmbeddingForm({ updateExtraArg(index, 'type', value) } > - + diff --git a/web/src/app/home/models/component/llm-card/LLMCard.module.css b/web/src/app/home/models/component/llm-card/LLMCard.module.css index b6d1ac6f..ecd6a549 100644 --- a/web/src/app/home/models/component/llm-card/LLMCard.module.css +++ b/web/src/app/home/models/component/llm-card/LLMCard.module.css @@ -6,12 +6,22 @@ box-shadow: 0px 2px 2px 0 rgba(0, 0, 0, 0.2); padding: 1.2rem; cursor: pointer; + transition: all 0.2s ease; +} + +:global(.dark) .cardContainer { + background-color: #1a1a1e; + box-shadow: 0px 2px 8px 0 rgba(255, 255, 255, 0.1); } .cardContainer:hover { box-shadow: 0px 2px 8px 0 rgba(0, 0, 0, 0.1); } +:global(.dark) .cardContainer:hover { + box-shadow: 0px 4px 12px 0 rgba(255, 255, 255, 0.15); +} + .iconBasicInfoContainer { width: 100%; height: 100%; @@ -40,6 +50,11 @@ .basicInfoText { font-size: 1.4rem; font-weight: bold; + color: #1a1a1a; +} + +:global(.dark) .basicInfoText { + color: #f0f0f0; } .providerContainer { @@ -57,12 +72,20 @@ color: #626262; } +:global(.dark) .providerIcon { + color: #a0a0a0; +} + .providerLabel { font-size: 1.2rem; font-weight: 600; color: #626262; } +:global(.dark) .providerLabel { + color: #a0a0a0; +} + .baseURLContainer { display: flex; flex-direction: row; @@ -78,6 +101,10 @@ color: #626262; } +:global(.dark) .baseURLIcon { + color: #a0a0a0; +} + .baseURLText { font-size: 1rem; width: 100%; @@ -88,6 +115,10 @@ max-width: 100%; } +:global(.dark) .baseURLText { + color: #a0a0a0; +} + .abilitiesContainer { display: flex; flex-direction: row; @@ -108,18 +139,30 @@ background-color: #66baff80; } +:global(.dark) .abilityBadge { + background-color: rgba(34, 136, 238, 0.3); +} + .abilityIcon { width: 1rem; height: 1rem; color: #2288ee; } +:global(.dark) .abilityIcon { + color: #66baff; +} + .abilityLabel { font-size: 0.8rem; font-weight: 400; color: #2288ee; } +:global(.dark) .abilityLabel { + color: #66baff; +} + .bigText { white-space: nowrap; overflow: hidden; diff --git a/web/src/app/home/models/component/llm-form/LLMForm.tsx b/web/src/app/home/models/component/llm-form/LLMForm.tsx index 73cc32fe..4268261f 100644 --- a/web/src/app/home/models/component/llm-form/LLMForm.tsx +++ b/web/src/app/home/models/component/llm-form/LLMForm.tsx @@ -420,7 +420,7 @@ export default function LLMForm({ }} value={field.value} > - + @@ -553,7 +553,7 @@ export default function LLMForm({ updateExtraArg(index, 'type', value) } > - + diff --git a/web/src/app/home/models/page.tsx b/web/src/app/home/models/page.tsx index 2f936753..9060f9bc 100644 --- a/web/src/app/home/models/page.tsx +++ b/web/src/app/home/models/page.tsx @@ -192,7 +192,7 @@ export default function LLMConfigPage() {
- + {t('llm.llmModels')} @@ -206,12 +206,12 @@ export default function LLMConfigPage() {
-

{t('llm.description')}

+

{t('llm.description')}

-

+

{t('embedding.description')}

diff --git a/web/src/app/home/pipelines/PipelineDetailDialog.tsx b/web/src/app/home/pipelines/PipelineDetailDialog.tsx index 53cf9eaa..91b8b192 100644 --- a/web/src/app/home/pipelines/PipelineDetailDialog.tsx +++ b/web/src/app/home/pipelines/PipelineDetailDialog.tsx @@ -142,7 +142,7 @@ export default function PipelineDialog({ diff --git a/web/src/app/home/pipelines/components/debug-dialog/AtBadge.tsx b/web/src/app/home/pipelines/components/debug-dialog/AtBadge.tsx index 38a83d39..1ead0ab3 100644 --- a/web/src/app/home/pipelines/components/debug-dialog/AtBadge.tsx +++ b/web/src/app/home/pipelines/components/debug-dialog/AtBadge.tsx @@ -15,13 +15,13 @@ export default function AtBadge({ return ( @{targetName} {!readonly && onRemove && ( diff --git a/web/src/app/home/pipelines/components/debug-dialog/DebugDialog.tsx b/web/src/app/home/pipelines/components/debug-dialog/DebugDialog.tsx index a84389e0..8429ffd5 100644 --- a/web/src/app/home/pipelines/components/debug-dialog/DebugDialog.tsx +++ b/web/src/app/home/pipelines/components/debug-dialog/DebugDialog.tsx @@ -218,14 +218,14 @@ export default function DebugDialog({ const renderContent = () => (
-
+
- +
{messages.length === 0 ? (
@@ -281,7 +281,7 @@ export default function DebugDialog({ 'max-w-md px-5 py-3 rounded-2xl', message.role === 'user' ? 'bg-[#2288ee] text-white rounded-br-none' - : 'bg-gray-100 text-gray-900 rounded-bl-none', + : 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100 rounded-bl-none', )} > {renderMessageContent(message)} @@ -290,7 +290,7 @@ export default function DebugDialog({ 'text-xs mt-2', message.role === 'user' ? 'text-white/70' - : 'text-gray-500', + : 'text-gray-500 dark:text-gray-400', )} > {message.role === 'user' @@ -305,7 +305,7 @@ export default function DebugDialog({
-
+
{hasAt && ( @@ -322,23 +322,23 @@ export default function DebugDialog({ ? t('pipelines.debugDialog.privateChat') : t('pipelines.debugDialog.groupChat'), })} - className="flex-1 rounded-md px-3 py-2 border border-gray-300 focus:border-[#2288ee] transition-none text-base" + className="flex-1 rounded-md px-3 py-2 border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-100 focus:border-[#2288ee] transition-none text-base" /> {showAtPopover && (
setIsHovering(true)} onMouseLeave={() => setIsHovering(false)} > - + @webchatbot - {t('pipelines.debugDialog.atTips')}
@@ -369,7 +369,7 @@ export default function DebugDialog({ // 原有的Dialog包装 return ( - + {renderContent()} ); diff --git a/web/src/app/home/pipelines/components/pipeline-card/pipelineCard.module.css b/web/src/app/home/pipelines/components/pipeline-card/pipelineCard.module.css index 2ecbd44a..dfc0002a 100644 --- a/web/src/app/home/pipelines/components/pipeline-card/pipelineCard.module.css +++ b/web/src/app/home/pipelines/components/pipeline-card/pipelineCard.module.css @@ -10,12 +10,22 @@ flex-direction: row; justify-content: space-between; gap: 0.5rem; + transition: all 0.2s ease; +} + +:global(.dark) .cardContainer { + background-color: #1a1a1e; + box-shadow: 0px 2px 8px 0 rgba(255, 255, 255, 0.1); } .cardContainer:hover { box-shadow: 0px 2px 8px 0 rgba(0, 0, 0, 0.1); } +:global(.dark) .cardContainer:hover { + box-shadow: 0px 4px 12px 0 rgba(255, 255, 255, 0.15); +} + .basicInfoContainer { width: 100%; height: 100%; @@ -35,6 +45,11 @@ .basicInfoNameText { font-size: 1.4rem; font-weight: 500; + color: #1a1a1a; +} + +:global(.dark) .basicInfoNameText { + color: #f0f0f0; } .basicInfoDescriptionText { @@ -48,6 +63,10 @@ color: #b1b1b1; } +:global(.dark) .basicInfoDescriptionText { + color: #888888; +} + .basicInfoLastUpdatedTimeContainer { display: flex; flex-direction: row; @@ -58,11 +77,21 @@ .basicInfoUpdateTimeIcon { width: 1.2rem; height: 1.2rem; + color: #626262; +} + +:global(.dark) .basicInfoUpdateTimeIcon { + color: #a0a0a0; } .basicInfoUpdateTimeText { font-size: 1rem; font-weight: 400; + color: #626262; +} + +:global(.dark) .basicInfoUpdateTimeText { + color: #a0a0a0; } .operationContainer { @@ -86,12 +115,20 @@ color: #ffcd27; } +:global(.dark) .operationDefaultBadgeIcon { + color: #fbbf24; +} + .operationDefaultBadgeText { font-size: 1rem; font-weight: 400; color: #ffcd27; } +:global(.dark) .operationDefaultBadgeText { + color: #fbbf24; +} + .bigText { white-space: nowrap; overflow: hidden; diff --git a/web/src/app/home/pipelines/components/pipeline-form/PipelineFormComponent.tsx b/web/src/app/home/pipelines/components/pipeline-form/PipelineFormComponent.tsx index 4d2dfbd5..07fb3d49 100644 --- a/web/src/app/home/pipelines/components/pipeline-form/PipelineFormComponent.tsx +++ b/web/src/app/home/pipelines/components/pipeline-form/PipelineFormComponent.tsx @@ -342,7 +342,7 @@ export default function PipelineFormComponent({ return ( <> -
+
{/* 按钮栏移到 Tabs 外部,始终固定底部 */} {showButtons && ( -
+
{isEditMode && !isDefaultPipeline && ( + ); +} \ No newline at end of file