From 67db492330ef73af67a71c06be263e4a31cde43a Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 19 Sep 2025 11:26:51 +0800 Subject: [PATCH] fix: prevent layout shift when switching providers - Keep 'Current' badge always rendered with invisible class when not active - Keep 'Apply to VS Code' button always rendered with invisible class when not active - Use consistent border width (1px) for both selected and unselected cards - Remove ring utility that was causing extra space outside elements This ensures all provider cards maintain the same height regardless of selection state --- src/components/ProviderList.tsx | 16 +++++++++------- src/lib/styles.ts | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/ProviderList.tsx b/src/components/ProviderList.tsx index a4a886a..d08cd6b 100644 --- a/src/components/ProviderList.tsx +++ b/src/components/ProviderList.tsx @@ -221,12 +221,13 @@ const ProviderList: React.FC = ({ {provider.name} {/* 分类徽章已移除 */} - {isCurrent && ( -
- - 当前使用 -
- )} +
+ + 当前使用 +
@@ -253,7 +254,7 @@ const ProviderList: React.FC = ({
- {appType === "codex" && isCurrent && provider.category !== "official" && ( + {appType === "codex" && provider.category !== "official" && (