Web: Files: fixed drag to trash

This commit is contained in:
Nikita Gopienko 2023-03-21 11:31:24 +03:00
parent ea54237ca3
commit 770d1723f8

View File

@ -274,6 +274,10 @@ const Items = ({
)
return false;
const isArchive = draggableItems.find(
(f) => f.rootFolderType === FolderType.Archive
);
if (
item.rootFolderType === FolderType.SHARE &&
item.access === ShareAccessRights.FullAccess
@ -287,7 +291,7 @@ const Items = ({
(item.pathParts[0] === myId || item.pathParts[0] === commonId)) ||
item.rootFolderType === FolderType.USER ||
item.rootFolderType === FolderType.COMMON ||
(item.rootFolderType === FolderType.TRASH && startDrag)
(item.rootFolderType === FolderType.TRASH && startDrag && !isArchive)
) {
return true;
}
@ -422,6 +426,7 @@ export default inject(
}) => {
const {
selection,
bufferSelection,
dragging,
setDragging,
trashIsEmpty,
@ -460,7 +465,11 @@ export default inject(
pathParts,
data: treeFolders,
selectedTreeNode,
draggableItems: dragging ? selection : null,
draggableItems: dragging
? bufferSelection
? [bufferSelection]
: selection
: null,
dragging,
setDragging,
moveDragItems,