From 2c5f5b0c674c0cc2de501de6969aaffc5bc790a2 Mon Sep 17 00:00:00 2001 From: KVOJJJin Date: Wed, 14 May 2025 13:46:03 +0800 Subject: [PATCH] Feat: add search params with theme in links of marketplace (#19648) --- .../model-provider-page/install-from-marketplace.tsx | 4 +++- .../components/plugins/marketplace/list/card-wrapper.tsx | 4 +++- .../plugins/plugin-detail-panel/detail-header.tsx | 6 ++++-- web/app/components/plugins/plugin-item/index.tsx | 4 +++- web/app/components/plugins/provider-card.tsx | 4 +++- web/app/components/tools/marketplace/index.tsx | 5 +++-- .../workflow/block-selector/market-place-plugin/action.tsx | 4 +++- 7 files changed, 22 insertions(+), 9 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 38f35d6fb4..818007a26f 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 @@ -1,4 +1,5 @@ import { useCallback, useState } from 'react' +import { useTheme } from 'next-themes' import { useTranslation } from 'react-i18next' import Link from 'next/link' import { @@ -29,6 +30,7 @@ const InstallFromMarketplace = ({ searchText, }: InstallFromMarketplaceProps) => { const { t } = useTranslation() + const { theme } = useTheme() const [collapse, setCollapse] = useState(false) const locale = getLocaleOnClient() const { @@ -53,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 75c9aae3d5..27511559d9 100644 --- a/web/app/components/plugins/marketplace/list/card-wrapper.tsx +++ b/web/app/components/plugins/marketplace/list/card-wrapper.tsx @@ -1,4 +1,5 @@ 'use client' +import { useTheme } from 'next-themes' import { RiArrowRightUpLine } from '@remixicon/react' import { getPluginLinkInMarketplace } from '../utils' import Card from '@/app/components/plugins/card' @@ -22,6 +23,7 @@ const CardWrapper = ({ locale, }: CardWrapperProps) => { const { t } = useMixedTranslation(locale) + const { theme } = useTheme() const [isShowInstallFromMarketplace, { setTrue: showInstallFromMarketplace, setFalse: hideInstallFromMarketplace, @@ -54,7 +56,7 @@ const CardWrapper = ({ > {t('plugin.detailPanel.operation.install')} - +