diff --git a/qwen3-tts-frontend/src/components/HistoryItem.tsx b/qwen3-tts-frontend/src/components/HistoryItem.tsx index caee2ed..b2dae23 100644 --- a/qwen3-tts-frontend/src/components/HistoryItem.tsx +++ b/qwen3-tts-frontend/src/components/HistoryItem.tsx @@ -124,9 +124,9 @@ const HistoryItem = memo(({ job, onDelete, onLoadParams }: HistoryItemProps) => diff --git a/qwen3-tts-frontend/src/components/ui/tabs.tsx b/qwen3-tts-frontend/src/components/ui/tabs.tsx index f57fffd..00c932a 100644 --- a/qwen3-tts-frontend/src/components/ui/tabs.tsx +++ b/qwen3-tts-frontend/src/components/ui/tabs.tsx @@ -1,5 +1,6 @@ import * as React from "react" import * as TabsPrimitive from "@radix-ui/react-tabs" +import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" @@ -20,16 +21,36 @@ const TabsList = React.forwardRef< )) TabsList.displayName = TabsPrimitive.List.displayName +const tabsTriggerVariants = cva( + "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 h-full text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", + { + variants: { + variant: { + default: + "text-muted-foreground hover:bg-primary/10 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm", + secondary: + "text-muted-foreground hover:bg-secondary/50 data-[state=active]:bg-secondary data-[state=active]:text-secondary-foreground data-[state=active]:shadow-sm", + outline: + "text-muted-foreground hover:bg-accent/10 data-[state=active]:bg-accent data-[state=active]:text-accent-foreground data-[state=active]:shadow-sm", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +export interface TabsTriggerProps + extends React.ComponentPropsWithoutRef, + VariantProps {} + const TabsTrigger = React.forwardRef< React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( + TabsTriggerProps +>(({ className, variant, ...props }, ref) => ( )) diff --git a/qwen3-tts-frontend/src/index.css b/qwen3-tts-frontend/src/index.css index 053089b..a29f123 100644 --- a/qwen3-tts-frontend/src/index.css +++ b/qwen3-tts-frontend/src/index.css @@ -31,14 +31,14 @@ --card-foreground: 222.2 84% 4.9%; --popover: 0 0% 100%; --popover-foreground: 222.2 84% 4.9%; - --primary: 222.2 47.4% 11.2%; - --primary-foreground: 210 40% 98%; - --secondary: 210 40% 96.1%; - --secondary-foreground: 222.2 47.4% 11.2%; + --primary: 209 37% 21%; + --primary-foreground: 38 43% 86%; + --secondary: 197 26% 67%; + --secondary-foreground: 209 37% 21%; --muted: 210 40% 96.1%; --muted-foreground: 215.4 16.3% 46.9%; - --accent: 210 40% 96.1%; - --accent-foreground: 222.2 47.4% 11.2%; + --accent: 38 43% 86%; + --accent-foreground: 209 37% 21%; --destructive: 0 84.2% 60.2%; --destructive-foreground: 210 40% 98%; --border: 214.3 31.8% 91.4%; @@ -59,14 +59,14 @@ --card-foreground: 0 0% 98%; --popover: 0 0% 5%; --popover-foreground: 0 0% 98%; - --primary: 0 0% 98%; - --primary-foreground: 0 0% 11%; - --secondary: 0 0% 17.5%; - --secondary-foreground: 0 0% 98%; + --primary: 206 27% 45%; + --primary-foreground: 38 43% 86%; + --secondary: 197 26% 67%; + --secondary-foreground: 209 37% 21%; --muted: 0 0% 17.5%; --muted-foreground: 0 0% 65%; - --accent: 0 0% 17.5%; - --accent-foreground: 0 0% 98%; + --accent: 209 37% 21%; + --accent-foreground: 197 26% 67%; --destructive: 0 62.8% 30.6%; --destructive-foreground: 0 0% 98%; --border: 0 0% 17.5%; diff --git a/qwen3-tts-frontend/src/pages/Home.tsx b/qwen3-tts-frontend/src/pages/Home.tsx index 2f1f664..f3529f9 100644 --- a/qwen3-tts-frontend/src/pages/Home.tsx +++ b/qwen3-tts-frontend/src/pages/Home.tsx @@ -65,15 +65,15 @@ function Home() { - + 自定义 - + 设计 - + 克隆