diff --git a/web/app/components/plugins/install-plugin/install-from-marketplace/index.tsx b/web/app/components/plugins/install-plugin/install-from-marketplace/index.tsx index b721a84454..ad5b596b73 100644 --- a/web/app/components/plugins/install-plugin/install-from-marketplace/index.tsx +++ b/web/app/components/plugins/install-plugin/install-from-marketplace/index.tsx @@ -52,6 +52,7 @@ const InstallFromMarketplace: React.FC = ({ diff --git a/web/app/components/workflow/block-selector/market-place-plugin/action.tsx b/web/app/components/workflow/block-selector/market-place-plugin/action.tsx index d77ea248fe..65d8877819 100644 --- a/web/app/components/workflow/block-selector/market-place-plugin/action.tsx +++ b/web/app/components/workflow/block-selector/market-place-plugin/action.tsx @@ -47,7 +47,7 @@ const OperationDropdown: FC = ({ - +
{t('common.operation.download')}
{/* Wait marketplace */} diff --git a/web/app/components/workflow/block-selector/market-place-plugin/item.tsx b/web/app/components/workflow/block-selector/market-place-plugin/item.tsx index d257533d62..628b437d3e 100644 --- a/web/app/components/workflow/block-selector/market-place-plugin/item.tsx +++ b/web/app/components/workflow/block-selector/market-place-plugin/item.tsx @@ -5,10 +5,12 @@ import { useContext } from 'use-context-selector' import { useTranslation } from 'react-i18next' import Action from './action' import type { Plugin } from '@/app/components/plugins/types.ts' +import InstallFromMarketplace from '@/app/components/plugins/install-plugin/install-from-marketplace' import I18n from '@/context/i18n' import cn from '@/utils/classnames' import { formatNumber } from '@/utils/format' +import { useBoolean } from 'ahooks' enum ActionType { install = 'install', @@ -28,6 +30,10 @@ const Item: FC = ({ const { locale } = useContext(I18n) const getLocalizedText = (obj: Record | undefined) => obj?.[locale] || obj?.['en-US'] || obj?.en_US || '' + const [isShowInstallModal, { + setTrue: showInstallModal, + setFalse: hideInstallModal, + }] = useBoolean(false) return (
@@ -47,14 +53,21 @@ const Item: FC = ({
{/* Action */}
-
{t('plugin.installAction')}
+
{t('plugin.installAction')}
+ {isShowInstallModal && ( + + )}
- ) }