mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
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:
@@ -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",
|
||||
)}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user