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
7a438f89
Commit
7a438f89
authored
Feb 28, 2024
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: assign var
parent
113af85c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
node.tsx
web/app/components/workflow/nodes/variable-assigner/node.tsx
+10
-1
No files found.
web/app/components/workflow/nodes/variable-assigner/node.tsx
View file @
7a438f89
import
type
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
{
useState
}
from
'react'
import
{
useTranslation
}
from
'react-i18next'
import
{
useTranslation
}
from
'react-i18next'
import
{
mockData
}
from
'./mock'
import
{
mockData
}
from
'./mock'
import
{
getNodeInfoById
}
from
'@/app/components/workflow/nodes/_base/components/variable/var-reference-picker'
import
{
getNodeInfoById
}
from
'@/app/components/workflow/nodes/_base/components/variable/var-reference-picker'
...
@@ -9,7 +10,9 @@ const i18nPrefix = 'workflow.nodes.variableAssigner'
...
@@ -9,7 +10,9 @@ const i18nPrefix = 'workflow.nodes.variableAssigner'
const
Node
:
FC
=
()
=>
{
const
Node
:
FC
=
()
=>
{
const
{
t
}
=
useTranslation
()
const
{
t
}
=
useTranslation
()
const
{
variables
,
output_type
}
=
mockData
const
{
variables
:
tempVar
,
output_type
}
=
mockData
const
[
variables
,
setVariables
]
=
useState
(
tempVar
)
// TODO: get var type through node and value
// TODO: get var type through node and value
const
getVarType
=
()
=>
{
const
getVarType
=
()
=>
{
return
'string'
return
'string'
...
@@ -54,6 +57,12 @@ const Node: FC = () => {
...
@@ -54,6 +57,12 @@ const Node: FC = () => {
)
}
)
}
</
div
>
</
div
>
<
div
className=
'mt-1 flex items-center h-6 justify-center bg-gray-100 rounded-md px-1 space-x-1 text-xs font-normal text-gray-700'
onClick=
{
()
=>
{
setVariables
([...
variables
,
[]])
}
}
>
Add
</
div
>
<
div
className=
'mt-2 flex items-center h-6 justify-between bg-gray-100 rounded-md px-1 space-x-1 text-xs font-normal text-gray-700'
>
<
div
className=
'mt-2 flex items-center h-6 justify-between bg-gray-100 rounded-md px-1 space-x-1 text-xs font-normal text-gray-700'
>
<
div
className=
'text-xs font-medium text-gray-500 uppercase'
>
<
div
className=
'text-xs font-medium text-gray-500 uppercase'
>
{
t
(
`${i18nPrefix}.outputType`
)
}
{
t
(
`${i18nPrefix}.outputType`
)
}
...
...
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