From 7b20b6a2d8ab7a85cc582229955c9963897fdd33 Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Fri, 5 Jun 2026 12:53:07 +0800 Subject: [PATCH] Update global styles and refactor AssistantPage to use new UI components. Changed primary color variables in globals.css for improved theming. Refactored AssistantPage to incorporate Select and Card components, enhancing the UI structure and consistency. Updated button styles for better visual integration. --- src/app/globals.css | 6 +-- src/components/pages/AssistantPage.tsx | 75 +++++++++++++++++--------- 2 files changed, 53 insertions(+), 28 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index c56032b..bfd4bcb 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -55,7 +55,7 @@ --card-foreground: oklch(0.145 0 0); --popover: oklch(1 0 0); --popover-foreground: oklch(0.145 0 0); - --primary: oklch(0.205 0 0); + --primary: oklch(0.55 0.22 255); --primary-foreground: oklch(0.985 0 0); --secondary: oklch(0.97 0 0); --secondary-foreground: oklch(0.205 0 0); @@ -90,8 +90,8 @@ --card-foreground: oklch(0.985 0 0); --popover: oklch(0.205 0 0); --popover-foreground: oklch(0.985 0 0); - --primary: oklch(0.922 0 0); - --primary-foreground: oklch(0.205 0 0); + --primary: oklch(0.6 0.22 255); + --primary-foreground: oklch(0.985 0 0); --secondary: oklch(0.269 0 0); --secondary-foreground: oklch(0.985 0 0); --muted: oklch(0.269 0 0); diff --git a/src/components/pages/AssistantPage.tsx b/src/components/pages/AssistantPage.tsx index 255b8cf..357cbfc 100644 --- a/src/components/pages/AssistantPage.tsx +++ b/src/components/pages/AssistantPage.tsx @@ -16,6 +16,20 @@ import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Textarea } from "@/components/ui/textarea"; import { Switch } from "@/components/ui/switch"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/components/ui/card"; type AssistantForm = { name: string; @@ -67,7 +81,7 @@ export function AssistantPage() {
- @@ -193,20 +207,24 @@ function SectionCard({ children: React.ReactNode; }) { return ( -
-
-
- {icon} -
+ + +
+
+ {icon} +
-
-

{title}

-

{description}

+
+ {title} + + {description} + +
-
+
-
{children}
-
+ {children} + ); } @@ -271,20 +289,27 @@ function SelectField({ onChange: (value: string) => void; }) { return ( -