mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 09:28:04 +08:00
mrege
This commit is contained in:
@ -50,7 +50,7 @@ const AddBlock = ({
|
||||
const renderTriggerElement = useCallback((open: boolean) => {
|
||||
return (
|
||||
<div className={cn(
|
||||
'system-sm-medium relative inline-flex h-8 cursor-pointer items-center rounded-lg border-[0.5px] border-components-button-secondary-border bg-components-button-secondary-bg px-3 text-components-button-secondary-text shadow-xs backdrop-blur-[5px] hover:bg-components-button-secondary-bg-hover',
|
||||
'relative inline-flex h-8 cursor-pointer items-center rounded-lg border-[0.5px] border-components-button-secondary-border bg-components-button-secondary-bg px-3 text-components-button-secondary-text shadow-xs backdrop-blur-[5px] system-sm-medium hover:bg-components-button-secondary-bg-hover',
|
||||
`${nodesReadOnly && '!cursor-not-allowed bg-components-button-secondary-bg-disabled'}`,
|
||||
open && 'bg-components-button-secondary-bg-hover',
|
||||
)}
|
||||
|
||||
@ -73,7 +73,7 @@ const ConditionValue = ({
|
||||
|
||||
return (
|
||||
<div className="rounded-md bg-workflow-block-parma-bg">
|
||||
<div className="flex h-6 items-center px-1 ">
|
||||
<div className="flex h-6 items-center px-1">
|
||||
<VariableLabelInNode
|
||||
className="w-0 grow"
|
||||
variables={variableSelector}
|
||||
@ -90,9 +90,9 @@ const ConditionValue = ({
|
||||
{
|
||||
sub_variable_condition?.conditions.map((c: Condition, index) => (
|
||||
<div className="relative flex h-6 items-center space-x-1" key={c.id}>
|
||||
<div className="system-xs-medium text-text-accent">{c.key}</div>
|
||||
<div className="system-xs-medium text-text-primary">{isComparisonOperatorNeedTranslate(c.comparison_operator) ? t(`nodes.ifElse.comparisonOperator.${c.comparison_operator}`, { ns: 'workflow' }) : c.comparison_operator}</div>
|
||||
{c.comparison_operator && !isEmptyRelatedOperator(c.comparison_operator) && <div className="system-xs-regular text-text-secondary">{isSelect(c) ? selectName(c) : formatValue(c)}</div>}
|
||||
<div className="text-text-accent system-xs-medium">{c.key}</div>
|
||||
<div className="text-text-primary system-xs-medium">{isComparisonOperatorNeedTranslate(c.comparison_operator) ? t(`nodes.ifElse.comparisonOperator.${c.comparison_operator}`, { ns: 'workflow' }) : c.comparison_operator}</div>
|
||||
{c.comparison_operator && !isEmptyRelatedOperator(c.comparison_operator) && <div className="text-text-secondary system-xs-regular">{isSelect(c) ? selectName(c) : formatValue(c)}</div>}
|
||||
{index !== sub_variable_condition.conditions.length - 1 && (<div className="absolute bottom-[-10px] right-1 z-10 text-[10px] font-medium uppercase leading-4 text-text-accent">{t(`${i18nPrefix}.${sub_variable_condition.logical_operator}`, { ns: 'workflow' })}</div>)}
|
||||
</div>
|
||||
))
|
||||
|
||||
@ -228,11 +228,11 @@ const ConditionItem = ({
|
||||
<div className="flex cursor-pointer justify-start">
|
||||
<div className="inline-flex h-6 max-w-full items-center rounded-md border-[0.5px] border-components-panel-border-subtle bg-components-badge-white-to-dark px-1.5 text-text-accent shadow-xs">
|
||||
<Variable02 className="h-3.5 w-3.5 shrink-0 text-text-accent" />
|
||||
<div className="system-xs-medium ml-0.5 truncate">{item?.name}</div>
|
||||
<div className="ml-0.5 truncate system-xs-medium">{item?.name}</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
: <div className="system-sm-regular text-left text-components-input-text-placeholder">{t('placeholder.select', { ns: 'common' })}</div>
|
||||
: <div className="text-left text-components-input-text-placeholder system-sm-regular">{t('placeholder.select', { ns: 'common' })}</div>
|
||||
)}
|
||||
hideChecked
|
||||
/>
|
||||
|
||||
@ -147,7 +147,7 @@ const ConditionNumberInput = ({
|
||||
}
|
||||
{
|
||||
numberVarType === NumberVarType.constant && (
|
||||
<div className=" relative">
|
||||
<div className="relative">
|
||||
<input
|
||||
className={cn('block w-full appearance-none bg-transparent px-2 text-[13px] text-components-input-text-filled outline-none placeholder:text-components-input-text-placeholder', unit && 'pr-6')}
|
||||
type="number"
|
||||
@ -157,7 +157,7 @@ const ConditionNumberInput = ({
|
||||
onFocus={setFocus}
|
||||
onBlur={setBlur}
|
||||
/>
|
||||
{!isFocus && unit && <div className="system-sm-regular absolute right-2 top-[50%] translate-y-[-50%] text-text-tertiary">{unit}</div>}
|
||||
{!isFocus && unit && <div className="absolute right-2 top-[50%] translate-y-[-50%] text-text-tertiary system-sm-regular">{unit}</div>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ const ConditionWrap: FC<Props> = ({
|
||||
<div
|
||||
className={cn(
|
||||
'group relative rounded-[10px] bg-components-panel-bg',
|
||||
!isSubVariable && 'min-h-[40px] px-3 py-1 ',
|
||||
!isSubVariable && 'min-h-[40px] px-3 py-1',
|
||||
isSubVariable && 'px-1 py-2',
|
||||
)}
|
||||
>
|
||||
|
||||
@ -4,7 +4,7 @@ const Empty = () => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
return (
|
||||
<div className="system-xs-regular flex h-10 items-center justify-center rounded-[10px] bg-background-section text-text-tertiary">
|
||||
<div className="flex h-10 items-center justify-center rounded-[10px] bg-background-section text-text-tertiary system-xs-regular">
|
||||
{t('nodes.loop.setLoopVariables', { ns: 'workflow' })}
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user