mirror of https://github.com/langgenius/dify.git
fix: upgrade sussces auto hide
This commit is contained in:
parent
02c5989612
commit
8993a91f12
|
|
@ -1,20 +0,0 @@
|
|||
'use client'
|
||||
import { useBoolean } from 'ahooks'
|
||||
import UpdatePlugin from '@/app/components/plugins/update-plugin'
|
||||
|
||||
const Page = () => {
|
||||
const [isShowUpdateModal, {
|
||||
setTrue: showUpdateModal,
|
||||
setFalse: hideUpdateModal,
|
||||
}] = useBoolean(false)
|
||||
return (
|
||||
<div>
|
||||
<div onClick={showUpdateModal}>Show Upgrade</div>
|
||||
{isShowUpdateModal && (
|
||||
<UpdatePlugin onHide={hideUpdateModal} />
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Page
|
||||
|
|
@ -77,6 +77,7 @@ const PluginPage = ({
|
|||
if (packageId) {
|
||||
const { data } = await fetchManifestFromMarketPlace(encodeURIComponent(packageId))
|
||||
const { plugin } = data
|
||||
// TODO: wait api return current plugin version
|
||||
setManifest({
|
||||
...plugin,
|
||||
icon: `${marketplaceApiPrefix}/plugins/${plugin.org}/${plugin.name}/icon`,
|
||||
|
|
@ -84,6 +85,7 @@ const PluginPage = ({
|
|||
showInstallFromMarketplace()
|
||||
}
|
||||
})()
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [packageId])
|
||||
|
||||
const {
|
||||
|
|
|
|||
|
|
@ -94,11 +94,9 @@ const UpdatePluginModal: FC<Props> = ({
|
|||
}
|
||||
return
|
||||
}
|
||||
if (uploadStep === UploadStep.installed) {
|
||||
if (uploadStep === UploadStep.installed)
|
||||
onSave()
|
||||
onCancel()
|
||||
}
|
||||
}, [onCancel, onSave, uploadStep, check, originalPackageInfo.id, handleRefetch, targetPackageInfo.id])
|
||||
}, [onSave, uploadStep, check, originalPackageInfo.id, handleRefetch, targetPackageInfo.id])
|
||||
const usedInAppInfo = useMemo(() => {
|
||||
return (
|
||||
<div className='flex px-0.5 justify-center items-center gap-0.5'>
|
||||
|
|
|
|||
Loading…
Reference in New Issue