From 94736407a0864ea1315f5435080a14555276354a Mon Sep 17 00:00:00 2001 From: "1808837298@qq.com" <1808837298@qq.com> Date: Fri, 21 Feb 2025 16:17:59 +0800 Subject: [PATCH] feat: Add base URL input with localized tooltip for channel configuration --- web/src/i18n/locales/en.json | 4 +++- web/src/pages/Channel/EditChannel.js | 26 ++++++++++++++------------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json index ca5e9c39..a2cb3b83 100644 --- a/web/src/i18n/locales/en.json +++ b/web/src/i18n/locales/en.json @@ -1268,5 +1268,7 @@ "保存设置": "Save settings", "通知邮箱": "Notification email", "设置用于接收额度预警的邮箱地址,不填则使用账号绑定的邮箱": "Set the email address for receiving quota warning notifications, if not set, the email address bound to the account will be used", - "留空则使用账号绑定的邮箱": "If left blank, the email address bound to the account will be used" + "留空则使用账号绑定的邮箱": "If left blank, the email address bound to the account will be used", + "代理站地址": "Base URL", + "对于官方渠道,new-api已经内置地址,除非是第三方代理站点或者Azure的特殊接入地址,否则不需要填写": "For official channels, the new-api has a built-in address. Unless it is a third-party proxy site or a special Azure access address, there is no need to fill it in" } \ No newline at end of file diff --git a/web/src/pages/Channel/EditChannel.js b/web/src/pages/Channel/EditChannel.js index e9861059..4720100a 100644 --- a/web/src/pages/Channel/EditChannel.js +++ b/web/src/pages/Channel/EditChannel.js @@ -540,21 +540,23 @@ const EditChannel = (props) => { value={inputs.name} autoComplete="new-password" /> - {inputs.type !== 3 && inputs.type !== 8 && inputs.type !== 22 && inputs.type !== 36 && ( + {inputs.type !== 3 && inputs.type !== 8 && inputs.type !== 22 && inputs.type !== 36 && inputs.type !== 45 && ( <>
- {t('BaseURL')}: + {t('代理站地址')}:
- { - handleInputChange('base_url', value); - }} - value={inputs.base_url} - autoComplete="new-password" - /> + + { + handleInputChange('base_url', value); + }} + value={inputs.base_url} + autoComplete="new-password" + /> + )}