Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
307cbf1d
Commit
307cbf1d
authored
Feb 23, 2024
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: input no var tip
parent
e7ecdb01
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
var-list.tsx
...p/components/workflow/nodes/start/components/var-list.tsx
+12
-0
workflow.ts
web/i18n/en-US/workflow.ts
+1
-0
workflow.ts
web/i18n/zh-Hans/workflow.ts
+1
-0
No files found.
web/app/components/workflow/nodes/start/components/var-list.tsx
View file @
307cbf1d
...
...
@@ -2,8 +2,10 @@
import
type
{
FC
}
from
'react'
import
React
,
{
useCallback
}
from
'react'
import
produce
from
'immer'
import
{
useTranslation
}
from
'react-i18next'
import
VarItem
from
'./var-item'
import
type
{
InputVar
}
from
'@/app/components/workflow/types'
type
Props
=
{
readonly
:
boolean
list
:
InputVar
[]
...
...
@@ -15,6 +17,8 @@ const VarList: FC<Props> = ({
list
,
onChange
,
})
=>
{
const
{
t
}
=
useTranslation
()
const
handleVarNameChange
=
useCallback
((
index
:
number
)
=>
{
return
(
payload
:
InputVar
)
=>
{
const
newList
=
produce
(
list
,
(
draft
)
=>
{
...
...
@@ -33,6 +37,14 @@ const VarList: FC<Props> = ({
}
},
[
list
,
onChange
])
if
(
list
.
length
===
0
)
{
return
(
<
div
className=
'flex rounded-md bg-gray-50 items-center h-[42px] justify-center leading-[18px] text-xs font-normal text-gray-500'
>
{
t
(
'workflow.nodes.start.noVarTip'
)
}
</
div
>
)
}
return
(
<
div
className=
'space-y-1'
>
{
list
.
map
((
item
,
index
)
=>
(
...
...
web/i18n/en-US/workflow.ts
View file @
307cbf1d
...
...
@@ -17,6 +17,7 @@ const translation = {
},
files
:
'File list'
,
},
noVarTip
:
'Set inputs that can be used in the Workflow'
,
},
end
:
{
outputs
:
'Outputs'
,
...
...
web/i18n/zh-Hans/workflow.ts
View file @
307cbf1d
...
...
@@ -16,6 +16,7 @@ const translation = {
},
files
:
'文件列表'
,
},
noVarTip
:
'设置的输入可在工作流程中使用'
,
},
end
:
{
outputs
:
'输出'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment