diff --git a/src/renderer/src/pages/settings/AgentSettings/components/PluginCard.tsx b/src/renderer/src/pages/settings/AgentSettings/components/PluginCard.tsx index bf14c25e23..992a724d08 100644 --- a/src/renderer/src/pages/settings/AgentSettings/components/PluginCard.tsx +++ b/src/renderer/src/pages/settings/AgentSettings/components/PluginCard.tsx @@ -1,5 +1,5 @@ -import { Button, Card, CardBody, CardFooter, CardHeader, Chip, Spinner } from '@heroui/react' import type { PluginMetadata } from '@renderer/types/plugin' +import { Button, Card, Spin, Tag } from 'antd' import { upperFirst } from 'lodash' import { Download, Trash2 } from 'lucide-react' import type { FC } from 'react' @@ -17,73 +17,74 @@ export interface PluginCardProps { export const PluginCard: FC = ({ plugin, installed, onInstall, onUninstall, loading, onClick }) => { const { t } = useTranslation() + const getTypeTagColor = () => { + if (plugin.type === 'agent') return 'blue' + if (plugin.type === 'skill') return 'green' + return 'default' + } + return ( - + className="flex h-full w-full cursor-pointer flex-col" + onClick={onClick} + hoverable + styles={{ + body: { display: 'flex', flexDirection: 'column', height: '100%', padding: '16px' } + }}> +
-

{plugin.name}

- +

{plugin.name}

+ {upperFirst(plugin.type)} -
+
- - {plugin.category} - - + {plugin.category} +
- -

{plugin.description || t('plugins.no_description')}

+
+

{plugin.description || t('plugins.no_description')}

{plugin.tags && plugin.tags.length > 0 && (
{plugin.tags.map((tag) => ( - + {tag} - + ))}
)} - +
- +
{installed ? ( ) : ( )} - +
) }