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
fa3eb11b
Commit
fa3eb11b
authored
Mar 07, 2024
by
JzoNg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
old app do not support duplicate and export dsl
parent
beff31b0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
4 deletions
+20
-4
AppCard.tsx
web/app/(commonLayout)/apps/AppCard.tsx
+5
-1
app-info.tsx
web/app/components/app-sidebar/app-info.tsx
+8
-2
index.tsx
web/app/components/app/configuration/index.tsx
+1
-1
index.tsx
web/app/components/base/popover/index.tsx
+6
-0
No files found.
web/app/(commonLayout)/apps/AppCard.tsx
View file @
fa3eb11b
...
...
@@ -177,7 +177,7 @@ const AppCard = ({ app, onRefresh }: AppCardProps) => {
<
span
className=
{
s
.
actionName
}
>
{
t
(
'common.operation.settings'
)
}
</
span
>
</
button
>
<
Divider
className=
"!my-1"
/>
{
app
.
mode
!==
'completion'
&&
(
{
(
app
.
mode
===
'workflow'
||
app
.
mode
===
'agent-chat'
||
app
.
mode
===
'advanced-chat'
||
(
app
.
mode
===
'chat'
&&
detailState
.
detail
?.
model_config
.
prompt_type
===
'simple'
))
&&
(
<>
<
button
className=
{
s
.
actionItem
}
onClick=
{
onClickDuplicate
}
disabled=
{
detailState
.
loading
}
>
<
span
className=
{
s
.
actionName
}
>
{
t
(
'app.duplicate'
)
}
</
span
>
...
...
@@ -221,6 +221,10 @@ const AppCard = ({ app, onRefresh }: AppCardProps) => {
<
div
className=
{
style
.
listItemHeadingContent
}
>
{
app
.
name
}
</
div
>
</
div
>
{
isCurrentWorkspaceManager
&&
<
CustomPopover
onTriggerClick=
{
()
=>
{
if
(
app
.
mode
===
'chat'
&&
!
detailState
.
detail
)
getAppDetail
()
}
}
htmlContent=
{
<
Operations
/>
}
position=
"br"
trigger=
"click"
...
...
web/app/components/app-sidebar/app-info.tsx
View file @
fa3eb11b
...
...
@@ -177,7 +177,10 @@ const AppInfo = ({ expand }: IAppInfoProps) => {
</>
)
}
{
appDetail
.
mode
===
'completion'
&&
(
<
div
className=
'shrink-0 px-1 border bg-white border-[rgba(0,0,0,0.08)] rounded-[5px] truncate'
>
{
t
(
'app.types.completion'
).
toUpperCase
()
}
</
div
>
<>
<
div
className=
'shrink-0 px-1 border bg-white border-[rgba(0,0,0,0.08)] rounded-[5px] truncate'
>
{
t
(
'app.types.completion'
).
toUpperCase
()
}
</
div
>
<
div
title=
{
t
(
'app.newApp.basic'
)
||
''
}
className=
'px-1 border bg-white border-[rgba(0,0,0,0.08)] rounded-[5px] truncate'
>
{
(
t
(
'app.newApp.basic'
).
toUpperCase
())
}
</
div
>
</>
)
}
{
appDetail
.
mode
===
'workflow'
&&
(
<
div
className=
'shrink-0 px-1 border bg-white border-[rgba(0,0,0,0.08)] rounded-[5px] truncate'
>
{
t
(
'app.types.workflow'
).
toUpperCase
()
}
</
div
>
...
...
@@ -213,7 +216,10 @@ const AppInfo = ({ expand }: IAppInfoProps) => {
</>
)
}
{
appDetail
.
mode
===
'completion'
&&
(
<
div
className=
'shrink-0 px-1 border bg-white border-[rgba(0,0,0,0.08)] rounded-[5px] truncate'
>
{
t
(
'app.types.completion'
).
toUpperCase
()
}
</
div
>
<>
<
div
className=
'shrink-0 px-1 border bg-white border-[rgba(0,0,0,0.08)] rounded-[5px] truncate'
>
{
t
(
'app.types.completion'
).
toUpperCase
()
}
</
div
>
<
div
title=
{
t
(
'app.newApp.basic'
)
||
''
}
className=
'px-1 border bg-white border-[rgba(0,0,0,0.08)] rounded-[5px] truncate'
>
{
(
t
(
'app.newApp.basic'
).
toUpperCase
())
}
</
div
>
</>
)
}
{
appDetail
.
mode
===
'workflow'
&&
(
<
div
className=
'shrink-0 px-1 border bg-white border-[rgba(0,0,0,0.08)] rounded-[5px] truncate'
>
{
t
(
'app.types.workflow'
).
toUpperCase
()
}
</
div
>
...
...
web/app/components/app/configuration/index.tsx
View file @
fa3eb11b
...
...
@@ -441,7 +441,7 @@ const Configuration: FC = () => {
model_id
:
model
.
name
,
mode
:
model
.
mode
,
configs
:
{
prompt_template
:
modelConfig
.
pre_prompt
,
prompt_template
:
modelConfig
.
pre_prompt
||
''
,
prompt_variables
:
userInputsFormToPromptVariables
(
[
...
modelConfig
.
user_input_form
,
...
...
web/app/components/base/popover/index.tsx
View file @
fa3eb11b
...
...
@@ -17,6 +17,7 @@ type IPopover = {
btnElement
?:
string
|
React
.
ReactNode
btnClassName
?:
string
|
((
open
:
boolean
)
=>
string
)
manualClose
?:
boolean
onTriggerClick
?:
()
=>
void
}
const
timeoutDuration
=
100
...
...
@@ -30,6 +31,7 @@ export default function CustomPopover({
className
,
btnClassName
,
manualClose
,
onTriggerClick
,
}:
IPopover
)
{
const
buttonRef
=
useRef
<
HTMLButtonElement
>
(
null
)
const
timeOutRef
=
useRef
<
NodeJS
.
Timeout
|
null
>
(
null
)
...
...
@@ -66,6 +68,10 @@ export default function CustomPopover({
? btnClassName
: btnClassName?.(open)
}`
}
onClick=
{
()
=>
{
if
(
!
open
)
onTriggerClick
&&
onTriggerClick
()
}
}
>
{
btnElement
}
</
Popover
.
Button
>
...
...
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