99 dragndroppubliclink (#112)
* 🐛Removed noisy notification with shared link * 🐛upload zone size (#99)
This commit is contained in:
@@ -101,6 +101,8 @@ export default memo(
|
|||||||
[_setParentId],
|
[_setParentId],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//In case we are kicked out of the current folder, we need to reset the parent id
|
//In case we are kicked out of the current folder, we need to reset the parent id
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!loading && !path?.length && !inPublicSharing && !sharedWithMe) setParentId('root');
|
if (!loading && !path?.length && !inPublicSharing && !sharedWithMe) setParentId('root');
|
||||||
@@ -134,6 +136,22 @@ export default memo(
|
|||||||
const onBuildContextMenu = useOnBuildContextMenu(children, initialParentId);
|
const onBuildContextMenu = useOnBuildContextMenu(children, initialParentId);
|
||||||
const { viewId } = useRouteState();
|
const { viewId } = useRouteState();
|
||||||
|
|
||||||
|
const handleDragOver = (event: { preventDefault: () => void; }) => {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
const handleDrop = async (event: {dataTransfer: any; preventDefault: () => void;}) => {
|
||||||
|
event.preventDefault();
|
||||||
|
const dataTransfer = event.dataTransfer;
|
||||||
|
if (dataTransfer) {
|
||||||
|
const tree = await getFilesTree(dataTransfer);
|
||||||
|
setCreationModalState({ parent_id: '', open: false });
|
||||||
|
uploadTree(tree, {
|
||||||
|
companyId,
|
||||||
|
parentId,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const buildFileTypeContextMenu = useOnBuildFileTypeContextMenu();
|
const buildFileTypeContextMenu = useOnBuildFileTypeContextMenu();
|
||||||
const buildPeopleContextMen = useOnBuildPeopleContextMenu();
|
const buildPeopleContextMen = useOnBuildPeopleContextMenu();
|
||||||
const buildDateContextMenu = useOnBuildDateContextMenu();
|
const buildDateContextMenu = useOnBuildDateContextMenu();
|
||||||
@@ -151,7 +169,7 @@ export default memo(
|
|||||||
<UploadZone
|
<UploadZone
|
||||||
overClassName={''}
|
overClassName={''}
|
||||||
className="h-full overflow-hidden"
|
className="h-full overflow-hidden"
|
||||||
disableClick
|
//disableClick
|
||||||
parent={''}
|
parent={''}
|
||||||
multiple={true}
|
multiple={true}
|
||||||
allowPaste={true}
|
allowPaste={true}
|
||||||
@@ -165,6 +183,9 @@ export default memo(
|
|||||||
parentId,
|
parentId,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
onDragOver={handleDragOver}
|
||||||
|
onDrop={handleDrop}
|
||||||
|
|
||||||
>
|
>
|
||||||
<DriveRealtimeObject id={parentId} key={parentId} />
|
<DriveRealtimeObject id={parentId} key={parentId} />
|
||||||
<VersionsModal />
|
<VersionsModal />
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export default () => {
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="main-view public p-4">
|
<div className="h-full main-view public p-4">
|
||||||
<AccessChecker folderId={documentId} token={token}>
|
<AccessChecker folderId={documentId} token={token}>
|
||||||
<Drive initialParentId={documentId} inPublicSharing />
|
<Drive initialParentId={documentId} inPublicSharing />
|
||||||
</AccessChecker>
|
</AccessChecker>
|
||||||
|
|||||||
Reference in New Issue
Block a user