dify/web/app/components/plugins/marketplace/home/index.tsx
Coding On Star cb6c04637b
feat(web): add marketplace creator profiles and homepage redesign (#41538)
Co-authored-by: zxhlyh <jasonapring2015@outlook.com>
Co-authored-by: fatelei <fatelei@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: CodingOnStar <hanxujiang@dify.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: 姜涵煦 <hanxujiang@jianghanxudeMacBook-Pro-2.local>
Co-authored-by: L1nSn0w <l1nsn0w@qq.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2026-09-04 08:09:45 +00:00

83 lines
2.5 KiB
TypeScript

import type { PluginBanner } from '@dify/contracts/marketplace'
import type { ActivePluginType } from '../constants'
import type { HomeCatalogTabLabels } from './home-catalog-tabs'
import ListWrapper from '../list/list-wrapper'
import CatalogTagsFilter from './catalog-tags-filter'
import HomeCatalogNavigation from './home-catalog-navigation'
import HomeCatalogTabs from './home-catalog-tabs'
import HomeHeader from './home-header'
import HomeHero from './home-hero'
import HomeSearch from './home-search'
import { HomeShell } from './home-shell'
import styles from './home-sticky.module.css'
type MarketplaceHomeProps = {
actions?: React.ReactNode
activePluginType?: ActivePluginType
banners: PluginBanner[]
catalogCategories?: React.ReactNode
catalogLabels?: HomeCatalogTabLabels
isMarketplacePlatform: boolean
language?: string
linkToMarketplaceDetail: boolean
search?: React.ReactNode
showInstallButton: boolean
}
const MarketplaceHome = ({
actions,
activePluginType,
banners,
catalogCategories,
catalogLabels,
isMarketplacePlatform,
language,
linkToMarketplaceDetail,
search,
showInstallButton,
}: MarketplaceHomeProps) => {
return (
<HomeShell
banners={banners}
isMarketplacePlatform={isMarketplacePlatform}
page="plugins"
header={
<HomeHeader
actions={actions}
catalogLabels={catalogLabels}
isMarketplacePlatform={isMarketplacePlatform}
language={language}
/>
}
hero={<HomeHero isMarketplacePlatform={isMarketplacePlatform} />}
search={<HomeSearch enableSearchShortcut={isMarketplacePlatform}>{search}</HomeSearch>}
navigation={
<HomeCatalogNavigation
catalogCategories={catalogCategories}
catalogLeading={<CatalogTagsFilter />}
isMarketplacePlatform={isMarketplacePlatform}
catalogTabs={
<HomeCatalogTabs
isMarketplacePlatform={isMarketplacePlatform}
labels={catalogLabels}
language={language}
/>
}
/>
}
>
<div className="contents [&>div]:bg-background-default!">
<ListWrapper
activePluginType={activePluginType}
className={styles.catalogContent}
deferOffscreenCollections={!isMarketplacePlatform}
showInstallButton={showInstallButton}
linkToMarketplaceDetail={linkToMarketplaceDetail}
/>
</div>
</HomeShell>
)
}
export default MarketplaceHome