From 7e9930fe503826fcaa93f41d93fb5d33e4eba069 Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 22 Sep 2025 22:16:47 +0800 Subject: [PATCH] fix: stabilize provider action button width and improve visual consistency - Set fixed width (76px) for enable/active buttons to prevent layout shift - Hide play icon in active state to optimize space usage - Add center alignment and nowrap to ensure consistent appearance --- src/components/ProviderList.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ProviderList.tsx b/src/components/ProviderList.tsx index c9dd708..785e7f1 100644 --- a/src/components/ProviderList.tsx +++ b/src/components/ProviderList.tsx @@ -305,13 +305,13 @@ const ProviderList: React.FC = ({ onClick={() => onSwitch(provider.id)} disabled={isCurrent} className={cn( - "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-md transition-colors", + "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-md transition-colors w-[76px] justify-center whitespace-nowrap", isCurrent ? "bg-gray-100 text-gray-400 dark:bg-gray-800 dark:text-gray-500 cursor-not-allowed" : "bg-blue-500 text-white hover:bg-blue-600 dark:bg-blue-600 dark:hover:bg-blue-700" )} > - + {!isCurrent && } {isCurrent ? "使用中" : "启用"}