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(
url,
"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);

View File

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

View File

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

View File

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