mirror of
https://github.com/langgenius/dify.git
synced 2025-09-26 09:36:13 +00:00
add datasource category
This commit is contained in:
parent
6f17200dec
commit
b367f48de6
@ -48,7 +48,7 @@ const Card = ({
|
|||||||
const { t } = useMixedTranslation(localeFromProps)
|
const { t } = useMixedTranslation(localeFromProps)
|
||||||
const { categoriesMap } = useSingleCategories(t)
|
const { categoriesMap } = useSingleCategories(t)
|
||||||
const { category, type, name, org, label, brief, icon, verified, badges = [] } = payload
|
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 cornerMark = isBundle ? categoriesMap.bundle?.label : categoriesMap[category]?.label
|
||||||
const getLocalizedText = (obj: Record<string, string> | undefined) =>
|
const getLocalizedText = (obj: Record<string, string> | undefined) =>
|
||||||
obj ? renderI18nObject(obj, locale) : ''
|
obj ? renderI18nObject(obj, locale) : ''
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import {
|
import {
|
||||||
RiArchive2Line,
|
RiArchive2Line,
|
||||||
RiBrain2Line,
|
RiBrain2Line,
|
||||||
|
RiDatabase2Line,
|
||||||
RiHammerLine,
|
RiHammerLine,
|
||||||
RiPuzzle2Line,
|
RiPuzzle2Line,
|
||||||
RiSpeakAiLine,
|
RiSpeakAiLine,
|
||||||
@ -60,7 +61,7 @@ const PluginTypeSwitch = ({
|
|||||||
{
|
{
|
||||||
value: PLUGIN_TYPE_SEARCH_MAP.datasource,
|
value: PLUGIN_TYPE_SEARCH_MAP.datasource,
|
||||||
text: t('plugin.category.datasources'),
|
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,
|
value: PLUGIN_TYPE_SEARCH_MAP.agent,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user