diff --git a/web/app/components/workflow/nodes/_base/components/selector.tsx b/web/app/components/workflow/nodes/_base/components/selector.tsx index 5580dd7b1a..12ba7d31db 100644 --- a/web/app/components/workflow/nodes/_base/components/selector.tsx +++ b/web/app/components/workflow/nodes/_base/components/selector.tsx @@ -16,6 +16,7 @@ type Props = { onChange: (value: any) => void uppercase?: boolean popupClassName?: string + itemClassName?: string readonly?: boolean showChecked?: boolean } @@ -27,6 +28,7 @@ const TypeSelector: FC = ({ onChange, uppercase, popupClassName, + itemClassName, readonly, showChecked, }) => { @@ -64,7 +66,7 @@ const TypeSelector: FC = ({ setHide() onChange(item.value) }} - className={cn(uppercase && 'uppercase', 'flex items-center h-[30px] justify-between min-w-[44px] px-3 rounded-lg cursor-pointer text-[13px] font-medium text-gray-700 hover:bg-gray-50')} + className={cn(itemClassName, uppercase && 'uppercase', 'flex items-center h-[30px] justify-between min-w-[44px] px-3 rounded-lg cursor-pointer text-[13px] font-medium text-gray-700 hover:bg-gray-50')} >
{item.label}
{showChecked && item.value === value && } diff --git a/web/app/components/workflow/nodes/if-else/components/condition-item.tsx b/web/app/components/workflow/nodes/if-else/components/condition-item.tsx index 3166bbc181..e82ca99cca 100644 --- a/web/app/components/workflow/nodes/if-else/components/condition-item.tsx +++ b/web/app/components/workflow/nodes/if-else/components/condition-item.tsx @@ -85,6 +85,7 @@ const Item: FC = ({ onLogicalOperatorToggle, }) => { const { t } = useTranslation() + const isValueReadOnly = [ComparisonOperator.empty, ComparisonOperator.notEmpty, ComparisonOperator.isNull, ComparisonOperator.isNotNull].includes(payload.comparison_operator) const handleVarReferenceChange = useCallback((value: ValueSelector) => { onChange({ @@ -140,8 +141,9 @@ const Item: FC = ({ +
{isComparisonOperatorNeedTranslate(payload.comparison_operator) ? t(`${i18nPrefix}.comparisonOperator.${payload.comparison_operator}`) : payload.comparison_operator}
} @@ -157,11 +159,11 @@ const Item: FC = ({ /> diff --git a/web/i18n/en-US/workflow.ts b/web/i18n/en-US/workflow.ts index 70c142bb12..d172ea442a 100644 --- a/web/i18n/en-US/workflow.ts +++ b/web/i18n/en-US/workflow.ts @@ -84,8 +84,8 @@ const translation = { 'end with': 'end with', 'is': 'is', 'is not': 'is not', - 'empty': 'empty', - 'not empty': 'not empty', + 'empty': 'is empty', + 'not empty': 'is not empty', 'null': 'is null', 'not null': 'is not null', },