diff --git a/web/app/components/plugins/marketplace/list/template-card.tsx b/web/app/components/plugins/marketplace/list/template-card.tsx index a8eaf63ac0..78023e1648 100644 --- a/web/app/components/plugins/marketplace/list/template-card.tsx +++ b/web/app/components/plugins/marketplace/list/template-card.tsx @@ -12,6 +12,7 @@ import { cn } from '@/utils/classnames' import { getIconFromMarketPlace } from '@/utils/get-icon' import { formatUsedCount } from '@/utils/template' import { getMarketplaceUrl } from '@/utils/var' +import Partner from '../../base/badges/partner' import { buildSearchParamsString, getTemplateIconUrl } from '../utils' type TemplateCardProps = { @@ -31,9 +32,10 @@ const TemplateCardComponent = ({ const locale = useLocale() const { t } = useTranslation() const { theme } = useTheme() - const { id, template_name, overview, icon, publisher_handle, publisher_type, usage_count, icon_background, deps_plugins } = template + const { id, template_name, overview, icon, publisher_handle, publisher_type, usage_count, icon_background, deps_plugins, badges = [] } = template // const isSandbox = kind === 'sandboxed' const iconUrl = getTemplateIconUrl(template) + const isPartner = badges.includes('partner') const href = useMemo(() => { const queryParams = { @@ -75,12 +77,15 @@ const TemplateCardComponent = ({ /> {/* Title */}
- - {template_name} - +
+ + {template_name} + + {isPartner && } +
{t('marketplace.templateCard.by', { ns: 'plugin' })} diff --git a/web/app/components/plugins/marketplace/types.ts b/web/app/components/plugins/marketplace/types.ts index 5b09a8dee7..88e9adefe0 100644 --- a/web/app/components/plugins/marketplace/types.ts +++ b/web/app/components/plugins/marketplace/types.ts @@ -92,6 +92,7 @@ export type Template = { usage_count: number created_at: string updated_at: string + badges?: string[] } export type CreateTemplateCollectionRequest = {