fix: marketplace collection label description

This commit is contained in:
StyleZhang 2024-11-19 16:42:49 +08:00
parent a867040b88
commit 27b1a51572
6 changed files with 12 additions and 8 deletions

View File

@ -1,12 +1,14 @@
import PluginPage from '@/app/components/plugins/plugin-page'
import PluginsPanel from '@/app/components/plugins/plugin-page/plugins-panel'
import Marketplace from '@/app/components/plugins/marketplace'
import { getLocaleOnServer } from '@/i18n/server'
const PluginList = async () => {
const locale = await getLocaleOnServer()
return (
<PluginPage
plugins={<PluginsPanel />}
marketplace={<Marketplace />}
marketplace={<Marketplace locale={locale} />}
/>
)
}

View File

@ -9,7 +9,7 @@ import { getMarketplaceCollectionsAndPlugins } from './utils'
import { TanstackQueryIniter } from '@/context/query-client'
type MarketplaceProps = {
locale?: string
locale: string
showInstallButton?: boolean
searchParams?: SearchParams
}

View File

@ -10,7 +10,7 @@ type ListProps = {
marketplaceCollectionPluginsMap: Record<string, Plugin[]>
plugins?: Plugin[]
showInstallButton?: boolean
locale?: string
locale: string
}
const List = ({
marketplaceCollections,

View File

@ -2,12 +2,13 @@
import type { MarketplaceCollection } from '../types'
import CardWrapper from './card-wrapper'
import type { Plugin } from '@/app/components/plugins/types'
import { getLanguage } from '@/i18n/language'
type ListWithCollectionProps = {
marketplaceCollections: MarketplaceCollection[]
marketplaceCollectionPluginsMap: Record<string, Plugin[]>
showInstallButton?: boolean
locale?: string
locale: string
}
const ListWithCollection = ({
marketplaceCollections,
@ -23,8 +24,8 @@ const ListWithCollection = ({
key={collection.name}
className='py-3'
>
<div className='title-xl-semi-bold text-text-primary'>{collection.name}</div>
<div className='system-xs-regular text-text-tertiary'>{collection.description}</div>
<div className='title-xl-semi-bold text-text-primary'>{collection.label[getLanguage(locale)]}</div>
<div className='system-xs-regular text-text-tertiary'>{collection.description[getLanguage(locale)]}</div>
<div className='grid grid-cols-4 gap-3 mt-2'>
{
marketplaceCollectionPluginsMap[collection.name].map(plugin => (

View File

@ -11,7 +11,7 @@ type ListWrapperProps = {
marketplaceCollections: MarketplaceCollection[]
marketplaceCollectionPluginsMap: Record<string, Plugin[]>
showInstallButton?: boolean
locale?: string
locale: string
}
const ListWrapper = ({
marketplaceCollections,

View File

@ -2,7 +2,8 @@ import type { Plugin } from '../types'
export type MarketplaceCollection = {
name: string
description: string
label: Record<string, string>
description: Record<string, string>
rule: string
created_at: string
updated_at: string