From a867040b88131b2310b26ca9d7988e2e4de1e8db Mon Sep 17 00:00:00 2001 From: JzoNg Date: Tue, 19 Nov 2024 16:24:35 +0800 Subject: [PATCH] fix icon of model provider --- web/app/components/plugins/marketplace/hooks.ts | 6 +++++- web/app/components/plugins/provider-card.tsx | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/web/app/components/plugins/marketplace/hooks.ts b/web/app/components/plugins/marketplace/hooks.ts index 1cbc035972..2d6d6c0090 100644 --- a/web/app/components/plugins/marketplace/hooks.ts +++ b/web/app/components/plugins/marketplace/hooks.ts @@ -14,6 +14,7 @@ import type { } from './types' import { getMarketplaceCollectionsAndPlugins, + getPluginIconInMarketplace, } from './utils' import i18n from '@/i18n/i18next-config' import { useMutationPluginsFromMarketplace } from '@/service/use-plugins' @@ -61,7 +62,10 @@ export const useMarketplacePlugins = () => { }) return { - plugins: data?.data?.plugins, + plugins: data?.data?.plugins.map(plugin => ({ + ...plugin, + icon: getPluginIconInMarketplace(plugin), + })), resetPlugins: reset, queryPlugins, queryPluginsWithDebounced, diff --git a/web/app/components/plugins/provider-card.tsx b/web/app/components/plugins/provider-card.tsx index e2a45fc24d..3f2d889bc0 100644 --- a/web/app/components/plugins/provider-card.tsx +++ b/web/app/components/plugins/provider-card.tsx @@ -64,17 +64,17 @@ const ProviderCard: FC = ({ className='hidden group-hover:flex items-center gap-2 absolute bottom-0 left-0 right-0 p-4 pt-8 rounded-xl bg-gradient-to-tr from-[#f9fafb] to-[rgba(249,250,251,0)]' >