fix(ui): persist active provider card highlight when not hovered

The selected provider's visual highlight (background, border, glow)
was being overridden by .glass-card base styles due to CSS specificity.
Add dedicated .glass-card-active class to ensure active state persists.
This commit is contained in:
Jason
2025-11-29 20:19:17 +08:00
parent 9db85dd4dc
commit 526c7406fa
2 changed files with 14 additions and 3 deletions
+1 -3
View File
@@ -116,9 +116,7 @@ export function ProviderCard({
className={cn(
"glass-card relative overflow-hidden rounded-xl p-4 transition-all duration-300",
"group hover:bg-black/[0.02] dark:hover:bg-white/[0.02] hover:border-primary/50",
isCurrent
? "border-primary/50 bg-primary/5 shadow-[0_0_20px_rgba(59,130,246,0.15)]"
: "hover:scale-[1.01]",
isCurrent ? "glass-card-active" : "hover:scale-[1.01]",
dragHandleProps?.isDragging &&
"cursor-grabbing border-primary shadow-lg scale-105 z-10",
)}
+13
View File
@@ -103,6 +103,19 @@
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}
/* 供应商卡片选中状态 */
.glass-card-active {
background: rgba(59, 130, 246, 0.08);
border: 1px solid rgba(59, 130, 246, 0.4);
box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}
.dark .glass-card-active {
background: rgba(59, 130, 246, 0.12);
border: 1px solid rgba(59, 130, 246, 0.3);
box-shadow: 0 0 24px rgba(59, 130, 246, 0.2);
}
.glass-header {
background: hsl(var(--background));
backdrop-filter: none;