Merge branch 'hotfix/v2.5.1' of https://github.com/ONLYOFFICE/DocSpace-client into hotfix/v2.5.1

This commit is contained in:
Tatiana Lopaeva 2024-05-02 13:16:56 +03:00
commit 5fa88652fa
4 changed files with 11 additions and 5 deletions

View File

@ -194,7 +194,7 @@ const Login: React.FC<ILoginProps> = ({
: window.open( : window.open(
url, url,
"login", "login",
"width=800,height=500,status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=no" "width=800,height=500,status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=no,popup=yes"
); );
const code: string = await getOAuthToken(tokenGetterWin); const code: string = await getOAuthToken(tokenGetterWin);

View File

@ -107,6 +107,7 @@ export type UseFilesHelpersProps = {
value: number | string | undefined | TBreadCrumb[], value: number | string | undefined | TBreadCrumb[],
) => void; ) => void;
isRoomsOnly: boolean; isRoomsOnly: boolean;
isUserOnly?: boolean;
rootThirdPartyId?: string; rootThirdPartyId?: string;
getRoomList?: ( getRoomList?: (
startIndex: number, startIndex: number,

View File

@ -65,6 +65,7 @@ const useFilesHelper = ({
getRootData, getRootData,
onSetBaseFolderPath, onSetBaseFolderPath,
isRoomsOnly, isRoomsOnly,
isUserOnly,
rootThirdPartyId, rootThirdPartyId,
getRoomList, getRoomList,
getIcon, getIcon,
@ -141,7 +142,7 @@ const useFilesHelper = ({
} }
} }
const id = selectedItemId || ""; const id = isUserOnly ? "@my" : selectedItemId || "";
filter.folder = id.toString(); filter.folder = id.toString();
@ -149,7 +150,7 @@ const useFilesHelper = ({
folderId: string | number, folderId: string | number,
isErrorPath = false, isErrorPath = false,
) => { ) => {
if (initRef.current && getRootData) { if (initRef.current && getRootData && folderId !== "@my") {
const folder = await getFolderInfo(folderId, true); const folder = await getFolderInfo(folderId, true);
const isArchive = folder.rootFolderType === FolderType.Archive; const isArchive = folder.rootFolderType === FolderType.Archive;
@ -247,7 +248,7 @@ const useFilesHelper = ({
// if (item.roomType) breadCrumbs[idx].isRoom = true; // if (item.roomType) breadCrumbs[idx].isRoom = true;
// }); // });
if (!isThirdParty && !isRoomsOnly) if (!isThirdParty && !isRoomsOnly && !isUserOnly)
breadCrumbs.unshift({ ...DEFAULT_BREAD_CRUMB }); breadCrumbs.unshift({ ...DEFAULT_BREAD_CRUMB });
onSetBaseFolderPath?.(isErrorPath ? [] : breadCrumbs); onSetBaseFolderPath?.(isErrorPath ? [] : breadCrumbs);
@ -308,6 +309,7 @@ const useFilesHelper = ({
setIsNextPageLoading, setIsNextPageLoading,
searchValue, searchValue,
filterParam, filterParam,
isUserOnly,
selectedItemId, selectedItemId,
getRootData, getRootData,
setSelectedItemSecurity, setSelectedItemSecurity,

View File

@ -186,6 +186,7 @@ const FilesSelector = ({
setIsRoot, setIsRoot,
searchValue, searchValue,
isRoomsOnly, isRoomsOnly,
onSetBaseFolderPath, onSetBaseFolderPath,
isInit, isInit,
setIsInit, setIsInit,
@ -211,6 +212,7 @@ const FilesSelector = ({
getRootData, getRootData,
onSetBaseFolderPath, onSetBaseFolderPath,
isRoomsOnly, isRoomsOnly,
isUserOnly,
rootThirdPartyId, rootThirdPartyId,
getRoomList, getRoomList,
getIcon, getIcon,
@ -289,7 +291,7 @@ const FilesSelector = ({
return; return;
} }
if (!currentFolderId) { if (!currentFolderId && !isUserOnly) {
setSelectedItemType("rooms"); setSelectedItemType("rooms");
return; return;
} }
@ -311,6 +313,7 @@ const FilesSelector = ({
currentFolderId, currentFolderId,
isRoomsOnly, isRoomsOnly,
isThirdParty, isThirdParty,
isUserOnly,
parentId, parentId,
roomsFolderId, roomsFolderId,
rootFolderType, rootFolderType,