mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 09:58:04 +08:00
Merge branch 'main' into feat/hitl-frontend
This commit is contained in:
@ -95,7 +95,7 @@ const Base: FC<Props> = ({
|
||||
}}
|
||||
>
|
||||
{headerRight}
|
||||
{showCodeGenerator && codeLanguages && (
|
||||
{!!(showCodeGenerator && codeLanguages) && (
|
||||
<div className="ml-1">
|
||||
<CodeGeneratorButton
|
||||
onGenerated={onGenerated}
|
||||
@ -119,7 +119,7 @@ const Base: FC<Props> = ({
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{tip && <div className="px-1 py-0.5">{tip}</div>}
|
||||
{!!tip && <div className="px-1 py-0.5">{tip}</div>}
|
||||
<PromptEditorHeightResizeWrap
|
||||
height={isExpand ? editorExpandHeight : editorContentHeight}
|
||||
minHeight={editorContentMinHeight}
|
||||
|
||||
@ -46,7 +46,7 @@ const Field: FC<Props> = ({
|
||||
{' '}
|
||||
{required && <span className="text-text-destructive">*</span>}
|
||||
</div>
|
||||
{tooltip && (
|
||||
{!!tooltip && (
|
||||
<Tooltip
|
||||
popupContent={tooltip}
|
||||
popupClassName="ml-1"
|
||||
@ -55,13 +55,13 @@ const Field: FC<Props> = ({
|
||||
)}
|
||||
</div>
|
||||
<div className="flex">
|
||||
{operations && <div>{operations}</div>}
|
||||
{!!operations && <div>{operations}</div>}
|
||||
{supportFold && (
|
||||
<RiArrowDownSLine className="h-4 w-4 cursor-pointer text-text-tertiary transition-transform" style={{ transform: fold ? 'rotate(-90deg)' : 'rotate(0deg)' }} />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{children && (!supportFold || (supportFold && !fold)) && <div className={cn(!inline && 'mt-1')}>{children}</div>}
|
||||
{!!(children && (!supportFold || (supportFold && !fold))) && <div className={cn(!inline && 'mt-1')}>{children}</div>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -165,7 +165,7 @@ const Editor: FC<Props> = ({
|
||||
{' '}
|
||||
{required && <span className="text-text-destructive">*</span>}
|
||||
</div>
|
||||
{titleTooltip && <Tooltip popupContent={titleTooltip} />}
|
||||
{!!titleTooltip && <Tooltip popupContent={titleTooltip} />}
|
||||
</div>
|
||||
<div className="flex items-center">
|
||||
<div className="text-xs font-medium leading-[18px] text-text-tertiary">{value?.length || 0}</div>
|
||||
|
||||
@ -477,7 +477,6 @@ const formatItem = (
|
||||
break
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-duplicated-branches
|
||||
case BlockEnum.VariableAggregator: {
|
||||
const { output_type, advanced_settings }
|
||||
= data as VariableAssignerNodeType
|
||||
@ -1901,7 +1900,7 @@ export const updateNodeVars = (
|
||||
}
|
||||
break
|
||||
}
|
||||
// eslint-disable-next-line sonarjs/no-duplicated-branches
|
||||
|
||||
case BlockEnum.VariableAggregator: {
|
||||
const payload = data as VariableAssignerNodeType
|
||||
if (payload.variables) {
|
||||
|
||||
@ -61,7 +61,7 @@ const VariableLabel = ({
|
||||
notShowFullPath={notShowFullPath}
|
||||
/>
|
||||
{
|
||||
variableType && (
|
||||
!!variableType && (
|
||||
<div className="system-xs-regular shrink-0 text-text-tertiary">
|
||||
{capitalize(variableType)}
|
||||
</div>
|
||||
|
||||
@ -276,7 +276,7 @@ const BaseNode: FC<BaseNodeProps> = ({
|
||||
}
|
||||
</div>
|
||||
{
|
||||
data._iterationLength && data._iterationIndex && data._runningStatus === NodeRunningStatus.Running && (
|
||||
!!(data._iterationLength && data._iterationIndex && data._runningStatus === NodeRunningStatus.Running) && (
|
||||
<div className="mr-1.5 text-xs font-medium text-text-accent">
|
||||
{data._iterationIndex > data._iterationLength ? data._iterationLength : data._iterationIndex}
|
||||
/
|
||||
@ -285,7 +285,7 @@ const BaseNode: FC<BaseNodeProps> = ({
|
||||
)
|
||||
}
|
||||
{
|
||||
data.type === BlockEnum.Loop && data._loopIndex && LoopIndex
|
||||
!!(data.type === BlockEnum.Loop && data._loopIndex) && LoopIndex
|
||||
}
|
||||
{
|
||||
isLoading && <RiLoader2Line className="h-3.5 w-3.5 animate-spin text-text-accent" />
|
||||
@ -340,7 +340,7 @@ const BaseNode: FC<BaseNodeProps> = ({
|
||||
)
|
||||
}
|
||||
{
|
||||
data.desc && data.type !== BlockEnum.Iteration && data.type !== BlockEnum.Loop && (
|
||||
!!(data.desc && data.type !== BlockEnum.Iteration && data.type !== BlockEnum.Loop) && (
|
||||
<div className="system-xs-regular whitespace-pre-line break-words px-3 pb-2 pt-1 text-text-tertiary">
|
||||
{data.desc}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user