mirror of
https://github.com/langgenius/dify.git
synced 2026-01-05 22:15:52 +00:00
chore: add on start to install
This commit is contained in:
@@ -13,10 +13,11 @@ import checkTaskStatus from '../../base/check-task-status'
|
||||
|
||||
const i18nPrefix = 'plugin.installModal'
|
||||
|
||||
interface Props {
|
||||
type Props = {
|
||||
uniqueIdentifier: string
|
||||
payload: PluginDeclaration
|
||||
onCancel: () => void
|
||||
onStartToInstall?: () => void
|
||||
onInstalled: () => void
|
||||
onFailed: (message?: string) => void
|
||||
}
|
||||
@@ -25,6 +26,7 @@ const Installed: FC<Props> = ({
|
||||
uniqueIdentifier,
|
||||
payload,
|
||||
onCancel,
|
||||
onStartToInstall,
|
||||
onInstalled,
|
||||
onFailed,
|
||||
}) => {
|
||||
@@ -43,6 +45,8 @@ const Installed: FC<Props> = ({
|
||||
const handleInstall = async () => {
|
||||
if (isInstalling) return
|
||||
setIsInstalling(true)
|
||||
onStartToInstall?.()
|
||||
|
||||
try {
|
||||
const {
|
||||
all_installed: isInstalled,
|
||||
|
||||
@@ -18,6 +18,7 @@ type Props = {
|
||||
uniqueIdentifier: string
|
||||
payload: PluginManifestInMarket
|
||||
onCancel: () => void
|
||||
onStartToInstall?: () => void
|
||||
onInstalled: () => void
|
||||
onFailed: (message?: string) => void
|
||||
}
|
||||
@@ -26,6 +27,7 @@ const Installed: FC<Props> = ({
|
||||
uniqueIdentifier,
|
||||
payload,
|
||||
onCancel,
|
||||
onStartToInstall,
|
||||
onInstalled,
|
||||
onFailed,
|
||||
}) => {
|
||||
@@ -43,6 +45,7 @@ const Installed: FC<Props> = ({
|
||||
|
||||
const handleInstall = async () => {
|
||||
if (isInstalling) return
|
||||
onStartToInstall?.()
|
||||
setIsInstalling(true)
|
||||
|
||||
try {
|
||||
@@ -90,7 +93,7 @@ const Installed: FC<Props> = ({
|
||||
</>
|
||||
)
|
||||
}</>)
|
||||
}, [payload])
|
||||
}, [payload.latest_version, supportCheckInstalled])
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user