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
430569d4
Commit
430569d4
authored
Mar 05, 2024
by
StyleZhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app detail
parent
d3dfadbd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
10 deletions
+24
-10
index.tsx
web/app/components/workflow/header/index.tsx
+4
-3
index.tsx
web/app/components/workflow/panel/index.tsx
+5
-4
workflow-info.tsx
web/app/components/workflow/panel/workflow-info.tsx
+15
-3
No files found.
web/app/components/workflow/header/index.tsx
View file @
430569d4
...
@@ -10,9 +10,10 @@ import { Edit03 } from '@/app/components/base/icons/src/vender/solid/general'
...
@@ -10,9 +10,10 @@ import { Edit03 } from '@/app/components/base/icons/src/vender/solid/general'
import
{
Grid01
}
from
'@/app/components/base/icons/src/vender/line/layout'
import
{
Grid01
}
from
'@/app/components/base/icons/src/vender/line/layout'
import
Button
from
'@/app/components/base/button'
import
Button
from
'@/app/components/base/button'
import
{
ArrowNarrowLeft
}
from
'@/app/components/base/icons/src/vender/line/arrows'
import
{
ArrowNarrowLeft
}
from
'@/app/components/base/icons/src/vender/line/arrows'
import
{
useStore
as
useAppStore
}
from
'@/app/components/app/store'
const
Header
:
FC
=
()
=>
{
const
Header
:
FC
=
()
=>
{
const
mode
=
useStore
(
state
=>
state
.
mode
)
const
appDetail
=
useAppStore
(
state
=>
state
.
appDetail
)
const
setShowFeaturesPanel
=
useStore
(
state
=>
state
.
setShowFeaturesPanel
)
const
setShowFeaturesPanel
=
useStore
(
state
=>
state
.
setShowFeaturesPanel
)
const
runStaus
=
useStore
(
state
=>
state
.
runStaus
)
const
runStaus
=
useStore
(
state
=>
state
.
runStaus
)
const
setRunStaus
=
useStore
(
state
=>
state
.
setRunStaus
)
const
setRunStaus
=
useStore
(
state
=>
state
.
setRunStaus
)
...
@@ -29,7 +30,7 @@ const Header: FC = () => {
...
@@ -29,7 +30,7 @@ const Header: FC = () => {
}
}
}
}
>
>
<
div
>
<
div
>
<
div
className=
'text-xs font-medium text-gray-700'
>
Fitness and Nutrition Expert
</
div
>
<
div
className=
'text-xs font-medium text-gray-700'
>
{
appDetail
?.
name
}
</
div
>
<
div
className=
'flex items-center'
>
<
div
className=
'flex items-center'
>
<
div
className=
'flex items-center text-xs text-gray-500'
>
<
div
className=
'flex items-center text-xs text-gray-500'
>
<
Edit03
className=
'mr-1 w-3 h-3 text-gray-400'
/>
<
Edit03
className=
'mr-1 w-3 h-3 text-gray-400'
/>
...
@@ -55,7 +56,7 @@ const Header: FC = () => {
...
@@ -55,7 +56,7 @@ const Header: FC = () => {
<
RunAndHistory
/>
<
RunAndHistory
/>
<
div
className=
'mx-2 w-[1px] h-3.5 bg-gray-200'
></
div
>
<
div
className=
'mx-2 w-[1px] h-3.5 bg-gray-200'
></
div
>
{
{
mode
===
'workflow
'
&&
(
appDetail
?.
mode
===
'advanced-chat
'
&&
(
<
Button
<
Button
className=
{
`
className=
{
`
mr-2 px-3 py-0 h-8 bg-white text-[13px] font-medium text-gray-700
mr-2 px-3 py-0 h-8 bg-white text-[13px] font-medium text-gray-700
...
...
web/app/components/workflow/panel/index.tsx
View file @
430569d4
...
@@ -11,9 +11,10 @@ import WorkflowInfo from './workflow-info'
...
@@ -11,9 +11,10 @@ import WorkflowInfo from './workflow-info'
import
DebugAndPreview
from
'./debug-and-preview'
import
DebugAndPreview
from
'./debug-and-preview'
import
RunHistory
from
'./run-history'
import
RunHistory
from
'./run-history'
import
Record
from
'./record'
import
Record
from
'./record'
import
{
useStore
as
useAppStore
}
from
'@/app/components/app/store'
const
Panel
:
FC
=
()
=>
{
const
Panel
:
FC
=
()
=>
{
const
mode
=
useStore
(
state
=>
state
.
mode
)
const
appDetail
=
useAppStore
(
state
=>
state
.
appDetail
)
const
runStaus
=
useStore
(
state
=>
state
.
runStaus
)
const
runStaus
=
useStore
(
state
=>
state
.
runStaus
)
const
nodes
=
useNodes
<
CommonNodeType
>
()
const
nodes
=
useNodes
<
CommonNodeType
>
()
const
selectedNode
=
nodes
.
find
(
node
=>
node
.
data
.
_selected
)
const
selectedNode
=
nodes
.
find
(
node
=>
node
.
data
.
_selected
)
...
@@ -24,11 +25,11 @@ const Panel: FC = () => {
...
@@ -24,11 +25,11 @@ const Panel: FC = () => {
showDebugAndPreviewPanel
,
showDebugAndPreviewPanel
,
}
=
useMemo
(()
=>
{
}
=
useMemo
(()
=>
{
return
{
return
{
showWorkflowInfoPanel
:
mode
===
'workflow'
&&
!
selectedNode
,
showWorkflowInfoPanel
:
appDetail
?.
mode
===
'workflow'
&&
!
selectedNode
,
showNodePanel
:
!!
selectedNode
,
showNodePanel
:
!!
selectedNode
,
showDebugAndPreviewPanel
:
mode
===
'chatbo
t'
&&
!
selectedNode
,
showDebugAndPreviewPanel
:
appDetail
?.
mode
===
'advanced-cha
t'
&&
!
selectedNode
,
}
}
},
[
mode
,
selectedNode
])
},
[
selectedNode
,
appDetail
])
return
(
return
(
<
div
className=
'absolute top-14 right-0 bottom-2 flex z-10'
>
<
div
className=
'absolute top-14 right-0 bottom-2 flex z-10'
>
...
...
web/app/components/workflow/panel/workflow-info.tsx
View file @
430569d4
...
@@ -4,19 +4,31 @@ import BlockIcon from '../block-icon'
...
@@ -4,19 +4,31 @@ import BlockIcon from '../block-icon'
import
{
BlockEnum
}
from
'../types'
import
{
BlockEnum
}
from
'../types'
import
{
AlertTriangle
}
from
'@/app/components/base/icons/src/vender/line/alertsAndFeedback'
import
{
AlertTriangle
}
from
'@/app/components/base/icons/src/vender/line/alertsAndFeedback'
import
{
FileCheck02
}
from
'@/app/components/base/icons/src/vender/line/files'
import
{
FileCheck02
}
from
'@/app/components/base/icons/src/vender/line/files'
import
{
useStore
as
useAppStore
}
from
'@/app/components/app/store'
import
AppIcon
from
'@/app/components/base/app-icon'
const
WorkflowInfo
:
FC
=
()
=>
{
const
WorkflowInfo
:
FC
=
()
=>
{
const
appDetail
=
useAppStore
(
state
=>
state
.
appDetail
)
if
(
!
appDetail
)
return
null
return
(
return
(
<
div
className=
'mr-2 w-[420px] h-full bg-white shadow-lg border-[0.5px] border-gray-200 rounded-2xl overflow-y-auto'
>
<
div
className=
'mr-2 w-[420px] h-full bg-white shadow-lg border-[0.5px] border-gray-200 rounded-2xl overflow-y-auto'
>
<
div
className=
'sticky top-0 bg-white border-b-[0.5px] border-black/5'
>
<
div
className=
'sticky top-0 bg-white border-b-[0.5px] border-black/5'
>
<
div
className=
'flex pt-4 px-4 pb-1'
>
<
div
className=
'flex pt-4 px-4 pb-1'
>
<
div
className=
'mr-3 w-10 h-10'
></
div
>
<
AppIcon
className=
'mr-3'
size=
'large'
icon=
{
appDetail
.
icon
}
background=
{
appDetail
.
icon_background
}
/>
<
div
className=
'mt-2 text-base font-semibold text-gray-900'
>
<
div
className=
'mt-2 text-base font-semibold text-gray-900'
>
Fitness and Nutrition Expert
{
appDetail
.
name
}
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
'px-4 py-[13px] text-xs leading-[18px] text-gray-500'
>
<
div
className=
'px-4 py-[13px] text-xs leading-[18px] text-gray-500'
>
A Fitness and Nutrition Expert specializes in guiding individuals towards healthier lifestyles through exercise and diet.
{
appDetail
.
description
}
</
div
>
</
div
>
<
div
className=
'flex items-center px-4 h-[42px] text-[13px] font-semibold text-gray-700'
>
<
div
className=
'flex items-center px-4 h-[42px] text-[13px] font-semibold text-gray-700'
>
<
FileCheck02
className=
'mr-1 w-4 h-4'
/>
<
FileCheck02
className=
'mr-1 w-4 h-4'
/>
...
...
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