From 325c6a5f21fe955d2e451080cecd2df32b60d792 Mon Sep 17 00:00:00 2001 From: YoVinchen Date: Fri, 21 Nov 2025 23:28:48 +0800 Subject: [PATCH] style(ui): refine header layout and AppSwitcher color scheme Improve application header and component styling: ## App.tsx Header Layout - Wrap title and settings button in flex container with gap - Add vertical divider between title and settings icon - Apply responsive padding (pl-1 sm:pl-2) - Reformat JSX for better readability (prettier) - Fix string template formatting in className ## AppSwitcher Color Update - Change Claude tab gradient from orange/amber to teal/emerald/green - Update shadow color to match new teal theme - Change hover color from orange-500 to teal-500 - Align visual style with emerald/teal brand colors ## Dialog Component Cleanup - Remove default close button (X icon) from DialogContent - Allow parent components to control close button placement - Remove unused lucide-react X import ## index.css Header Border - Add top border (2px solid) to glass-header - Apply to both light and dark mode variants - Improve visual separation of header area These changes enhance visual consistency and modernize the UI appearance with a cohesive teal color scheme. --- src/App.tsx | 46 ++++++++++++++++++---------------- src/components/AppSwitcher.tsx | 6 ++--- src/components/ui/dialog.tsx | 5 ---- src/index.css | 2 ++ 4 files changed, 30 insertions(+), 29 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index b32a9ec..d2179ca 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -375,23 +375,26 @@ function App() { ) : ( <> - - CC Switch - - +
+ + CC Switch + +
+ +
setCurrentView("settings")} /> )} @@ -506,8 +509,9 @@ function App() {
{renderContent()} @@ -550,8 +554,8 @@ function App() { message={ confirmDelete ? t("confirm.deleteProviderMessage", { - name: confirmDelete.name, - }) + name: confirmDelete.name, + }) : "" } onConfirm={() => void handleConfirmDelete()} diff --git a/src/components/AppSwitcher.tsx b/src/components/AppSwitcher.tsx index 10ec9df..9510811 100644 --- a/src/components/AppSwitcher.tsx +++ b/src/components/AppSwitcher.tsx @@ -19,12 +19,12 @@ export function AppSwitcher({ activeApp, onSwitch }: AppSwitcherProps) { onClick={() => handleSwitch("claude")} className={`group relative flex items-center gap-2 px-4 py-2.5 rounded-full text-sm font-semibold overflow-hidden transition-all duration-300 ease-out ${ activeApp === "claude" - ? "text-white scale-[1.02] shadow-[0_12px_35px_-15px_rgba(249,115,22,0.8)] ring-1 ring-white/10" + ? "text-white scale-[1.02] shadow-[0_12px_35px_-15px_rgba(20,184,166,0.6)] ring-1 ring-white/10" : "text-muted-foreground hover:text-foreground hover:bg-black/5 dark:hover:bg-white/5" }`} > {activeApp === "claude" && ( -
+
)} {activeApp !== "claude" && (
@@ -34,7 +34,7 @@ export function AppSwitcher({ activeApp, onSwitch }: AppSwitcherProps) { className={ activeApp === "claude" ? "text-white" - : "text-muted-foreground group-hover:text-orange-500 transition-colors" + : "text-muted-foreground group-hover:text-teal-500 transition-colors" } /> Claude diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx index 776e01a..52a5a69 100644 --- a/src/components/ui/dialog.tsx +++ b/src/components/ui/dialog.tsx @@ -1,6 +1,5 @@ import * as React from "react"; import * as DialogPrimitive from "@radix-ui/react-dialog"; -import { X } from "lucide-react"; import { cn } from "@/lib/utils"; const Dialog = DialogPrimitive.Root; @@ -84,10 +83,6 @@ const DialogContent = React.forwardRef< {...props} > {children} - - - 关闭 - ); diff --git a/src/index.css b/src/index.css index e32e636..d3e6bd2 100644 --- a/src/index.css +++ b/src/index.css @@ -110,11 +110,13 @@ backdrop-filter: none; -webkit-backdrop-filter: none; border: none; + border-top: 2px solid hsl(var(--border)); } .dark .glass-header { background: hsl(var(--background)); border: none; + border-top: 2px solid hsl(var(--border)); } /* Tauri 拖拽区域 */