Merge branch 'release/v2.0.0' into bugfix/fix-url

This commit is contained in:
Timofey Boyko 2023-10-19 10:54:28 +03:00
commit b4c51db30a
2 changed files with 45 additions and 0 deletions

View File

@ -224,12 +224,25 @@ class ContextOptionsStore {
onMoveAction = () => {
const { setIsMobileHidden } = this.authStore.infoPanelStore;
setIsMobileHidden(true);
const { getSelectedFolder } = this.selectedFolderStore;
const { setBufferSelection } = this.filesStore;
const selectedFolder = getSelectedFolder();
setBufferSelection(selectedFolder);
this.dialogsStore.setMoveToPanelVisible(true);
};
onCopyAction = () => {
const { setIsMobileHidden } = this.authStore.infoPanelStore;
setIsMobileHidden(true);
const { getSelectedFolder } = this.selectedFolderStore;
const { setBufferSelection } = this.filesStore;
const selectedFolder = getSelectedFolder();
setBufferSelection(selectedFolder);
this.dialogsStore.setCopyPanelVisible(true);
};

View File

@ -39,6 +39,38 @@ class SelectedFolderStore {
this.settingsStore = settingsStore;
}
getSelectedFolder = () => {
return {
folders: this.folders,
parentId: this.parentId,
filesCount: this.filesCount,
foldersCount: this.foldersCount,
isShareable: this.isShareable,
new: this.new,
id: this.id,
title: this.title,
access: this.access,
shared: this.shared,
created: this.created,
createdBy: this.createdBy,
updated: this.updated,
updatedBy: this.updatedBy,
rootFolderType: this.rootFolderType,
pathParts: this.pathParts,
navigationPath: this.navigationPath,
providerItem: this.providerItem,
providerKey: this.providerKey,
providerId: this.providerId,
roomType: this.roomType,
pinned: this.pinned,
isRoom: this.isRoom,
logo: this.logo,
tags: this.tags,
rootFolderId: this.rootFolderId,
security: this.security,
};
};
get isRootFolder() {
return this.pathParts && this.pathParts.length <= 1;
}