From e6ad3c414f84b5be2c4d3fc79692e1b35bc85b5a Mon Sep 17 00:00:00 2001
From: fengxiangdebaozi <10845145+fengxiangdebaozi@user.noreply.gitee.com>
Date: Thu, 14 May 2026 16:01:25 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=B8=83=E5=B1=80=E8=B0=83?=
=?UTF-8?q?=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend-web/src/components/ui/sidebar.tsx | 6 +-
.../src/components/workspace/input-box.tsx | 20 ++---
frontend-web/src/contexts/ThemeContext.tsx | 8 +-
frontend-web/src/pages/PageRoutes.tsx | 38 +++++----
frontend-web/src/pages/WorkspaceRoutes.tsx | 2 +-
.../src/strategy-components/Header.tsx | 83 +++++++++++++++++++
frontend-web/src/styles/globals.css | 62 ++++++++------
7 files changed, 157 insertions(+), 62 deletions(-)
create mode 100644 frontend-web/src/strategy-components/Header.tsx
diff --git a/frontend-web/src/components/ui/sidebar.tsx b/frontend-web/src/components/ui/sidebar.tsx
index c62bf163..2e6d3ca1 100644
--- a/frontend-web/src/components/ui/sidebar.tsx
+++ b/frontend-web/src/components/ui/sidebar.tsx
@@ -139,7 +139,7 @@ function SidebarProvider({
} as React.CSSProperties
}
className={cn(
- "group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
+ "group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",
className,
)}
{...props}
@@ -229,7 +229,7 @@ function Sidebar({
) {
{
textInput.setInput(q.content);
setFollowupsHidden(true);
@@ -495,7 +495,7 @@ export function InputBox({
)}
-
+
{/* TODO: Add more connectors here
@@ -529,7 +529,7 @@ export function InputBox({
/>
*/}
-
+
-
+
{context.mode === "flash" &&
}
{context.mode === "thinking" && (
@@ -703,7 +703,7 @@ export function InputBox({
{supportReasoningEffort && context.mode !== "flash" && (
-
+
{t.inputBox.reasoningEffort}:
{context.reasoning_effort === "minimal" &&
@@ -824,7 +824,7 @@ export function InputBox({
onOpenChange={setModelDialogOpen}
>
-
+
{selectedModel?.display_name}
@@ -858,7 +858,7 @@ export function InputBox({
{!isNewThread && (
-
+
)}
diff --git a/frontend-web/src/contexts/ThemeContext.tsx b/frontend-web/src/contexts/ThemeContext.tsx
index c6ce37b8..a4042ae7 100644
--- a/frontend-web/src/contexts/ThemeContext.tsx
+++ b/frontend-web/src/contexts/ThemeContext.tsx
@@ -39,16 +39,16 @@ const themes: Record = {
textSecondary: 'slate-400',
primary: 'blue-500',
primaryHover: 'blue-400',
- border: 'blue-800',
- accent: 'cyan-400',
+ border: 'slate-700',
+ accent: 'blue-600',
success: 'emerald-500',
warning: 'amber-500',
error: 'rose-500',
card: 'slate-800',
cardHover: 'slate-700',
input: 'slate-800',
- inputBorder: 'blue-800',
- overlay: 'slate-900/50',
+ inputBorder: 'slate-600',
+ overlay: 'slate-900/80',
},
},
light: {
diff --git a/frontend-web/src/pages/PageRoutes.tsx b/frontend-web/src/pages/PageRoutes.tsx
index b227d3ad..78f2445e 100644
--- a/frontend-web/src/pages/PageRoutes.tsx
+++ b/frontend-web/src/pages/PageRoutes.tsx
@@ -4,6 +4,7 @@ import { Navigate, Route, Routes } from "react-router-dom";
import { PageSidebar } from "@/components/page-sidebar";
import WorkspaceRoutes from "./WorkspaceRoutes";
+import Header from "@/strategy-components/Header";
// 设为 true 时隐藏侧边栏(开发中,暂未完成)
const SIDEBAR_ENABLED = false;
@@ -12,31 +13,34 @@ function PageLayout() {
const [collapsed, setCollapsed] = useState(false);
return (
-
+
{SIDEBAR_ENABLED && (
setCollapsed((prev) => !prev)}
/>
)}
-
-
- } />
-
- }
- />
-
-
+
+
+
+ } />
+
+ }
+ />
+
+
+
);
}
diff --git a/frontend-web/src/pages/WorkspaceRoutes.tsx b/frontend-web/src/pages/WorkspaceRoutes.tsx
index eaf676f5..a69ab007 100644
--- a/frontend-web/src/pages/WorkspaceRoutes.tsx
+++ b/frontend-web/src/pages/WorkspaceRoutes.tsx
@@ -37,7 +37,7 @@ function WorkspaceLayout({
return (
{
+ const { theme, toggleTheme } = useTheme();
+ const isDark = theme === 'dark';
+
+ return (
+
+ {/* 左侧 - 搜索框 */}
+
+
+ {/* 右侧 - 用户信息和通知 */}
+
+ {/* 主题切换按钮 */}
+
+
+ {/* 通知 */}
+
+
+ {/* 分隔线 */}
+
+
+ {/* 用户信息 */}
+
+
+
+ );
+};
+
+export default Header;
diff --git a/frontend-web/src/styles/globals.css b/frontend-web/src/styles/globals.css
index 3c79e249..8c4e042a 100644
--- a/frontend-web/src/styles/globals.css
+++ b/frontend-web/src/styles/globals.css
@@ -243,7 +243,7 @@
--workspace-brand: #d92121;
--workspace-brand-foreground: #ffffff;
--radius: 0.75rem;
- --background: oklch(0.985 0.004 95);
+ --background: oklch(1 0 0);
--foreground: oklch(0.22 0.02 25);
--card: oklch(1 0.002 95);
--card-foreground: oklch(0.22 0.02 25);
@@ -277,39 +277,39 @@
}
.dark {
- --workspace-brand: #e11d1d;
+ --workspace-brand: #3b82f6;
--workspace-brand-foreground: #ffffff;
- --background: oklch(0.22 0.015 25);
- --foreground: oklch(0.96 0.01 95);
- --card: oklch(0.26 0.018 25);
- --card-foreground: oklch(0.96 0.01 95);
- --popover: oklch(0.24 0.018 25);
- --popover-foreground: oklch(0.96 0.01 95);
- --primary: oklch(0.62 0.17 27);
- --primary-foreground: oklch(0.12 0.02 25);
- --secondary: oklch(0.32 0.02 25);
- --secondary-foreground: oklch(0.96 0.01 95);
- --muted: oklch(0.3 0.02 25);
- --muted-foreground: oklch(0.72 0.02 95);
- --accent: oklch(0.34 0.06 25);
- --accent-foreground: oklch(0.96 0.01 95);
+ --background: oklch(0.208 0.042 264);
+ --foreground: oklch(0.96 0.005 240);
+ --card: oklch(0.265 0.04 260);
+ --card-foreground: oklch(0.96 0.005 240);
+ --popover: oklch(0.245 0.04 262);
+ --popover-foreground: oklch(0.96 0.005 240);
+ --primary: oklch(0.623 0.214 259);
+ --primary-foreground: oklch(0.99 0 0);
+ --secondary: oklch(0.32 0.038 260);
+ --secondary-foreground: oklch(0.96 0.005 240);
+ --muted: oklch(0.30 0.035 260);
+ --muted-foreground: oklch(0.68 0.02 240);
+ --accent: oklch(0.35 0.06 260);
+ --accent-foreground: oklch(0.96 0.005 240);
--destructive: oklch(0.704 0.191 22.216);
--border: oklch(1 0 0 / 12%);
--input: oklch(1 0 0 / 14%);
- --ring: oklch(0.62 0.17 27 / 0.45);
+ --ring: oklch(0.623 0.214 259 / 0.45);
--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.2 0.02 25);
- --sidebar-foreground: oklch(0.94 0.01 95);
- --sidebar-primary: oklch(0.62 0.17 27);
+ --sidebar: oklch(0.185 0.04 265);
+ --sidebar-foreground: oklch(0.94 0.005 240);
+ --sidebar-primary: oklch(0.623 0.214 259);
--sidebar-primary-foreground: oklch(0.99 0 0);
- --sidebar-accent: oklch(0.3 0.05 25);
- --sidebar-accent-foreground: oklch(0.96 0.01 95);
+ --sidebar-accent: oklch(0.30 0.055 260);
+ --sidebar-accent-foreground: oklch(0.96 0.005 240);
--sidebar-border: oklch(1 0 0 / 10%);
- --sidebar-ring: oklch(0.62 0.17 27 / 0.45);
+ --sidebar-ring: oklch(0.623 0.214 259 / 0.45);
font-weight: 300;
}
@@ -430,19 +430,27 @@
}
.workspace-shell {
- background:
- radial-gradient(circle at top right, rgb(255 214 214 / 0.72), transparent 18%),
- linear-gradient(180deg, #fbf7f4 0%, #f6efea 100%);
+ background: #ffffff;
+ }
+
+ .dark .workspace-shell {
+ background: var(--background);
}
.workspace-panel {
border: 1px solid #f0d7d0;
- background: linear-gradient(180deg, rgb(255 253 251 / 0.98), rgb(255 247 244 / 0.98));
+ background: #ffffff;
box-shadow:
0 32px 72px -46px rgb(98 63 42 / 0.35),
0 12px 28px -22px rgb(170 91 75 / 0.24);
}
+ .dark .workspace-panel {
+ border: 1px solid oklch(1 0 0 / 10%);
+ background: var(--card);
+ box-shadow: none;
+ }
+
.workspace-user-bubble {
max-width: min(82%, 42rem);
border: 1px solid rgb(255 255 255 / 0.14);