Merge branch 'feature/langs-updates_0524' of https://github.com/ONLYOFFICE/DocSpace-client into feature/langs-updates_0524

This commit is contained in:
Maria Sukhova 2024-05-06 18:16:43 +03:00
commit 26ef649358
9 changed files with 236 additions and 199 deletions

View File

@ -335,7 +335,7 @@ const FilesSelectorWrapper = ({
isThirdParty={isThirdParty}
rootThirdPartyId={rootThirdPartyId}
roomsFolderId={roomsFolderId}
currentFolderId={currentFolderId || 0}
currentFolderId={currentFolderId}
parentId={parentId}
rootFolderType={rootFolderType || FolderType.Rooms}
currentDeviceType={currentDeviceType}
@ -481,7 +481,7 @@ export default inject(
(rootFolderType === FolderType.Archive ||
rootFolderType === FolderType.TRASH
? undefined
: selectedId !== selectionsWithoutEditing[0]?.id
: selectedId === selectionsWithoutEditing[0]?.id
? parentId
: selectedId);

View File

@ -53,6 +53,7 @@ const Accounts = (props) => {
setPeopleBufferSelection,
showStorageInfo,
standalone,
} = props;
const navigate = useNavigate();
@ -233,6 +234,8 @@ const Accounts = (props) => {
</Text>
{typeData}
{!standalone && (
<>
<Text className={"info_field"} noSelect title={t("UserStatus")}>
{t("UserStatus")}
</Text>
@ -245,6 +248,8 @@ const Accounts = (props) => {
>
{statusText}
</Text>
</>
)}
{showStorageInfo && (
<>
<Text
@ -310,6 +315,7 @@ export default inject(
accessRightsStore,
infoPanelStore,
currentQuotaStore,
settingsStore,
}) => {
const { isOwner, isAdmin, id: selfId } = userStore.user;
const { changeType: changeUserType, usersStore } = peopleStore;
@ -323,6 +329,8 @@ export default inject(
} = peopleStore.selectionStore;
const { showStorageInfo } = currentQuotaStore;
const { standalone } = settingsStore;
return {
isOwner,
isAdmin,
@ -335,6 +343,7 @@ export default inject(
setPeopleSelection,
setPeopleBufferSelection,
showStorageInfo,
standalone,
};
},
)(

View File

@ -42,6 +42,7 @@ import { Button } from "@docspace/shared/components/button";
import { FieldContainer } from "@docspace/shared/components/field-container";
import ErrorContainer from "@docspace/shared/components/error-container/ErrorContainer";
import { FileInput } from "@docspace/shared/components/file-input";
import { Scrollbar } from "@docspace/shared/components/scrollbar";
import { Loader } from "@docspace/shared/components/loader";
@ -314,6 +315,7 @@ const Wizard = (props) => {
return (
<Wrapper>
<div className="bg-cover"></div>
<Scrollbar id="customScrollBar">
<StyledContent>
<WizardContainer>
<DocspaceLogo className="docspace-logo" />
@ -515,6 +517,7 @@ const Wizard = (props) => {
</FormWrapper>
</WizardContainer>
</StyledContent>
</Scrollbar>
</Wrapper>
);
};

View File

@ -141,7 +141,7 @@ const Editor = ({
)?.["Editor"] as {
[key: string]: string;
}
)?.["FileLocation"];
)?.["FileLocation"]; // t("FileLocation");
if (editorGoBack === "false" || user?.isVisitor || !user) {
} else if (editorGoBack === "event") {
@ -294,3 +294,4 @@ const Editor = ({
};
export default Editor;

View File

@ -126,6 +126,7 @@ export const StyledBody = styled.div`
max-width: 960px;
width: 100vw;
margin-bottom: 16px;
@media ${mobile} {
margin: 0 auto;

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,
@ -149,6 +150,7 @@ export type FilesSelectorProps = (
value: number | string | undefined | TBreadCrumb[],
) => void;
isUserOnly?: boolean;
openRoot?: boolean;
isRoomsOnly: boolean;
isThirdParty: boolean;
rootThirdPartyId?: string;

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

@ -76,6 +76,7 @@ const FilesSelector = ({
onSetBaseFolderPath,
isUserOnly,
isRoomsOnly,
openRoot,
isThirdParty,
rootThirdPartyId,
roomsFolderId,
@ -186,6 +187,7 @@ const FilesSelector = ({
setIsRoot,
searchValue,
isRoomsOnly,
onSetBaseFolderPath,
isInit,
setIsInit,
@ -211,6 +213,7 @@ const FilesSelector = ({
getRootData,
onSetBaseFolderPath,
isRoomsOnly,
isUserOnly,
rootThirdPartyId,
getRoomList,
getIcon,
@ -289,7 +292,7 @@ const FilesSelector = ({
return;
}
if (!currentFolderId) {
if (!currentFolderId && !isUserOnly && !openRoot) {
setSelectedItemType("rooms");
return;
}
@ -311,9 +314,11 @@ const FilesSelector = ({
currentFolderId,
isRoomsOnly,
isThirdParty,
isUserOnly,
parentId,
roomsFolderId,
rootFolderType,
openRoot,
setIsFirstLoad,
]);
@ -439,10 +444,24 @@ const FilesSelector = ({
);
React.useEffect(() => {
if (selectedItemType === "rooms") getRoomList(0);
if (selectedItemType === "rooms") {
getRoomList(0);
return;
}
if (openRoot && !selectedItemId) {
getRootData();
return;
}
if (selectedItemType === "files" && typeof selectedItemId !== "undefined")
getFileList(0);
}, [getFileList, getRoomList, selectedItemType, selectedItemId]);
}, [
getFileList,
getRoomList,
selectedItemType,
selectedItemId,
getRootData,
openRoot,
]);
const headerProps: TSelectorHeader = withHeader
? { withHeader, headerProps: { headerLabel } }