From f31b821cc082f8324f36a25285d7c2a4600f10cc Mon Sep 17 00:00:00 2001 From: yangzheli <43645580+yangzheli@users.noreply.github.com> Date: Wed, 5 Nov 2025 09:29:13 +0800 Subject: [PATCH] fix(web): improve the consistency of the inputs-form UI (#27837) --- .../chat/chat-with-history/inputs-form/content.tsx | 2 +- .../chat/embedded-chatbot/inputs-form/content.tsx | 2 +- .../share/text-generation/run-once/index.tsx | 11 +++++++---- .../_base/components/before-run-form/form-item.tsx | 6 +++--- web/i18n/de-DE/app-debug.ts | 1 - web/i18n/en-US/app-debug.ts | 1 - web/i18n/es-ES/app-debug.ts | 1 - web/i18n/fa-IR/app-debug.ts | 1 - web/i18n/fr-FR/app-debug.ts | 1 - web/i18n/hi-IN/app-debug.ts | 1 - web/i18n/id-ID/app-debug.ts | 1 - web/i18n/it-IT/app-debug.ts | 1 - web/i18n/ja-JP/app-debug.ts | 1 - web/i18n/ko-KR/app-debug.ts | 1 - web/i18n/pl-PL/app-debug.ts | 1 - web/i18n/pt-BR/app-debug.ts | 1 - web/i18n/ro-RO/app-debug.ts | 1 - web/i18n/ru-RU/app-debug.ts | 1 - web/i18n/sl-SI/app-debug.ts | 1 - web/i18n/th-TH/app-debug.ts | 1 - web/i18n/tr-TR/app-debug.ts | 1 - web/i18n/uk-UA/app-debug.ts | 1 - web/i18n/vi-VN/app-debug.ts | 1 - web/i18n/zh-Hans/app-debug.ts | 1 - web/i18n/zh-Hant/app-debug.ts | 1 - 25 files changed, 12 insertions(+), 30 deletions(-) diff --git a/web/app/components/base/chat/chat-with-history/inputs-form/content.tsx b/web/app/components/base/chat/chat-with-history/inputs-form/content.tsx index 392bdf2b77..c7785ebd89 100644 --- a/web/app/components/base/chat/chat-with-history/inputs-form/content.tsx +++ b/web/app/components/base/chat/chat-with-history/inputs-form/content.tsx @@ -49,7 +49,7 @@ const InputsFormContent = ({ showTip }: Props) => {
{form.label}
{!form.required && ( -
{t('appDebug.variableTable.optional')}
+
{t('workflow.panel.optional')}
)}
)} diff --git a/web/app/components/base/chat/embedded-chatbot/inputs-form/content.tsx b/web/app/components/base/chat/embedded-chatbot/inputs-form/content.tsx index dd65f0ce72..caf4e363ff 100644 --- a/web/app/components/base/chat/embedded-chatbot/inputs-form/content.tsx +++ b/web/app/components/base/chat/embedded-chatbot/inputs-form/content.tsx @@ -49,7 +49,7 @@ const InputsFormContent = ({ showTip }: Props) => {
{form.label}
{!form.required && ( -
{t('appDebug.variableTable.optional')}
+
{t('workflow.panel.optional')}
)}
)} diff --git a/web/app/components/share/text-generation/run-once/index.tsx b/web/app/components/share/text-generation/run-once/index.tsx index d24428f32a..112f08a1d7 100644 --- a/web/app/components/share/text-generation/run-once/index.tsx +++ b/web/app/components/share/text-generation/run-once/index.tsx @@ -100,7 +100,10 @@ const RunOnce: FC = ({ : promptConfig.prompt_variables.map(item => (
{item.type !== 'checkbox' && ( - +
+
{item.name}
+ {!item.required && {t('workflow.panel.optional')}} +
)}
{item.type === 'select' && ( @@ -115,7 +118,7 @@ const RunOnce: FC = ({ {item.type === 'string' && ( ) => { handleInputsChange({ ...inputsRef.current, [item.key]: e.target.value }) }} maxLength={item.max_length || DEFAULT_VALUE_MAX_LEN} @@ -124,7 +127,7 @@ const RunOnce: FC = ({ {item.type === 'paragraph' && (