mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-07 02:55:08 +08:00
Feat: Adjust the operation cell of the table on the file management page and dataset page #3221. (#7526)
### What problem does this PR solve? Feat: Adjust the operation cell of the table on the file management page and dataset page #3221. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -7,12 +7,13 @@ import {
|
||||
HoverCardTrigger,
|
||||
} from '@/components/ui/hover-card';
|
||||
import { IFile } from '@/interfaces/database/file-manager';
|
||||
import { Ellipsis } from 'lucide-react';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
export function KnowledgeCell({ value }: { value: IFile['kbs_info'] }) {
|
||||
const renderBadges = useCallback((list: IFile['kbs_info'] = []) => {
|
||||
return list.map((x) => (
|
||||
<Badge key={x.kb_id} className="" variant={'tertiary'}>
|
||||
<Badge key={x.kb_id} variant={'secondary'}>
|
||||
{x.kb_name}
|
||||
</Badge>
|
||||
));
|
||||
@ -25,8 +26,8 @@ export function KnowledgeCell({ value }: { value: IFile['kbs_info'] }) {
|
||||
{value.length > 2 && (
|
||||
<HoverCard>
|
||||
<HoverCardTrigger>
|
||||
<Button variant={'icon'} size={'auto'}>
|
||||
+{value.length - 2}
|
||||
<Button variant={'ghost'} size={'sm'}>
|
||||
<Ellipsis />
|
||||
</Button>
|
||||
</HoverCardTrigger>
|
||||
<HoverCardContent className="flex gap-2 flex-wrap">
|
||||
|
||||
Reference in New Issue
Block a user