From 26ea562fdbf4e0de5422bb856e1e3b2e84f09ca6 Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Fri, 11 Jul 2025 23:47:13 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20style(ui):=20move=20type-specifi?= =?UTF-8?q?c=20=E2=80=9COther=20/=20Organization=E2=80=9D=20inputs=20to=20?= =?UTF-8?q?Basic=20Info=20card=20for=20smoother=20channel=20setup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary • **EditChannel.js** – Relocated the following conditional inputs from “Advanced Settings” to the initial “Basic Info” card: • Model version (type 18) • Deployment region (type 41) • Knowledge-base ID (type 21) • Account ID (type 39) • Agent ID (type 49) • OpenAI organization (type 1) – No functional changes; layout only. Why These fields are commonly filled during the first steps of channel creation. Surfacing them earlier reduces scrolling and streamlines the user workflow. --- web/src/i18n/locales/en.json | 2 +- web/src/pages/Channel/EditChannel.js | 142 +++++++++++++-------------- 2 files changed, 72 insertions(+), 72 deletions(-) diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json index dd5acd99..8f3fd5de 100644 --- a/web/src/i18n/locales/en.json +++ b/web/src/i18n/locales/en.json @@ -1144,7 +1144,7 @@ "鉴权json": "Authentication JSON", "请输入鉴权json": "Please enter authentication JSON", "组织": "Organization", - "组织,可选,不填则为默认组织": "Organization (optional), default if empty", + "组织,不填则为默认组织": "Organization, default if empty", "请输入组织org-xxx": "Please enter organization org-xxx", "默认测试模型": "Default Test Model", "不填则为模型列表第一个": "First model in list if empty", diff --git a/web/src/pages/Channel/EditChannel.js b/web/src/pages/Channel/EditChannel.js index 024c15f6..07d08221 100644 --- a/web/src/pages/Channel/EditChannel.js +++ b/web/src/pages/Channel/EditChannel.js @@ -607,6 +607,77 @@ const EditChannel = (props) => { )} )} + + {inputs.type === 18 && ( + handleInputChange('other', value)} + showClear + /> + )} + + {inputs.type === 41 && ( + handleInputChange('other', value)} + extraText={ + handleInputChange('other', JSON.stringify(REGION_EXAMPLE, null, 2))} + > + {t('填入模板')} + + } + /> + )} + + {inputs.type === 21 && ( + handleInputChange('other', value)} + showClear + /> + )} + + {inputs.type === 39 && ( + handleInputChange('other', value)} + showClear + /> + )} + + {inputs.type === 49 && ( + handleInputChange('other', value)} + showClear + /> + )} + + {inputs.type === 1 && ( + handleInputChange('openai_organization', value)} + /> + )} {/* API Configuration Card */} @@ -862,77 +933,6 @@ const EditChannel = (props) => { onChange={(value) => handleInputChange('groups', value)} /> - {inputs.type === 18 && ( - handleInputChange('other', value)} - showClear - /> - )} - - {inputs.type === 41 && ( - handleInputChange('other', value)} - extraText={ - handleInputChange('other', JSON.stringify(REGION_EXAMPLE, null, 2))} - > - {t('填入模板')} - - } - /> - )} - - {inputs.type === 21 && ( - handleInputChange('other', value)} - showClear - /> - )} - - {inputs.type === 39 && ( - handleInputChange('other', value)} - showClear - /> - )} - - {inputs.type === 49 && ( - handleInputChange('other', value)} - showClear - /> - )} - - {inputs.type === 1 && ( - handleInputChange('openai_organization', value)} - /> - )} -