From 3f0b35d72e627957a847c0cbb3ca36e4d985ef74 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 21 Nov 2024 18:21:57 +0800 Subject: [PATCH] feat: install bundle from marketplace code --- .../install-from-marketplace/index.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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 553c30f6be..44b63cf7dd 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 @@ -2,7 +2,7 @@ import React, { useCallback, useState } from 'react' import Modal from '@/app/components/base/modal' -import type { Plugin, PluginManifestInMarket } from '../../types' +import type { Dependency, Plugin, PluginManifestInMarket } from '../../types' import { InstallStep, PluginType } from '../../types' import Install from './steps/install' import Installed from '../base/installed' @@ -10,12 +10,15 @@ import { useTranslation } from 'react-i18next' import { useUpdateModelProviders } from '@/app/components/header/account-setting/model-provider-page/hooks' import { useInvalidateInstalledPluginList } from '@/service/use-plugins' import { useInvalidateAllToolProviders } from '@/service/use-tools' +import ReadyToInstallBundle from '../install-bundle/ready-to-install' const i18nPrefix = 'plugin.installModal' type InstallFromMarketplaceProps = { uniqueIdentifier: string manifest: PluginManifestInMarket | Plugin + isBundle?: boolean + dependencies?: Dependency[] onSuccess: () => void onClose: () => void } @@ -23,6 +26,8 @@ type InstallFromMarketplaceProps = { const InstallFromMarketplace: React.FC = ({ uniqueIdentifier, manifest, + isBundle, + dependencies, onSuccess, onClose, }) => { @@ -83,7 +88,14 @@ const InstallFromMarketplace: React.FC = ({ ) } { - ([InstallStep.installed, InstallStep.installFailed].includes(step)) && ( + isBundle ? ( + + ) : ([InstallStep.installed, InstallStep.installFailed].includes(step)) && (