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
bd205f63
Commit
bd205f63
authored
Mar 04, 2024
by
StyleZhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: workflow route
parent
ac40eb8d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
15 deletions
+17
-15
AppCard.tsx
web/app/(commonLayout)/apps/AppCard.tsx
+3
-3
appForm.tsx
web/app/components/app/create-app-dialog/appForm.tsx
+4
-3
index.tsx
web/app/components/app/create-from-dsl-modal/index.tsx
+3
-3
index.tsx
web/app/components/explore/app-list/index.tsx
+3
-3
hooks.ts
web/app/components/workflow/hooks.ts
+4
-1
index.tsx
web/app/components/workflow/index.tsx
+0
-2
No files found.
web/app/(commonLayout)/apps/AppCard.tsx
View file @
bd205f63
...
...
@@ -122,12 +122,12 @@ const AppCard = ({ app, onRefresh }: AppCardProps) => {
})
localStorage
.
setItem
(
NEED_REFRESH_APP_LIST_KEY
,
'1'
)
if
(
!
isCurrentWorkspaceManager
)
{
push
(
`/app/
${
newApp
.
id
}
/
'overview'
`
)
push
(
`/app/
${
newApp
.
id
}
/
overview
`
)
}
else
{
if
(
newApp
.
mode
===
'workflow'
||
newApp
.
mode
===
'advanced-chat'
)
push
(
`/app/
${
newApp
.
id
}
/
'workflow'
`
)
push
(
`/app/
${
newApp
.
id
}
/
'configuration'
`
)
push
(
`/app/
${
newApp
.
id
}
/
workflow
`
)
push
(
`/app/
${
newApp
.
id
}
/
configuration
`
)
}
}
catch
(
e
)
{
...
...
web/app/components/app/create-app-dialog/appForm.tsx
View file @
bd205f63
...
...
@@ -74,12 +74,13 @@ const AppForm = ({
onHide
()
mutateApps
()
if
(
!
isCurrentWorkspaceManager
)
{
router
.
push
(
`/app/
${
app
.
id
}
/
'overview'
`
)
router
.
push
(
`/app/
${
app
.
id
}
/
overview
`
)
}
else
{
if
(
app
.
mode
===
'workflow'
||
app
.
mode
===
'advanced-chat'
)
router
.
push
(
`/app/
${
app
.
id
}
/'workflow'`
)
router
.
push
(
`/app/
${
app
.
id
}
/'configuration'`
)
router
.
push
(
`/app/
${
app
.
id
}
/workflow`
)
else
router
.
push
(
`/app/
${
app
.
id
}
/configuration`
)
}
}
catch
(
e
)
{
...
...
web/app/components/app/create-from-dsl-modal/index.tsx
View file @
bd205f63
...
...
@@ -68,12 +68,12 @@ const CreateFromDSLModal = ({ show, onSuccess, onClose }: CreateFromDSLModalProp
notify
({
type
:
'success'
,
message
:
t
(
'app.newApp.appCreated'
)
})
localStorage
.
setItem
(
NEED_REFRESH_APP_LIST_KEY
,
'1'
)
if
(
!
isCurrentWorkspaceManager
)
{
router
.
push
(
`/app/
${
app
.
id
}
/
'overview'
`
)
router
.
push
(
`/app/
${
app
.
id
}
/
overview
`
)
}
else
{
if
(
app
.
mode
===
'workflow'
||
app
.
mode
===
'advanced-chat'
)
router
.
push
(
`/app/
${
app
.
id
}
/
'workflow'
`
)
router
.
push
(
`/app/
${
app
.
id
}
/
'configuration'
`
)
router
.
push
(
`/app/
${
app
.
id
}
/
workflow
`
)
router
.
push
(
`/app/
${
app
.
id
}
/
configuration
`
)
}
}
catch
(
e
)
{
...
...
web/app/components/explore/app-list/index.tsx
View file @
bd205f63
...
...
@@ -90,12 +90,12 @@ const Apps = ({
})
localStorage
.
setItem
(
NEED_REFRESH_APP_LIST_KEY
,
'1'
)
if
(
!
isCurrentWorkspaceManager
)
{
router
.
push
(
`/app/
${
app
.
id
}
/
'overview'
`
)
router
.
push
(
`/app/
${
app
.
id
}
/
overview
`
)
}
else
{
if
(
app
.
mode
===
'workflow'
||
app
.
mode
===
'advanced-chat'
)
router
.
push
(
`/app/
${
app
.
id
}
/
'workflow'
`
)
router
.
push
(
`/app/
${
app
.
id
}
/
'configuration'
`
)
router
.
push
(
`/app/
${
app
.
id
}
/
workflow
`
)
router
.
push
(
`/app/
${
app
.
id
}
/
configuration
`
)
}
}
catch
(
e
)
{
...
...
web/app/components/workflow/hooks.ts
View file @
bd205f63
...
...
@@ -55,11 +55,14 @@ export const useWorkflow = () => {
}
=
store
.
getState
()
e
.
stopPropagation
()
const
newNodes
=
produce
(
getNodes
(),
(
draft
)
=>
{
const
nodes
=
getNodes
()
const
newNodes
=
produce
(
nodes
,
(
draft
)
=>
{
const
currentNode
=
draft
.
find
(
n
=>
n
.
id
===
node
.
id
)
!
currentNode
.
position
=
node
.
position
})
setNodes
(
newNodes
)
},
[
store
])
...
...
web/app/components/workflow/index.tsx
View file @
bd205f63
...
...
@@ -47,8 +47,6 @@ const Workflow: FC<WorkflowProps> = memo(({
const
[
edges
,
_
,
onEdgesChange
]
=
useEdgesState
(
initialEdges
)
// const nodesInitialized = useNodesInitialized()
console
.
log
(
nodes
)
const
{
// handleLayout,
...
...
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