mirror of https://github.com/langgenius/dify.git
fix: when error can not install
This commit is contained in:
parent
a093a48675
commit
e151c2ee8c
|
|
@ -30,8 +30,12 @@ const InstallByDSLList: FC<Props> = ({
|
|||
return []
|
||||
|
||||
const _plugins = allPlugins.map((d) => {
|
||||
if (d.type === 'package')
|
||||
return (d as any).value.manifest
|
||||
if (d.type === 'package') {
|
||||
return {
|
||||
...(d as any).value.manifest,
|
||||
plugin_id: (d as any).value.unique_identifier,
|
||||
}
|
||||
}
|
||||
|
||||
return undefined
|
||||
})
|
||||
|
|
@ -84,7 +88,7 @@ const InstallByDSLList: FC<Props> = ({
|
|||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [isFetchingMarketplaceData])
|
||||
|
||||
const isLoadedAllData = allPlugins.length === plugins.length && plugins.every(p => !!p)
|
||||
const isLoadedAllData = (plugins.filter(p => !!p).length + errorIndexes.length) === allPlugins.length
|
||||
useEffect(() => {
|
||||
if (isLoadedAllData)
|
||||
onLoadedAllPlugin()
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import type { Dependency, InstallStatusResponse, Plugin } from '../../../types'
|
|||
import Button from '@/app/components/base/button'
|
||||
import { RiLoader2Line } from '@remixicon/react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import InstallByDSLList from './install-multi'
|
||||
import InstallMulti from './install-multi'
|
||||
import { useInstallFromMarketplaceAndGitHub } from '@/service/use-plugins'
|
||||
import { useInvalidateInstalledPluginList } from '@/service/use-plugins'
|
||||
const i18nPrefix = 'plugin.installModal'
|
||||
|
|
@ -67,7 +67,7 @@ const Install: FC<Props> = ({
|
|||
<p>{t(`${i18nPrefix}.${selectedPluginsNum > 1 ? 'readyToInstallPackages' : 'readyToInstallPackage'}`, { num: selectedPluginsNum })}</p>
|
||||
</div>
|
||||
<div className='w-full p-2 rounded-2xl bg-background-section-burn space-y-1'>
|
||||
<InstallByDSLList
|
||||
<InstallMulti
|
||||
allPlugins={allPlugins}
|
||||
selectedPlugins={selectedPlugins}
|
||||
onSelect={handleSelect}
|
||||
|
|
|
|||
Loading…
Reference in New Issue