fix: plugin task

This commit is contained in:
StyleZhang 2024-11-15 15:46:29 +08:00
parent a5a6969db3
commit 3f2baf0131
2 changed files with 4 additions and 1 deletions

View File

@ -11,7 +11,7 @@ export const usePluginTaskStatus = () => {
pluginTasks, pluginTasks,
} = usePluginTaskList() } = usePluginTaskList()
const { mutate } = useMutationClearTaskPlugin() const { mutate } = useMutationClearTaskPlugin()
const allPlugins = pluginTasks.map(task => task.plugins.map((plugin) => { const allPlugins = pluginTasks.filter(task => task.status !== TaskStatus.success).map(task => task.plugins.map((plugin) => {
return { return {
...plugin, ...plugin,
taskId: task.id, taskId: task.id,

View File

@ -54,6 +54,9 @@ const PluginTasks = () => {
return t('plugin.task.installError', { errorLength: errorPlugins.length }) return t('plugin.task.installError', { errorLength: errorPlugins.length })
}, [isInstalling, isInstallingWithError, isFailed, errorPlugins, runningPlugins, totalPluginsLength, t]) }, [isInstalling, isInstallingWithError, isFailed, errorPlugins, runningPlugins, totalPluginsLength, t])
if (!totalPluginsLength)
return null
return ( return (
<div className='flex items-center'> <div className='flex items-center'>
<PortalToFollowElem <PortalToFollowElem