mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-20 12:56:55 +08:00
### What problem does this PR solve? feat: upload file in FileManager #345 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -32,6 +32,7 @@ import styles from './index.less';
|
||||
interface IProps {
|
||||
selectedRowKeys: string[];
|
||||
showFolderCreateModal: () => void;
|
||||
showFileUploadModal: () => void;
|
||||
}
|
||||
|
||||
const itemRender: BreadcrumbProps['itemRender'] = (
|
||||
@ -48,7 +49,11 @@ const itemRender: BreadcrumbProps['itemRender'] = (
|
||||
);
|
||||
};
|
||||
|
||||
const FileToolbar = ({ selectedRowKeys, showFolderCreateModal }: IProps) => {
|
||||
const FileToolbar = ({
|
||||
selectedRowKeys,
|
||||
showFolderCreateModal,
|
||||
showFileUploadModal,
|
||||
}: IProps) => {
|
||||
const { t } = useTranslate('knowledgeDetails');
|
||||
const { fetchDocumentList } = useFetchDocumentListOnMount();
|
||||
const { setPagination, searchString } = useGetPagination(fetchDocumentList);
|
||||
@ -59,6 +64,7 @@ const FileToolbar = ({ selectedRowKeys, showFolderCreateModal }: IProps) => {
|
||||
return [
|
||||
{
|
||||
key: '1',
|
||||
onClick: showFileUploadModal,
|
||||
label: (
|
||||
<div>
|
||||
<Button type="link">
|
||||
@ -85,7 +91,7 @@ const FileToolbar = ({ selectedRowKeys, showFolderCreateModal }: IProps) => {
|
||||
// disabled: true,
|
||||
},
|
||||
];
|
||||
}, [t, showFolderCreateModal]);
|
||||
}, [t, showFolderCreateModal, showFileUploadModal]);
|
||||
|
||||
const { handleRemoveFile } = useHandleDeleteFile(selectedRowKeys);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user