From 83511dee5f9ae834c8270c5ca42bf3433545231b Mon Sep 17 00:00:00 2001 From: MT-Mint <798521692@qq.com> Date: Wed, 18 Mar 2026 11:32:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20UI=20=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - sonner.tsx: 修改 toast 为灰色圆角样式,禁用图标 - globals.css: 添加 toast 居中样式 - layout.tsx: 使用本地 Toaster 组件 - dev-dialog.tsx: 添加 singleColumn 属性支持单列布局 - prompt-input.tsx: 提交按钮添加 tooltip 提示 - suggestion.tsx: 修改建议按钮样式为 ghost + 浅灰背景 - input-box.tsx: 调整输入框高度200px样式 - zh-CN.ts: 更新建议列表文案和 skill_id --- frontend/src/app/workspace/layout.tsx | 4 +- .../components/ai-elements/prompt-input.tsx | 3 ++ .../src/components/ai-elements/suggestion.tsx | 4 +- frontend/src/components/ui/dev-dialog.tsx | 10 ++-- frontend/src/components/ui/sonner.tsx | 49 +++++++++++-------- .../src/components/workspace/input-box.tsx | 8 +-- frontend/src/core/i18n/locales/zh-CN.ts | 22 ++++++--- frontend/src/styles/globals.css | 17 ++++++- 8 files changed, 76 insertions(+), 41 deletions(-) diff --git a/frontend/src/app/workspace/layout.tsx b/frontend/src/app/workspace/layout.tsx index d871ebff..e770ec59 100644 --- a/frontend/src/app/workspace/layout.tsx +++ b/frontend/src/app/workspace/layout.tsx @@ -2,9 +2,9 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { useCallback, useEffect, useLayoutEffect, useState } from "react"; -import { Toaster } from "sonner"; import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar"; +import { Toaster } from "@/components/ui/sonner"; import { WorkspaceSidebar } from "@/components/workspace/workspace-sidebar"; import { getLocalSettings, useLocalSettings } from "@/core/settings"; @@ -40,7 +40,7 @@ export default function WorkspaceLayout({ {/* */} {children} - + ); } diff --git a/frontend/src/components/ai-elements/prompt-input.tsx b/frontend/src/components/ai-elements/prompt-input.tsx index 5c480557..25852a41 100644 --- a/frontend/src/components/ai-elements/prompt-input.tsx +++ b/frontend/src/components/ai-elements/prompt-input.tsx @@ -1,6 +1,7 @@ "use client"; import { Button } from "@/components/ui/button"; +import { Tooltip } from "@/components/workspace/tooltip"; import { Command, CommandEmpty, @@ -1097,6 +1098,7 @@ export const PromptInputSubmit = ({ } return ( + + ); }; diff --git a/frontend/src/components/ai-elements/suggestion.tsx b/frontend/src/components/ai-elements/suggestion.tsx index 80cff963..6a630302 100644 --- a/frontend/src/components/ai-elements/suggestion.tsx +++ b/frontend/src/components/ai-elements/suggestion.tsx @@ -49,7 +49,7 @@ export const Suggestion = ({ onClick, className, icon: Icon, - variant = "outline", + variant = "ghost", size = "sm", children, ...props @@ -61,7 +61,7 @@ export const Suggestion = ({ return (