Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins
This commit is contained in:
commit
2296bb162b
@ -5,6 +5,8 @@ import {
|
|||||||
RiDeleteBinLine,
|
RiDeleteBinLine,
|
||||||
RiEqualizer2Line,
|
RiEqualizer2Line,
|
||||||
RiErrorWarningFill,
|
RiErrorWarningFill,
|
||||||
|
RiInstallLine,
|
||||||
|
RiLoader2Line,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
import { Group } from '@/app/components/base/icons/src/vender/other'
|
import { Group } from '@/app/components/base/icons/src/vender/other'
|
||||||
import AppIcon from '@/app/components/base/app-icon'
|
import AppIcon from '@/app/components/base/app-icon'
|
||||||
@ -13,7 +15,6 @@ import Button from '@/app/components/base/button'
|
|||||||
import Indicator from '@/app/components/header/indicator'
|
import Indicator from '@/app/components/header/indicator'
|
||||||
import ActionButton from '@/app/components/base/action-button'
|
import ActionButton from '@/app/components/base/action-button'
|
||||||
import Tooltip from '@/app/components/base/tooltip'
|
import Tooltip from '@/app/components/base/tooltip'
|
||||||
import { InstallPluginButton } from '@/app/components/workflow/nodes/_base/components/install-plugin-button'
|
|
||||||
import cn from '@/utils/classnames'
|
import cn from '@/utils/classnames'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@ -115,10 +116,19 @@ const ToolItem = ({
|
|||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{!isError && uninstalled && (
|
{!isError && uninstalled && (
|
||||||
<InstallPluginButton size={'small'} loading={isInstalling} onClick={(e) => {
|
<Button
|
||||||
|
className={cn('flex items-center')}
|
||||||
|
size='small'
|
||||||
|
variant='secondary'
|
||||||
|
disabled={isInstalling}
|
||||||
|
onClick={(e) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
onInstall?.()
|
onInstall?.()
|
||||||
}} />
|
}}
|
||||||
|
>
|
||||||
|
{!isInstalling ? t('workflow.nodes.agent.pluginInstaller.install') : t('workflow.nodes.agent.pluginInstaller.installing')}
|
||||||
|
{!isInstalling ? <RiInstallLine className='size-4 ml-1' /> : <RiLoader2Line className='size-4 ml-1 animate-spin' />}
|
||||||
|
</Button>
|
||||||
)}
|
)}
|
||||||
{isError && (
|
{isError && (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
Loading…
Reference in New Issue
Block a user