From 1be7e28b636930919e082a6853f3ffc69ed369d2 Mon Sep 17 00:00:00 2001
From: paisley <8197966+su8su@users.noreply.github.com>
Date: Sun, 8 Mar 2026 13:56:46 +0800
Subject: [PATCH] fix: provider settings UI, OpenRouter model field, merge
resolution, i18n
---
src/components/settings/ProvidersSettings.tsx | 82 ++++---------------
src/i18n/locales/en/settings.json | 13 +++
src/i18n/locales/ja/settings.json | 13 +++
src/i18n/locales/zh/settings.json | 13 +++
4 files changed, 54 insertions(+), 67 deletions(-)
diff --git a/src/components/settings/ProvidersSettings.tsx b/src/components/settings/ProvidersSettings.tsx
index e6658a8..342f430 100644
--- a/src/components/settings/ProvidersSettings.tsx
+++ b/src/components/settings/ProvidersSettings.tsx
@@ -72,16 +72,19 @@ function fallbackModelsEqual(a?: string[], b?: string[]): boolean {
return left.length === right.length && left.every((model, index) => model === right[index]);
}
-function getAuthModeLabel(authMode: ProviderAccount['authMode']): string {
+function getAuthModeLabel(
+ authMode: ProviderAccount['authMode'],
+ t: (key: string) => string
+): string {
switch (authMode) {
case 'api_key':
- return 'API Key';
+ return t('aiProviders.authModes.apiKey');
case 'oauth_device':
- return 'OAuth Device';
+ return t('aiProviders.authModes.oauthDevice');
case 'oauth_browser':
- return 'OAuth Browser';
+ return t('aiProviders.authModes.oauthBrowser');
case 'local':
- return 'Local';
+ return t('aiProviders.authModes.local');
default:
return authMode;
}
@@ -174,14 +177,6 @@ export function ProvidersSettings() {
return (
- {accounts.length > 0 && (
-
- )}
-
diff --git a/src/i18n/locales/en/settings.json b/src/i18n/locales/en/settings.json
index dab3ced..67c683d 100644
--- a/src/i18n/locales/en/settings.json
+++ b/src/i18n/locales/en/settings.json
@@ -13,6 +13,19 @@
"aiProviders": {
"title": "AI Providers",
"description": "Configure your AI model providers and API keys",
+ "overview": {
+ "title": "Provider Accounts",
+ "description": "A summary of the provider accounts and models currently configured.",
+ "noModelSelected": "No model selected",
+ "multiAccountReady": "Multi-account ready",
+ "singletonVendor": "Single-account vendor"
+ },
+ "authModes": {
+ "apiKey": "API Key",
+ "oauthDevice": "OAuth Device",
+ "oauthBrowser": "OAuth Browser",
+ "local": "Local"
+ },
"sections": {
"model": "Model Settings",
"fallback": "Fallback Settings"
diff --git a/src/i18n/locales/ja/settings.json b/src/i18n/locales/ja/settings.json
index 6252650..d3de778 100644
--- a/src/i18n/locales/ja/settings.json
+++ b/src/i18n/locales/ja/settings.json
@@ -13,6 +13,19 @@
"aiProviders": {
"title": "AI プロバイダー",
"description": "AI モデルプロバイダーと API キーを設定",
+ "overview": {
+ "title": "プロバイダーアカウント",
+ "description": "現在設定されているプロバイダーアカウントとモデルの概要です。",
+ "noModelSelected": "モデル未選択",
+ "multiAccountReady": "複数アカウント対応",
+ "singletonVendor": "単一アカウントのプロバイダー"
+ },
+ "authModes": {
+ "apiKey": "API キー",
+ "oauthDevice": "OAuth デバイス",
+ "oauthBrowser": "OAuth ブラウザ",
+ "local": "ローカル"
+ },
"sections": {
"model": "モデル設定",
"fallback": "フォールバック設定"
diff --git a/src/i18n/locales/zh/settings.json b/src/i18n/locales/zh/settings.json
index 04b33cd..05f80f5 100644
--- a/src/i18n/locales/zh/settings.json
+++ b/src/i18n/locales/zh/settings.json
@@ -13,6 +13,19 @@
"aiProviders": {
"title": "AI 模型提供商",
"description": "配置 AI 模型提供商和 API 密钥",
+ "overview": {
+ "title": "提供商账户",
+ "description": "这里汇总当前已配置的 provider 账户与模型信息。",
+ "noModelSelected": "未选择模型",
+ "multiAccountReady": "支持多账户",
+ "singletonVendor": "单例提供商"
+ },
+ "authModes": {
+ "apiKey": "API 密钥",
+ "oauthDevice": "OAuth 设备登录",
+ "oauthBrowser": "OAuth 浏览器登录",
+ "local": "本地"
+ },
"sections": {
"model": "模型配置",
"fallback": "回退配置"