diff --git a/web/app/components/app/configuration/config-var/config-modal/__tests__/form-fields.spec.tsx b/web/app/components/app/configuration/config-var/config-modal/__tests__/form-fields.spec.tsx index 0740f0cde3..1ce6a4d0e5 100644 --- a/web/app/components/app/configuration/config-var/config-modal/__tests__/form-fields.spec.tsx +++ b/web/app/components/app/configuration/config-var/config-modal/__tests__/form-fields.spec.tsx @@ -57,6 +57,12 @@ vi.mock('@/app/components/base/ui/select', () => ({ SelectItem: ({ children }: { children: ReactNode }) =>
{children}
, })) +vi.mock('@/app/components/base/ui/tooltip', () => ({ + Tooltip: ({ children }: { children: ReactNode }) =>
{children}
, + TooltipTrigger: ({ children }: { children: ReactNode }) =>
{children}
, + TooltipContent: ({ children }: { children: ReactNode }) =>
{children}
, +})) + vi.mock('../field', () => ({ default: ({ children, title }: { children: ReactNode, title: string }) => (
@@ -169,6 +175,8 @@ describe('ConfigModalFormFields', () => { allowed_file_upload_methods: ['remote_url'], } render() + expect(screen.getByText('variableConfig.hidden')).toBeInTheDocument() + expect(screen.getByText('variableConfig.hiddenDescription')).toBeInTheDocument() fireEvent.click(screen.getByText('single-file-setting')) fireEvent.click(screen.getByText('upload-file')) fireEvent.click(screen.getAllByText('unchecked')[0]) diff --git a/web/app/components/app/configuration/config-var/config-modal/form-fields.tsx b/web/app/components/app/configuration/config-var/config-modal/form-fields.tsx index 360efc2ac2..1aa12320aa 100644 --- a/web/app/components/app/configuration/config-var/config-modal/form-fields.tsx +++ b/web/app/components/app/configuration/config-var/config-modal/form-fields.tsx @@ -3,6 +3,7 @@ import type { ChangeEvent, FC } from 'react' import type { Item as SelectOptionItem } from './type-select' import type { FileEntity } from '@/app/components/base/file-uploader/types' import type { InputVar, UploadFileSetting } from '@/app/components/workflow/types' +import { RiQuestionLine } from '@remixicon/react' import * as React from 'react' import Checkbox from '@/app/components/base/checkbox' import { FileUploaderInAttachmentWrapper } from '@/app/components/base/file-uploader' @@ -15,6 +16,7 @@ import { SelectTrigger, SelectValue, } from '@/app/components/base/ui/select' +import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip' import CodeEditor from '@/app/components/workflow/nodes/_base/components/editor/code-editor' import FileUploadSetting from '@/app/components/workflow/nodes/_base/components/file-upload-setting' import { CodeLanguage } from '@/app/components/workflow/nodes/code/types' @@ -219,7 +221,19 @@ const ConfigModalFormFields: FC = ({
onPayloadChange('hide')(!tempPayload.hide)} /> - {t('variableConfig.hide', { ns: 'appDebug' })} +
+ {t('variableConfig.hidden', { ns: 'appDebug' })} + + +
+ +
+
+ + {t('variableConfig.hiddenDescription', { ns: 'appDebug' })} + +
+
) diff --git a/web/i18n/en-US/app-debug.json b/web/i18n/en-US/app-debug.json index 9c64405ecc..fa80e638c2 100644 --- a/web/i18n/en-US/app-debug.json +++ b/web/i18n/en-US/app-debug.json @@ -325,6 +325,8 @@ "variableConfig.file.image.name": "Image", "variableConfig.file.supportFileTypes": "Support File Types", "variableConfig.file.video.name": "Video", + "variableConfig.hidden": "Hidden", + "variableConfig.hiddenDescription": "Hidden fields are not shown in the Web App start form and can be filled through URL query parameters.", "variableConfig.hide": "Hide", "variableConfig.inputPlaceholder": "Please input", "variableConfig.json": "JSON Code", diff --git a/web/i18n/zh-Hans/app-debug.json b/web/i18n/zh-Hans/app-debug.json index fb4f231852..3f4dbdd193 100644 --- a/web/i18n/zh-Hans/app-debug.json +++ b/web/i18n/zh-Hans/app-debug.json @@ -325,6 +325,8 @@ "variableConfig.file.image.name": "图片", "variableConfig.file.supportFileTypes": "支持的文件类型", "variableConfig.file.video.name": "视频", + "variableConfig.hidden": "Hidden", + "variableConfig.hiddenDescription": "隐藏字段不会显示在 Web App 的开始表单中,可通过 URL 查询参数传值。", "variableConfig.hide": "隐藏", "variableConfig.inputPlaceholder": "请输入", "variableConfig.json": "JSON",