feat(knowledge): add document parser and metadata management
This commit is contained in:
32
src/pages/knowledge/components/ParserContextMenu.tsx
Normal file
32
src/pages/knowledge/components/ParserContextMenu.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import React from 'react';
|
||||
import { Menu, MenuItem, Typography } from '@mui/material';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
interface ParserContextMenuProps {
|
||||
anchorEl: HTMLElement | null;
|
||||
open: boolean;
|
||||
onClose: () => void;
|
||||
onOpenParser: () => void;
|
||||
onOpenMetadata: () => void;
|
||||
}
|
||||
|
||||
export default function ParserContextMenu({
|
||||
anchorEl,
|
||||
open,
|
||||
onClose,
|
||||
onOpenParser,
|
||||
onOpenMetadata,
|
||||
}: ParserContextMenuProps) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Menu anchorEl={anchorEl} open={open} onClose={onClose}>
|
||||
<MenuItem onClick={() => { onOpenParser(); }}>
|
||||
<Typography>{t('knowledgeDetails.dataPipeline')}</Typography>
|
||||
</MenuItem>
|
||||
<MenuItem onClick={() => { onOpenMetadata(); }}>
|
||||
<Typography>{t('knowledgeDetails.setMetaData')}</Typography>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user