From 7ccef5f385c2f6164ad01c982b5693bcaa42414c Mon Sep 17 00:00:00 2001 From: Jason Date: Sat, 13 Sep 2025 21:48:18 +0800 Subject: [PATCH] fix(ui): add dark mode support for Kimi model selector - Update select dropdown with dark mode background and text colors - Add dark mode styles to labels and refresh button - Apply dark mode colors to error messages (red theme) - Ensure hint box uses consistent amber theme in dark mode - Fix chevron icon visibility in dark mode This ensures the Kimi provider configuration UI is properly visible and maintains consistency with other provider modals in dark mode. --- .../ProviderForm/KimiModelSelector.tsx | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/components/ProviderForm/KimiModelSelector.tsx b/src/components/ProviderForm/KimiModelSelector.tsx index 91d1d62..b8e70d6 100644 --- a/src/components/ProviderForm/KimiModelSelector.tsx +++ b/src/components/ProviderForm/KimiModelSelector.tsx @@ -86,10 +86,10 @@ const KimiModelSelector: React.FC = ({ } }, [debouncedKey]); - const selectClass = `w-full px-3 py-2 border rounded-lg text-sm transition-colors appearance-none bg-white ${ + const selectClass = `w-full px-3 py-2 border rounded-lg text-sm transition-colors appearance-none bg-white dark:bg-gray-800 ${ disabled - ? "bg-gray-100 border-gray-200 text-gray-400 cursor-not-allowed" - : "border-gray-200 focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500" + ? "bg-gray-100 dark:bg-gray-800 border-gray-200 dark:border-gray-700 text-gray-400 dark:text-gray-500 cursor-not-allowed" + : "border-gray-200 dark:border-gray-700 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:focus:ring-blue-400/20 focus:border-blue-500 dark:focus:border-blue-400" }`; const ModelSelect: React.FC<{ @@ -98,7 +98,9 @@ const KimiModelSelector: React.FC = ({ onChange: (value: string) => void; }> = ({ label, value, onChange }) => (
- +
@@ -130,12 +132,14 @@ const KimiModelSelector: React.FC = ({ return (
-

模型配置

+

+ 模型配置 +

{error && ( -
- -

{error}

+
+ +

{error}

)} @@ -165,8 +172,8 @@ const KimiModelSelector: React.FC = ({
{!apiKey.trim() && ( -
-

+

+

💡 填写 API Key 后将自动获取可用模型列表