Web: Removed jumps from the interface in an empty folder.

This commit is contained in:
Tatiana Lopaeva 2022-11-29 10:04:20 +03:00
parent 6077a2288f
commit 975378d072
2 changed files with 5 additions and 1 deletions

View File

@ -151,6 +151,7 @@ export default inject(
filesStore,
selectedFolderStore,
contextOptionsStore,
treeFoldersStore,
}) => {
const { fetchFiles, fetchRooms, setIsEmptyPage } = filesStore;
const {
@ -158,7 +159,9 @@ export default inject(
parentId,
access,
id: folderId,
rootFolderType,
} = selectedFolderStore;
const { isRoomRoot } = treeFoldersStore;
let isRootRoom, isRoom, id;
if (navigationPath && navigationPath.length) {
@ -180,7 +183,7 @@ export default inject(
fetchRooms,
setIsLoading: filesStore.setIsLoading,
parentId: id ?? parentId,
isRooms: isRoom || isRootRoom,
isRooms: isRoom || isRootRoom || isRoomRoot(rootFolderType),
canCreateFiles,
canInviteUsers,
setIsEmptyPage,

View File

@ -70,6 +70,7 @@ class TreeFoldersStore {
isMy = (myType) => myType === FolderType.USER;
isCommon = (commonType) => commonType === FolderType.COMMON;
isShare = (shareType) => shareType === FolderType.SHARE;
isRoomRoot = (type) => type === FolderType.Rooms;
getRootFolder = (rootFolderType) => {
return this.treeFolders.find((x) => x.rootFolderType === rootFolderType);