From d210a968aed68637ecd95a6e38556fcf1a838f7c Mon Sep 17 00:00:00 2001 From: Mushka Nikita Date: Thu, 20 Apr 2023 11:47:39 +0300 Subject: [PATCH 1/5] unlock thirdparty --- .../CreateEditRoomDialog/sub-components/SetRoomParams.js | 8 ++++---- packages/common/constants/index.js | 6 +++--- 2 files changed, 7 insertions(+), 7 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 5392b84913..54be05c389 100644 --- a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/SetRoomParams.js +++ b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/SetRoomParams.js @@ -8,7 +8,7 @@ import RoomType from "./RoomType"; import PermanentSettings from "./PermanentSettings"; import InputParam from "./Params/InputParam"; -// import ThirdPartyStorage from "./ThirdPartyStorage"; +import ThirdPartyStorage from "./ThirdPartyStorage"; // import IsPrivateParam from "./IsPrivateParam"; import withLoader from "@docspace/client/src/HOCs/withLoader"; @@ -117,8 +117,8 @@ const SetRoomParams = ({ /> )} */} - {/* //TODO: Uncomment when third-party storages will be stable - {!isEdit && enableThirdParty && ( + {/* //TODO: Uncomment when third-party storages will be stable */} + {!isEdit && enableThirdParty && ( - )} */} + )}
{t("Icon")} diff --git a/packages/common/constants/index.js b/packages/common/constants/index.js index 2ec2f0d049..c99a73aedf 100644 --- a/packages/common/constants/index.js +++ b/packages/common/constants/index.js @@ -99,10 +99,10 @@ export const FileType = Object.freeze({ * @readonly */ export const RoomsType = Object.freeze({ - //FillingFormsRoom: 1, //TODO: Restore when certs will be done + // FillingFormsRoom: 1, //TODO: Restore when certs will be done EditingRoom: 2, - //ReviewRoom: 3, //TODO: Restore when certs will be done - //ReadOnlyRoom: 4, //TODO: Restore when certs will be done + // ReviewRoom: 3, //TODO: Restore when certs will be done + // ReadOnlyRoom: 4, //TODO: Restore when certs will be done CustomRoom: 5, }); From d9fa1c91d8e9ce1fdc77cc1c640095f1e9f4a0ce Mon Sep 17 00:00:00 2001 From: Mushka Nikita Date: Thu, 20 Apr 2023 11:47:46 +0300 Subject: [PATCH 2/5] fix crash --- packages/common/components/Tags/index.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/common/components/Tags/index.js b/packages/common/components/Tags/index.js index 3474a1396f..92013205de 100644 --- a/packages/common/components/Tags/index.js +++ b/packages/common/components/Tags/index.js @@ -20,11 +20,12 @@ const Tags = ({ id, className, style, tags, columnCount, onSelectTag }) => { if (tags.length === 1) { if (tags[0]?.isDefault || tags[0]?.isThirdParty) { const tag = { ...tags[0], maxWidth: `100%` }; - + newTags.push(tag); + } else if (tags[0].isThirdParty) { + const tag = { ...tags[0], maxWidth: `36px` }; newTags.push(tag); } else { - const tag = { label: tags[0], maxWidth: `100%` }; - + const tag = { label: tags[0].label || tags[0], maxWidth: `100%` }; newTags.push(tag); } @@ -50,7 +51,6 @@ const Tags = ({ id, className, style, tags, columnCount, onSelectTag }) => { for (let i = 0; i < tags.length; i++) { if (tags[i]?.isThirdParty) { const tag = { ...tags[i], maxWidth: `36px` }; - newTags.push(tag); } else if (tags[i].isDefault) { const tag = { ...tags[i], maxWidth: `${maxWidthPercent}%` }; @@ -58,7 +58,6 @@ const Tags = ({ id, className, style, tags, columnCount, onSelectTag }) => { newTags.push(tag); } else { const tag = { label: tags[i], maxWidth: `${maxWidthPercent}%` }; - newTags.push(tag); } } @@ -87,7 +86,6 @@ const Tags = ({ id, className, style, tags, columnCount, onSelectTag }) => { newTags.push(tag); } else { const tag = { label: tags[i], maxWidth: `${maxWidthPercent}%` }; - newTags.push(tag); } } From c590e5774fe46f9673a26f27209c0d9f9e1d48bf Mon Sep 17 00:00:00 2001 From: Mushka Nikita Date: Thu, 27 Apr 2023 15:06:55 +0300 Subject: [PATCH 3/5] fixed thirdpart tag update logic --- packages/common/components/Tags/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/common/components/Tags/index.js b/packages/common/components/Tags/index.js index 92013205de..203ed24532 100644 --- a/packages/common/components/Tags/index.js +++ b/packages/common/components/Tags/index.js @@ -14,11 +14,10 @@ const Tags = ({ id, className, style, tags, columnCount, onSelectTag }) => { if (!columnCount) return; const newTags = []; - const containerWidth = tagsRef.current.offsetWidth; if (tags.length === 1) { - if (tags[0]?.isDefault || tags[0]?.isThirdParty) { + if (tags[0]?.isDefault) { const tag = { ...tags[0], maxWidth: `100%` }; newTags.push(tag); } else if (tags[0].isThirdParty) { @@ -54,7 +53,6 @@ const Tags = ({ id, className, style, tags, columnCount, onSelectTag }) => { newTags.push(tag); } else if (tags[i].isDefault) { const tag = { ...tags[i], maxWidth: `${maxWidthPercent}%` }; - newTags.push(tag); } else { const tag = { label: tags[i], maxWidth: `${maxWidthPercent}%` }; From 359f77e4ca65ac395afe17da534d38f85e4d40a8 Mon Sep 17 00:00:00 2001 From: Mushka Nikita Date: Thu, 27 Apr 2023 15:54:18 +0300 Subject: [PATCH 4/5] removed unused todo comment --- .../dialogs/CreateEditRoomDialog/sub-components/SetRoomParams.js | 1 - 1 file changed, 1 deletion(-) 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 54be05c389..7f8278a701 100644 --- a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/SetRoomParams.js +++ b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/SetRoomParams.js @@ -117,7 +117,6 @@ const SetRoomParams = ({ /> )} */} - {/* //TODO: Uncomment when third-party storages will be stable */} {!isEdit && enableThirdParty && ( Date: Thu, 27 Apr 2023 15:55:31 +0300 Subject: [PATCH 5/5] added and returned optional chaining to some bool expressions in tags --- packages/common/components/Tags/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/common/components/Tags/index.js b/packages/common/components/Tags/index.js index 203ed24532..db4df98222 100644 --- a/packages/common/components/Tags/index.js +++ b/packages/common/components/Tags/index.js @@ -20,7 +20,7 @@ const Tags = ({ id, className, style, tags, columnCount, onSelectTag }) => { if (tags[0]?.isDefault) { const tag = { ...tags[0], maxWidth: `100%` }; newTags.push(tag); - } else if (tags[0].isThirdParty) { + } else if (tags[0]?.isThirdParty) { const tag = { ...tags[0], maxWidth: `36px` }; newTags.push(tag); } else { @@ -51,7 +51,7 @@ const Tags = ({ id, className, style, tags, columnCount, onSelectTag }) => { if (tags[i]?.isThirdParty) { const tag = { ...tags[i], maxWidth: `36px` }; newTags.push(tag); - } else if (tags[i].isDefault) { + } else if (tags[i]?.isDefault) { const tag = { ...tags[i], maxWidth: `${maxWidthPercent}%` }; newTags.push(tag); } else { @@ -76,11 +76,9 @@ const Tags = ({ id, className, style, tags, columnCount, onSelectTag }) => { for (let i = 0; i < columnCount; i++) { if (tags[i]?.isThirdParty) { const tag = { ...tags[i], maxWidth: `36px` }; - newTags.push(tag); } else if (tags[i]?.isDefault) { const tag = { ...tags[i], maxWidth: `${maxWidthPercent}%` }; - newTags.push(tag); } else { const tag = { label: tags[i], maxWidth: `${maxWidthPercent}%` };