add datasource category

This commit is contained in:
zxhlyh 2025-06-12 16:23:50 +08:00
parent 6f17200dec
commit b367f48de6
2 changed files with 3 additions and 2 deletions

View File

@ -48,7 +48,7 @@ const Card = ({
const { t } = useMixedTranslation(localeFromProps)
const { categoriesMap } = useSingleCategories(t)
const { category, type, name, org, label, brief, icon, verified, badges = [] } = payload
const isBundle = !['plugin', 'model', 'tool', 'extension', 'agent-strategy'].includes(type)
const isBundle = !['plugin', 'model', 'tool', 'datasource', 'extension', 'agent-strategy'].includes(type)
const cornerMark = isBundle ? categoriesMap.bundle?.label : categoriesMap[category]?.label
const getLocalizedText = (obj: Record<string, string> | undefined) =>
obj ? renderI18nObject(obj, locale) : ''

View File

@ -2,6 +2,7 @@
import {
RiArchive2Line,
RiBrain2Line,
RiDatabase2Line,
RiHammerLine,
RiPuzzle2Line,
RiSpeakAiLine,
@ -60,7 +61,7 @@ const PluginTypeSwitch = ({
{
value: PLUGIN_TYPE_SEARCH_MAP.datasource,
text: t('plugin.category.datasources'),
icon: <RiHammerLine className='mr-1.5 h-4 w-4' />,
icon: <RiDatabase2Line className='mr-1.5 h-4 w-4' />,
},
{
value: PLUGIN_TYPE_SEARCH_MAP.agent,