From d0dd37e647dcb68808307eada1f451bd862a64dd Mon Sep 17 00:00:00 2001 From: Ik-Akmal Date: Tue, 10 Dec 2024 13:32:26 +0500 Subject: [PATCH 1/5] Store:Fixed 'peopleStore' was used before it was defined --- packages/client/src/store/ProfileActionsStore.js | 3 --- packages/client/src/store/index.js | 3 --- 2 files changed, 6 deletions(-) diff --git a/packages/client/src/store/ProfileActionsStore.js b/packages/client/src/store/ProfileActionsStore.js index 304ae5e08a2..9a61787ea11 100644 --- a/packages/client/src/store/ProfileActionsStore.js +++ b/packages/client/src/store/ProfileActionsStore.js @@ -65,7 +65,6 @@ class ProfileActionsStore { userStore = null; settingsStore = null; filesStore = null; - peopleStore = null; treeFoldersStore = null; selectedFolderStore = null; pluginStore = null; @@ -77,7 +76,6 @@ class ProfileActionsStore { constructor( authStore, filesStore, - peopleStore, treeFoldersStore, selectedFolderStore, pluginStore, @@ -87,7 +85,6 @@ class ProfileActionsStore { ) { this.authStore = authStore; this.filesStore = filesStore; - this.peopleStore = peopleStore; this.treeFoldersStore = treeFoldersStore; this.selectedFolderStore = selectedFolderStore; this.pluginStore = pluginStore; diff --git a/packages/client/src/store/index.js b/packages/client/src/store/index.js index b98826baf52..a072442b69c 100644 --- a/packages/client/src/store/index.js +++ b/packages/client/src/store/index.js @@ -187,7 +187,6 @@ const dialogsStore = new DialogsStore( const profileActionsStore = new ProfileActionsStore( authStore, filesStore, - peopleStore, treeFoldersStore, selectedFolderStore, pluginStore, @@ -208,8 +207,6 @@ const peopleStore = new PeopleStore( currentQuotaStore, ); -profileActionsStore.peopleStore = peopleStore; - const uploadDataStore = new UploadDataStore( settingsStore, treeFoldersStore, From 534784e144302386ba2691b7e2ab38236fae8dfb Mon Sep 17 00:00:00 2001 From: Ik-Akmal Date: Tue, 10 Dec 2024 13:48:57 +0500 Subject: [PATCH 2/5] CreateEditRoomDialog: fix dependency cycle --- .../sub-components/SetRoomParams.js | 39 ++++++++----------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/SetRoomParams.js b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/SetRoomParams.js index 70271d5ddfa..a964bec2e43 100644 --- a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/SetRoomParams.js +++ b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/SetRoomParams.js @@ -29,34 +29,29 @@ import styled, { css } from "styled-components"; import { withTranslation } from "react-i18next"; import { inject, observer } from "mobx-react"; -import RoomTypeDropdown from "./RoomTypeDropdown"; -import TagInput from "./TagInput"; -import RoomType from "@docspace/shared/components/room-type"; -import PermanentSettings from "./PermanentSettings"; -import InputParam from "./Params/InputParam"; -import ThirdPartyStorage from "./ThirdPartyStorage"; -// import IsPrivateParam from "./IsPrivateParam"; - -import withLoader from "@docspace/client/src/HOCs/withLoader"; -import SetRoomParamsLoader from "@docspace/shared/skeletons/create-edit-room/SetRoomParams"; - -import VirtualDataRoomBlock from "./VirtualDataRoomBlock"; -import ItemIcon from "@docspace/client/src/components/ItemIcon"; - -import ChangeRoomOwner from "./ChangeRoomOwner"; -import RoomQuota from "./RoomQuota"; import { RoomsType } from "@docspace/shared/enums"; - +import { globalColors } from "@docspace/shared/themes"; import { isMobile, mobile } from "@docspace/shared/utils"; -import { isMobileOnly } from "react-device-detect"; - -import { AvatarEditorDialog } from "SRC_DIR/components/dialogs"; - +import VirtualDataRoomBlock from "./VirtualDataRoomBlock"; +import RoomType from "@docspace/shared/components/room-type"; import { RoomIcon } from "@docspace/shared/components/room-icon"; -import { globalColors } from "@docspace/shared/themes"; +import SetRoomParamsLoader from "@docspace/shared/skeletons/create-edit-room/SetRoomParams"; + +import ItemIcon from "../../../ItemIcon"; +import withLoader from "../../../../HOCs/withLoader"; +import AvatarEditorDialog from "../../AvatarEditorDialog"; import { removeEmojiCharacters } from "SRC_DIR/helpers/utils"; +import TagInput from "./TagInput"; +import RoomQuota from "./RoomQuota"; +import InputParam from "./Params/InputParam"; +import ChangeRoomOwner from "./ChangeRoomOwner"; +import RoomTypeDropdown from "./RoomTypeDropdown"; +import PermanentSettings from "./PermanentSettings"; +import ThirdPartyStorage from "./ThirdPartyStorage"; +// import IsPrivateParam from "./IsPrivateParam"; + const StyledSetRoomParams = styled.div` display: flex; flex-direction: column; From c3ec948b842c475575b0a28303df865dfe5d30c6 Mon Sep 17 00:00:00 2001 From: Ik-Akmal Date: Tue, 10 Dec 2024 14:08:03 +0500 Subject: [PATCH 3/5] userStore: fix dependency cycle --- packages/client/src/helpers/contacts/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/helpers/contacts/utils.ts b/packages/client/src/helpers/contacts/utils.ts index 7fd339ecfa7..c567eee3fd0 100644 --- a/packages/client/src/helpers/contacts/utils.ts +++ b/packages/client/src/helpers/contacts/utils.ts @@ -39,7 +39,7 @@ import { } from "@docspace/shared/api/people"; import { toastr } from "@docspace/shared/components/toast"; -import UsersStore from "SRC_DIR/store/contacts/UsersStore"; +import type UsersStore from "SRC_DIR/store/contacts/UsersStore"; import config from "PACKAGE_FILE"; import { showEmailActivationToast } from "../people-helpers"; From a8ee3bca3ca90d5923c7ab43980e9e2edb149bc6 Mon Sep 17 00:00:00 2001 From: Ik-Akmal Date: Tue, 10 Dec 2024 14:24:17 +0500 Subject: [PATCH 4/5] AccessSelector: Fix: unsafe arithmetic operation on optional chaining --- packages/client/src/components/AccessSelector/index.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/client/src/components/AccessSelector/index.tsx b/packages/client/src/components/AccessSelector/index.tsx index a2f93de163a..f9fdefc4bb7 100644 --- a/packages/client/src/components/AccessSelector/index.tsx +++ b/packages/client/src/components/AccessSelector/index.tsx @@ -86,13 +86,15 @@ const AccessSelector: React.FC = ({ const [horizontalOrientation, setHorizontalOrientation] = useState(false); const [width, setWidth] = useState(manualWidth || 0); + const offsetWidth = containerRef?.current?.offsetWidth; + useEffect(() => { - if (!containerRef?.current?.offsetWidth) { + if (!offsetWidth) { return; } - setWidth(containerRef?.current?.offsetWidth - 32); - }, [containerRef?.current?.offsetWidth]); + setWidth(offsetWidth - 32); + }, [offsetWidth]); const accessOptions = getAccessOptions( t, From 0eae535bad5f92bccd287045500d55d53e5173e4 Mon Sep 17 00:00:00 2001 From: Alexey Safronov Date: Tue, 10 Dec 2024 13:55:00 +0400 Subject: [PATCH 5/5] Translatioins: Fix 'Custom' key --- .../src/pages/PortalSettings/categories/common/appearance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/pages/PortalSettings/categories/common/appearance.js b/packages/client/src/pages/PortalSettings/categories/common/appearance.js index eea80512b93..c1d27c45378 100644 --- a/packages/client/src/pages/PortalSettings/categories/common/appearance.js +++ b/packages/client/src/pages/PortalSettings/categories/common/appearance.js @@ -727,7 +727,7 @@ const Appearance = (props) => {
-
{t("Settings:Custom")}
+
{t("Common:Custom")}