From 769be13189369ec55513135ae06bff556cefe8df Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 23 Feb 2024 13:55:43 +0800 Subject: [PATCH] chore: add api key and value placeholder (#2538) --- .../edit-custom-collection-modal/config-credentials.tsx | 8 ++++++-- web/i18n/lang/tools.en.ts | 2 ++ web/i18n/lang/tools.zh.ts | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx b/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx index 150768096d..1deef1b531 100644 --- a/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx +++ b/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx @@ -79,7 +79,9 @@ const ConfigCredential: FC = ({ setTempCredential({ ...tempCredential, api_key_header: e.target.value })} - className='w-full h-10 px-3 text-sm font-normal bg-gray-100 rounded-lg grow' /> + className='w-full h-10 px-3 text-sm font-normal bg-gray-100 rounded-lg grow' + placeholder={t('tools.createTool.authMethod.types.apiKeyPlaceholder')!} + />
@@ -87,7 +89,9 @@ const ConfigCredential: FC = ({ setTempCredential({ ...tempCredential, api_key_value: e.target.value })} - className='w-full h-10 px-3 text-sm font-normal bg-gray-100 rounded-lg grow' /> + className='w-full h-10 px-3 text-sm font-normal bg-gray-100 rounded-lg grow' + placeholder={t('tools.createTool.authMethod.types.apiValuePlaceholder')!} + />
)} diff --git a/web/i18n/lang/tools.en.ts b/web/i18n/lang/tools.en.ts index 57f12d3bf4..9746fab8bc 100644 --- a/web/i18n/lang/tools.en.ts +++ b/web/i18n/lang/tools.en.ts @@ -54,6 +54,8 @@ const translation = { types: { none: 'None', api_key: 'API Key', + apiKeyPlaceholder: 'HTTP header name for API Key', + apiValuePlaceholder: 'Enter API Key', }, key: 'Key', value: 'Value', diff --git a/web/i18n/lang/tools.zh.ts b/web/i18n/lang/tools.zh.ts index 6777ace235..ff3b5c0fb8 100644 --- a/web/i18n/lang/tools.zh.ts +++ b/web/i18n/lang/tools.zh.ts @@ -54,6 +54,8 @@ const translation = { types: { none: '无', api_key: 'API Key', + apiKeyPlaceholder: 'HTTP 头部名称,用于传递 API Key', + apiValuePlaceholder: '输入 API Key', }, key: '键', value: '值',