dify/web/app/components/plugins/marketplace/description/index.tsx

44 lines
1.7 KiB
TypeScript
Raw Normal View History

2024-11-06 15:23:38 +08:00
import {
getLocaleOnServer,
useTranslation as translate,
} from '@/i18n/server'
2024-11-06 11:55:19 +08:00
type DescriptionProps = {
locale?: string
}
const Description = async ({
2024-11-06 15:23:38 +08:00
locale: localeFromProps,
2024-11-06 11:55:19 +08:00
}: DescriptionProps) => {
2024-11-06 15:23:38 +08:00
const localeDefault = getLocaleOnServer()
const { t } = await translate(localeFromProps || localeDefault, 'plugin')
2024-11-06 11:55:19 +08:00
2024-10-12 12:46:29 +08:00
return (
<>
2024-11-07 15:37:22 +08:00
<h1 className='shrink-0 mb-2 text-center title-4xl-semi-bold text-text-primary'>
2024-11-08 16:13:52 +08:00
{t('marketplace.empower')}
2024-10-12 12:46:29 +08:00
</h1>
2024-11-07 15:37:22 +08:00
<h2 className='shrink-0 flex justify-center items-center text-center body-md-regular text-text-tertiary'>
2024-11-08 16:13:52 +08:00
{t('marketplace.discover')}
2024-10-12 12:46:29 +08:00
<span className="relative ml-1 body-md-medium text-text-secondary after:content-[''] after:absolute after:left-0 after:bottom-[1.5px] after:w-full after:h-2 after:bg-text-text-selected">
2024-11-06 11:55:19 +08:00
{t('category.models')}
2024-10-12 12:46:29 +08:00
</span>
,
<span className="relative ml-1 body-md-medium text-text-secondary after:content-[''] after:absolute after:left-0 after:bottom-[1.5px] after:w-full after:h-2 after:bg-text-text-selected">
2024-11-06 11:55:19 +08:00
{t('category.tools')}
2024-10-12 12:46:29 +08:00
</span>
,
<span className="relative ml-1 mr-1 body-md-medium text-text-secondary after:content-[''] after:absolute after:left-0 after:bottom-[1.5px] after:w-full after:h-2 after:bg-text-text-selected">
2024-11-06 11:55:19 +08:00
{t('category.extensions')}
2024-10-12 12:46:29 +08:00
</span>
2024-11-08 16:13:52 +08:00
{t('marketplace.and')}
2024-10-12 12:46:29 +08:00
<span className="relative ml-1 mr-1 body-md-medium text-text-secondary after:content-[''] after:absolute after:left-0 after:bottom-[1.5px] after:w-full after:h-2 after:bg-text-text-selected">
2024-11-06 11:55:19 +08:00
{t('category.bundles')}
2024-10-12 12:46:29 +08:00
</span>
2024-11-08 16:13:52 +08:00
{t('marketplace.inDifyMarketplace')}
2024-10-12 12:46:29 +08:00
</h2>
</>
)
}
2024-10-12 16:34:02 +08:00
export default Description