From 43ed1c75332df518e536a0d97d60773dc88b9de8 Mon Sep 17 00:00:00 2001 From: Jason Date: Sun, 19 Oct 2025 21:46:16 +0800 Subject: [PATCH] refine: improve provider card UI with compact action buttons and simplified link styling - Convert edit and usage buttons to icon-only ghost variant for cleaner appearance - Reduce action button padding (px-2) and group spacing (gap-0) for more compact layout - Add red hover effect to delete icon for better visual feedback - Vertically center action buttons with provider info on desktop view - Simplify provider URL link by removing icon and using soft blue color (blue-400/300) - Reduce enable button width from 96px to 80px for better proportions --- src/components/providers/ProviderActions.tsx | 61 +++++++++++--------- src/components/providers/ProviderCard.tsx | 5 +- 2 files changed, 37 insertions(+), 29 deletions(-) diff --git a/src/components/providers/ProviderActions.tsx b/src/components/providers/ProviderActions.tsx index 553d57b..0705f38 100644 --- a/src/components/providers/ProviderActions.tsx +++ b/src/components/providers/ProviderActions.tsx @@ -1,4 +1,4 @@ -import { BarChart3, Check, Play, Trash2 } from "lucide-react"; +import { BarChart3, Check, Edit, Play, Trash2 } from "lucide-react"; import { useTranslation } from "react-i18next"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; @@ -28,7 +28,7 @@ export function ProviderActions({ onClick={onSwitch} disabled={isCurrent} className={cn( - "w-[96px]", + "w-20", isCurrent && "text-muted-foreground hover:text-muted-foreground", )} > @@ -45,32 +45,41 @@ export function ProviderActions({ )} - +
+ - + - + +
); } diff --git a/src/components/providers/ProviderCard.tsx b/src/components/providers/ProviderCard.tsx index 188370c..d9f7ff0 100644 --- a/src/components/providers/ProviderCard.tsx +++ b/src/components/providers/ProviderCard.tsx @@ -96,7 +96,7 @@ export function ProviderCard({ "cursor-grabbing border-primary/60 shadow-lg", )} > -
+
)}