mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-05 01:55:05 +08:00
### What problem does this PR solve? Feat: Adjust the style of the mcp dialog #10703 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -5,6 +5,7 @@ import { IMcpServer } from '@/interfaces/database/mcp';
|
||||
import { formatDate } from '@/utils/date';
|
||||
import { isPlainObject } from 'lodash';
|
||||
import { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { McpDropdown } from './mcp-dropdown';
|
||||
import { UseBulkOperateMCPReturnType } from './use-bulk-operate-mcp';
|
||||
import { UseEditMcpReturnType } from './use-edit-mcp';
|
||||
@ -20,6 +21,7 @@ export function McpCard({
|
||||
handleSelectChange,
|
||||
showEditModal,
|
||||
}: DatasetCardProps) {
|
||||
const { t } = useTranslation();
|
||||
const toolLength = useMemo(() => {
|
||||
const tools = data.variables?.tools;
|
||||
if (isPlainObject(tools)) {
|
||||
@ -36,7 +38,9 @@ export function McpCard({
|
||||
<Card key={data.id}>
|
||||
<CardContent className="p-2.5 pt-2 group">
|
||||
<section className="flex justify-between pb-2">
|
||||
<h3 className="text-lg font-semibold truncate flex-1">{data.name}</h3>
|
||||
<h3 className="text-base font-normal truncate flex-1 text-text-primary">
|
||||
{data.name}
|
||||
</h3>
|
||||
<div className="space-x-4">
|
||||
<McpDropdown mcpId={data.id} showEditModal={showEditModal}>
|
||||
<MoreButton></MoreButton>
|
||||
@ -50,14 +54,12 @@ export function McpCard({
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
<div className="flex justify-between items-end">
|
||||
<div className="flex justify-between items-end text-xs text-text-secondary">
|
||||
<div className="w-full">
|
||||
<div className="text-base font-semibold mb-3 line-clamp-1 text-text-secondary">
|
||||
{toolLength} cached tools
|
||||
<div className="line-clamp-1 pb-1">
|
||||
{toolLength} {t('mcp.cachedTools')}
|
||||
</div>
|
||||
<p className="text-sm text-text-secondary">
|
||||
{formatDate(data.update_date)}
|
||||
</p>
|
||||
<p>{formatDate(data.update_date)}</p>
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
|
||||
Reference in New Issue
Block a user