Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
84de95d2
authored
Sep 02, 2024
by
heheer
Committed by
GitHub
Sep 02, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: plugin input type options & save button (#2590)
parent
fdab383b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
projects/app/src/pages/app/detail/components/Plugin/Header.tsx
+8
-3
projects/app/src/pages/app/detail/components/Workflow/Header.tsx
+3
-0
projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/components/SaveAndPublish.tsx
+2
-1
projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodePluginIO/InputEditModal.tsx
+0
-6
No files found.
projects/app/src/pages/app/detail/components/Plugin/Header.tsx
View file @
84de95d2
import
React
,
{
useCallback
,
useMemo
,
useState
}
from
'react'
;
import
React
,
{
useCallback
,
use
Effect
,
use
Memo
,
useState
}
from
'react'
;
import
{
import
{
Box
,
Box
,
Flex
,
Flex
,
...
@@ -41,7 +41,6 @@ const Header = () => {
...
@@ -41,7 +41,6 @@ const Header = () => {
const
{
appDetail
,
onSaveApp
,
currentTab
}
=
useContextSelector
(
AppContext
,
(
v
)
=>
v
);
const
{
appDetail
,
onSaveApp
,
currentTab
}
=
useContextSelector
(
AppContext
,
(
v
)
=>
v
);
const
isV2Workflow
=
appDetail
?.
version
===
'v2'
;
const
isV2Workflow
=
appDetail
?.
version
===
'v2'
;
const
{
const
{
isOpen
:
isOpenBackConfirm
,
isOpen
:
isOpenBackConfirm
,
onOpen
:
onOpenBackConfirm
,
onOpen
:
onOpenBackConfirm
,
...
@@ -52,7 +51,6 @@ const Header = () => {
...
@@ -52,7 +51,6 @@ const Header = () => {
onOpen
:
onSaveAndPublishModalOpen
,
onOpen
:
onSaveAndPublishModalOpen
,
onClose
:
onSaveAndPublishModalClose
onClose
:
onSaveAndPublishModalClose
}
=
useDisclosure
();
}
=
useDisclosure
();
const
[
isSave
,
setIsSave
]
=
useState
(
false
);
const
[
isSave
,
setIsSave
]
=
useState
(
false
);
const
{
const
{
...
@@ -251,6 +249,8 @@ const Header = () => {
...
@@ -251,6 +249,8 @@ const Header = () => {
status
:
'success'
,
status
:
'success'
,
title
:
t
(
'app:saved_success'
)
title
:
t
(
'app:saved_success'
)
});
});
onClose
();
setIsSave
(
false
);
}
}
}
}
>
>
<
MyIcon
name=
{
'core/workflow/upload'
}
w=
{
'16px'
}
mr=
{
2
}
/>
<
MyIcon
name=
{
'core/workflow/upload'
}
w=
{
'16px'
}
mr=
{
2
}
/>
...
@@ -268,6 +268,7 @@ const Header = () => {
...
@@ -268,6 +268,7 @@ const Header = () => {
onSaveAndPublishModalOpen
();
onSaveAndPublishModalOpen
();
}
}
onClose
();
onClose
();
setIsSave
(
false
);
}
}
}
}
>
>
<
MyIcon
name=
{
'core/workflow/publish'
}
w=
{
'16px'
}
mr=
{
2
}
/>
<
MyIcon
name=
{
'core/workflow/publish'
}
w=
{
'16px'
}
mr=
{
2
}
/>
...
@@ -314,6 +315,10 @@ const Header = () => {
...
@@ -314,6 +315,10 @@ const Header = () => {
await
onClickSave
({});
await
onClickSave
({});
onCloseBackConfirm
();
onCloseBackConfirm
();
onBack
();
onBack
();
toast
({
status
:
'success'
,
title
:
t
(
'app:saved_success'
)
});
}
}
}
}
>
>
{
t
(
'common:common.Save_and_exit'
)
}
{
t
(
'common:common.Save_and_exit'
)
}
...
...
projects/app/src/pages/app/detail/components/Workflow/Header.tsx
View file @
84de95d2
...
@@ -249,6 +249,8 @@ const Header = () => {
...
@@ -249,6 +249,8 @@ const Header = () => {
status
:
'success'
,
status
:
'success'
,
title
:
t
(
'app:saved_success'
)
title
:
t
(
'app:saved_success'
)
});
});
onClose
();
setIsSave
(
false
);
}
}
}
}
>
>
<
MyIcon
name=
{
'core/workflow/upload'
}
w=
{
'16px'
}
mr=
{
2
}
/>
<
MyIcon
name=
{
'core/workflow/upload'
}
w=
{
'16px'
}
mr=
{
2
}
/>
...
@@ -266,6 +268,7 @@ const Header = () => {
...
@@ -266,6 +268,7 @@ const Header = () => {
onSaveAndPublishModalOpen
();
onSaveAndPublishModalOpen
();
}
}
onClose
();
onClose
();
setIsSave
(
false
);
}
}
}
}
>
>
<
MyIcon
name=
{
'core/workflow/publish'
}
w=
{
'16px'
}
mr=
{
2
}
/>
<
MyIcon
name=
{
'core/workflow/publish'
}
w=
{
'16px'
}
mr=
{
2
}
/>
...
...
projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/components/SaveAndPublish.tsx
View file @
84de95d2
import
{
Box
,
Button
,
Input
,
ModalBody
,
ModalFooter
}
from
'@chakra-ui/react'
;
import
{
Box
,
Button
,
Input
,
ModalBody
,
ModalFooter
}
from
'@chakra-ui/react'
;
import
{
formatTime2YMDHMS
}
from
'@fastgpt/global/common/string/time'
;
import
MyModal
from
'@fastgpt/web/components/common/MyModal'
;
import
MyModal
from
'@fastgpt/web/components/common/MyModal'
;
import
{
useToast
}
from
'@fastgpt/web/hooks/useToast'
;
import
{
useToast
}
from
'@fastgpt/web/hooks/useToast'
;
import
{
useForm
}
from
'react-hook-form'
;
import
{
useForm
}
from
'react-hook-form'
;
...
@@ -21,7 +22,7 @@ const SaveAndPublishModal = ({
...
@@ -21,7 +22,7 @@ const SaveAndPublishModal = ({
const
{
toast
}
=
useToast
();
const
{
toast
}
=
useToast
();
const
{
register
,
handleSubmit
}
=
useForm
<
FormType
>
({
const
{
register
,
handleSubmit
}
=
useForm
<
FormType
>
({
defaultValues
:
{
defaultValues
:
{
versionName
:
''
,
versionName
:
formatTime2YMDHMS
(
new
Date
())
,
isPublish
:
undefined
isPublish
:
undefined
}
}
});
});
...
...
projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodePluginIO/InputEditModal.tsx
View file @
84de95d2
...
@@ -108,12 +108,6 @@ const FieldEditModal = ({
...
@@ -108,12 +108,6 @@ const FieldEditModal = ({
],
],
[
[
{
{
icon
:
'core/workflow/inputType/selectApp'
,
label
:
t
(
'common:core.workflow.inputType.selectApp'
),
value
:
FlowNodeInputTypeEnum
.
selectApp
,
defaultValueType
:
WorkflowIOValueTypeEnum
.
selectApp
},
{
icon
:
'core/workflow/inputType/selectLLM'
,
icon
:
'core/workflow/inputType/selectLLM'
,
label
:
t
(
'common:core.workflow.inputType.selectLLMModel'
),
label
:
t
(
'common:core.workflow.inputType.selectLLMModel'
),
value
:
FlowNodeInputTypeEnum
.
selectLLMModel
,
value
:
FlowNodeInputTypeEnum
.
selectLLMModel
,
...
...
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