diff --git a/web/app/components/plugins/marketplace/home/__tests__/home-header.spec.tsx b/web/app/components/plugins/marketplace/home/__tests__/home-header.spec.tsx index 12c3e39c61f..610d2af72ce 100644 --- a/web/app/components/plugins/marketplace/home/__tests__/home-header.spec.tsx +++ b/web/app/components/plugins/marketplace/home/__tests__/home-header.spec.tsx @@ -23,6 +23,19 @@ describe('HomeHeader', () => { it('links the Guide action to Dify documentation', () => { render() + const brandLink = screen.getByRole('link', { name: 'Dify Marketplace' }) + const [lightLogo, darkLogo] = brandLink.querySelectorAll('img') + expect(lightLogo).toHaveAttribute('src', expect.stringContaining('dify-marketplace-logo.svg')) + expect(darkLogo).toHaveAttribute( + 'src', + expect.stringContaining('dify-marketplace-logo-dark.svg'), + ) + expect(lightLogo).toHaveAttribute('width', '141.761') + expect(lightLogo).toHaveAttribute('height', '16.386') + expect(darkLogo).toHaveAttribute('width', '141.761') + expect(darkLogo).toHaveAttribute('height', '16.386') + expect(screen.queryByText('mainNav.marketplace')).not.toBeInTheDocument() + const guideLink = screen.getByRole('link', { name: 'Guide' }) expect(guideLink).toHaveAttribute('href', 'https://docs.dify.ai/en/home') expect(guideLink).toHaveAttribute('target', '_blank') diff --git a/web/app/components/plugins/marketplace/home/home-header.tsx b/web/app/components/plugins/marketplace/home/home-header.tsx index e2cd3447035..e465a738750 100644 --- a/web/app/components/plugins/marketplace/home/home-header.tsx +++ b/web/app/components/plugins/marketplace/home/home-header.tsx @@ -1,10 +1,10 @@ import type { HomeCatalogTab } from './home-catalog-tabs' import { Button } from '@langgenius/dify-ui/button' import { cn } from '@langgenius/dify-ui/cn' -import { useTranslation } from '#i18n' -import DifyLogo from '@/app/components/base/logo/dify-logo' import { useDocLink } from '@/context/i18n' import Link from '@/next/link' +import MarketplaceLogoDark from '@/public/marketplace/dify-marketplace-logo-dark.svg' +import MarketplaceLogo from '@/public/marketplace/dify-marketplace-logo.svg' import HomeCatalogTabs from './home-catalog-tabs' import { HomeStickyCatalogTabs } from './home-sticky-state-provider' import styles from './home-sticky.module.css' @@ -12,7 +12,6 @@ import styles from './home-sticky.module.css' type HomeHeaderProps = { activeTab?: HomeCatalogTab actions?: React.ReactNode - brandName?: React.ReactNode isMarketplacePlatform: boolean } @@ -29,14 +28,7 @@ function Guide() { ) } -const HomeHeader = ({ - activeTab = 'plugins', - actions, - brandName, - isMarketplacePlatform, -}: HomeHeaderProps) => { - const { t } = useTranslation('common') - +const HomeHeader = ({ activeTab = 'plugins', actions, isMarketplacePlatform }: HomeHeaderProps) => { return (
- - - + - {brandName ?? t(($) => $['mainNav.marketplace'])} - + height="16.386" + src={MarketplaceLogo.src} + width="141.761" + /> +
- +
diff --git a/web/app/components/plugins/marketplace/index.tsx b/web/app/components/plugins/marketplace/index.tsx index 64fce91c65f..4f1258c39e2 100644 --- a/web/app/components/plugins/marketplace/index.tsx +++ b/web/app/components/plugins/marketplace/index.tsx @@ -21,7 +21,6 @@ type MarketplaceProps = { variant?: MarketplaceVariant language?: string homeHeaderActions?: React.ReactNode - homeHeaderBrandName?: React.ReactNode /** * Pass the search params from the request to prefetch data on the server. */ @@ -37,7 +36,6 @@ const Marketplace = async ({ variant = 'default', language, homeHeaderActions, - homeHeaderBrandName, searchParams, }: MarketplaceProps) => { let trendingBanners: PluginBanner[] = [] @@ -60,7 +58,6 @@ const Marketplace = async ({ + + + + + + + + + + + + + + + + + + diff --git a/web/public/marketplace/dify-marketplace-logo.svg b/web/public/marketplace/dify-marketplace-logo.svg new file mode 100644 index 00000000000..bff6718c2af --- /dev/null +++ b/web/public/marketplace/dify-marketplace-logo.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + +