mirror of
https://github.com/langgenius/dify.git
synced 2026-04-28 03:36:36 +08:00
fix: switch plugin version
This commit is contained in:
parent
6006380723
commit
99e2eaa6ee
@ -34,6 +34,11 @@ export const SwitchPluginVersion: FC<SwitchPluginVersionProps> = (props) => {
|
|||||||
pluginDetails.refetch()
|
pluginDetails.refetch()
|
||||||
onChange?.(targetVersion!)
|
onChange?.(targetVersion!)
|
||||||
}, [hideUpdateModal, onChange, pluginDetails, targetVersion])
|
}, [hideUpdateModal, onChange, pluginDetails, targetVersion])
|
||||||
|
|
||||||
|
const targetUniqueIdentifier = (() => {
|
||||||
|
if (!targetVersion || !pluginDetail) return uniqueIdentifier
|
||||||
|
return uniqueIdentifier.replaceAll(pluginDetail.version, targetVersion)
|
||||||
|
})()
|
||||||
return <Tooltip popupContent={!isShow && !isShowUpdateModal && tooltip} triggerMethod='hover'>
|
return <Tooltip popupContent={!isShow && !isShowUpdateModal && tooltip} triggerMethod='hover'>
|
||||||
<div className='w-fit'>
|
<div className='w-fit'>
|
||||||
{isShowUpdateModal && pluginDetail && <UpdateFromMarketplace
|
{isShowUpdateModal && pluginDetail && <UpdateFromMarketplace
|
||||||
@ -43,7 +48,7 @@ export const SwitchPluginVersion: FC<SwitchPluginVersionProps> = (props) => {
|
|||||||
payload: pluginDetail.declaration,
|
payload: pluginDetail.declaration,
|
||||||
},
|
},
|
||||||
targetPackageInfo: {
|
targetPackageInfo: {
|
||||||
id: uniqueIdentifier,
|
id: targetUniqueIdentifier,
|
||||||
version: targetVersion!,
|
version: targetVersion!,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user