From d593279de0abb37906154e39ade826ce5ac6d9d3 Mon Sep 17 00:00:00 2001 From: NFish Date: Thu, 12 Jun 2025 17:15:10 +0800 Subject: [PATCH] feat: add source param to url when redirect to marketplace page --- .../install-from-marketplace.tsx | 4 ++-- .../plugins/marketplace/list/card-wrapper.tsx | 2 +- web/app/components/plugins/marketplace/utils.ts | 8 ++++---- .../plugins/plugin-detail-panel/detail-header.tsx | 5 +++-- web/app/components/plugins/plugin-item/index.tsx | 5 +++-- web/app/components/tools/marketplace/index.tsx | 4 ++-- .../block-selector/market-place-plugin/action.tsx | 4 ++-- web/utils/var.ts | 14 +++++++++++++- 8 files changed, 30 insertions(+), 16 deletions(-) diff --git a/web/app/components/header/account-setting/model-provider-page/install-from-marketplace.tsx b/web/app/components/header/account-setting/model-provider-page/install-from-marketplace.tsx index 818007a26f..c60a769e40 100644 --- a/web/app/components/header/account-setting/model-provider-page/install-from-marketplace.tsx +++ b/web/app/components/header/account-setting/model-provider-page/install-from-marketplace.tsx @@ -17,9 +17,9 @@ import Loading from '@/app/components/base/loading' import ProviderCard from '@/app/components/plugins/provider-card' import List from '@/app/components/plugins/marketplace/list' import type { Plugin } from '@/app/components/plugins/types' -import { MARKETPLACE_URL_PREFIX } from '@/config' import cn from '@/utils/classnames' import { getLocaleOnClient } from '@/i18n' +import { getMarketplaceUrl } from '@/utils/var' type InstallFromMarketplaceProps = { providers: ModelProvider[] @@ -55,7 +55,7 @@ const InstallFromMarketplace = ({
{t('common.modelProvider.discoverMore')} - + {t('plugin.marketplace.difyMarketplace')} diff --git a/web/app/components/plugins/marketplace/list/card-wrapper.tsx b/web/app/components/plugins/marketplace/list/card-wrapper.tsx index 27511559d9..5e4b621796 100644 --- a/web/app/components/plugins/marketplace/list/card-wrapper.tsx +++ b/web/app/components/plugins/marketplace/list/card-wrapper.tsx @@ -56,7 +56,7 @@ const CardWrapper = ({ > {t('plugin.detailPanel.operation.install')} - +