From aa469438c2627859d22e42197c159b97a772a6c2 Mon Sep 17 00:00:00 2001 From: gaoziman <2942894660@qq.com> Date: Fri, 19 Dec 2025 15:58:15 +0800 Subject: [PATCH] =?UTF-8?q?refactor(components):=20=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=80=82=E9=85=8D=E6=9A=97=E8=89=B2=E4=B8=BB?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 聊天页面 header 和输入区域背景色使用 CSS 变量 - ChatInput 输入框背景色适配 - ModelSelector/ToolsDropdown 下拉菜单背景色适配 - QuickActions 按钮背景色适配 - Sidebar 侧边栏及下拉菜单背景色适配 - UserMenu 悬停效果颜色适配 --- src/app/chat/[id]/page.tsx | 9 +++++++-- src/components/features/ChatInput.tsx | 2 +- src/components/features/ModelSelector.tsx | 2 +- src/components/features/QuickActions.tsx | 2 +- src/components/features/ToolsDropdown.tsx | 2 +- src/components/layout/Sidebar.tsx | 6 +++--- src/components/ui/UserMenu.tsx | 2 +- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/app/chat/[id]/page.tsx b/src/app/chat/[id]/page.tsx index 0f52141..a3d3227 100644 --- a/src/app/chat/[id]/page.tsx +++ b/src/app/chat/[id]/page.tsx @@ -207,7 +207,7 @@ export default function ChatPage({ params }: PageProps) { )} > {/* 固定顶部 Header */} -
+
setSidebarOpen(!sidebarOpen)} />

@@ -280,7 +280,12 @@ export default function ChatPage({ params }: PageProps) {

{/* 固定底部输入框 */} -
+
{isStreaming && (
diff --git a/src/components/features/ChatInput.tsx b/src/components/features/ChatInput.tsx index 7a61433..6c5172d 100644 --- a/src/components/features/ChatInput.tsx +++ b/src/components/features/ChatInput.tsx @@ -52,7 +52,7 @@ export function ChatInput({
onSelect(action)} className={cn( 'flex items-center gap-2 px-4 py-2', - 'bg-white border border-[var(--color-border)] rounded-full', + 'bg-[var(--color-bg-primary)] border border-[var(--color-border)] rounded-full', 'text-sm text-[var(--color-text-secondary)]', 'hover:bg-[var(--color-bg-tertiary)] hover:text-[var(--color-text-primary)]', 'transition-all duration-150' diff --git a/src/components/features/ToolsDropdown.tsx b/src/components/features/ToolsDropdown.tsx index d9c0296..41cfee6 100644 --- a/src/components/features/ToolsDropdown.tsx +++ b/src/components/features/ToolsDropdown.tsx @@ -63,7 +63,7 @@ export function ToolsDropdown({ tools, onToolToggle, onEnableAllToggle }: ToolsD {/* 下拉菜单 */}
@@ -146,10 +146,10 @@ export function Sidebar({ user, isOpen = true }: SidebarProps) { {/* 下拉菜单 */} {menuOpen === conversation.conversationId && ( -
+