From 4c814ae6222445a2856cbc3c1b07715c6d3c0faf Mon Sep 17 00:00:00 2001 From: gopienkonikita Date: Fri, 9 Aug 2024 17:20:27 +0300 Subject: [PATCH 1/5] Web: Files: SimulatePassword: fixed crash --- packages/client/src/components/SimulatePassword/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/components/SimulatePassword/index.js b/packages/client/src/components/SimulatePassword/index.js index 395e497177..e8ded4a622 100644 --- a/packages/client/src/components/SimulatePassword/index.js +++ b/packages/client/src/components/SimulatePassword/index.js @@ -145,7 +145,7 @@ const SimulatePassword = memo( }, [isDisabled]); useEffect(() => { - setPassword(inputValue); + if (inputValue) setPassword(inputValue); }, [inputValue]); return ( From 656e7dd2801928e3522cbc956a754b20ce63890c Mon Sep 17 00:00:00 2001 From: gopienkonikita Date: Fri, 9 Aug 2024 17:33:00 +0300 Subject: [PATCH 2/5] Web: Files: InfoPanel: fixed public icon --- .../Body/sub-components/ItemTitle/Rooms/index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/Rooms/index.js b/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/Rooms/index.js index 6302ffb2b0..d96f23599d 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/Rooms/index.js +++ b/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/Rooms/index.js @@ -52,7 +52,7 @@ const RoomsItemHeader = ({ setSelection, setBufferSelection, isArchive, - hasLinks, + isShared, showSearchBlock, setShowSearchBlock, roomType, @@ -70,7 +70,7 @@ const RoomsItemHeader = ({ (selection.roomType === RoomsType.PublicRoom || selection.roomType === RoomsType.FormRoom || selection.roomType === RoomsType.CustomRoom) && - hasLinks; + isShared; const badgeUrl = showPlanetIcon ? Planet12ReactSvgUrl : null; const isRoomMembersPanel = selection?.isRoom && roomsView === "info_members"; @@ -161,7 +161,6 @@ export default inject( selectedFolderStore, filesStore, infoPanelStore, - publicRoomStore, }) => { const { infoPanelSelection, @@ -170,7 +169,6 @@ export default inject( showSearchBlock, setShowSearchBlock, } = infoPanelStore; - const { externalLinks } = publicRoomStore; const selection = infoPanelSelection.length > 1 ? null : infoPanelSelection; const isArchive = selection?.rootFolderType === FolderType.Archive; @@ -196,7 +194,7 @@ export default inject( setSelection: filesStore.setSelection, setBufferSelection: filesStore.setBufferSelection, isArchive, - hasLinks: externalLinks.length, + isShared: selection?.shared, roomType, }; }, From 21d08cc69194017cb8c4dcdecbbbbdda17b3fcb9 Mon Sep 17 00:00:00 2001 From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com> Date: Fri, 9 Aug 2024 17:41:52 +0300 Subject: [PATCH 3/5] Fixed Bug 69577: Srv: Branding. Blank page for "Feedback & Support" when "Show link to Help Center" is disabled --- .../common/Branding/additionalResources.js | 12 +++++++----- packages/shared/api/settings/index.ts | 10 ++-------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/packages/client/src/pages/PortalSettings/categories/common/Branding/additionalResources.js b/packages/client/src/pages/PortalSettings/categories/common/Branding/additionalResources.js index 3bf68280bf..f7d3cd0e19 100644 --- a/packages/client/src/pages/PortalSettings/categories/common/Branding/additionalResources.js +++ b/packages/client/src/pages/PortalSettings/categories/common/Branding/additionalResources.js @@ -187,12 +187,14 @@ const AdditionalResources = (props) => { const onSave = useCallback(async () => { setIsLoading(true); + const settings = JSON.parse(JSON.stringify(additionalResourcesData)); + + settings.feedbackAndSupportEnabled = feedbackAndSupportEnabled; + settings.videoGuidesEnabled = videoGuidesEnabled; + settings.helpCenterEnabled = helpCenterEnabled; + await api.settings - .setAdditionalResources( - feedbackAndSupportEnabled, - videoGuidesEnabled, - helpCenterEnabled, - ) + .setAdditionalResources(settings) .then(() => { toastr.success(t("Settings:SuccessfullySaveSettingsMessage")); }) diff --git a/packages/shared/api/settings/index.ts b/packages/shared/api/settings/index.ts index 8f3b5919ba..395c38dbad 100644 --- a/packages/shared/api/settings/index.ts +++ b/packages/shared/api/settings/index.ts @@ -407,16 +407,10 @@ export async function getCustomSchemaList() { } export function setAdditionalResources( - feedbackAndSupportEnabled, - videoGuidesEnabled, - helpCenterEnabled, + additionalResources: TAdditionalResources, ) { const data = { - settings: { - helpCenterEnabled, - feedbackAndSupportEnabled, - videoGuidesEnabled, - }, + settings: additionalResources, }; return request({ From 4ea0f130b3462c03777314d44c153b1414ce1a17 Mon Sep 17 00:00:00 2001 From: gopienkonikita Date: Fri, 9 Aug 2024 17:54:50 +0300 Subject: [PATCH 4/5] Fix Bug 69656 - Rooms.AsNew.Media. Fixed opening of media files --- .../components/panels/NewFilesPanel/index.js | 47 +++---------------- 1 file changed, 6 insertions(+), 41 deletions(-) diff --git a/packages/client/src/components/panels/NewFilesPanel/index.js b/packages/client/src/components/panels/NewFilesPanel/index.js index 26965d6bbf..2a65bf707e 100644 --- a/packages/client/src/components/panels/NewFilesPanel/index.js +++ b/packages/client/src/components/panels/NewFilesPanel/index.js @@ -52,6 +52,7 @@ import { StyledNewFilesBody, StyledLink } from "../StyledPanels"; import withLoader from "../../../HOCs/withLoader"; import config from "PACKAGE_FILE"; +import { MEDIA_VIEW_URL } from "@docspace/shared/constants"; const NewFilesPanel = (props) => { const { @@ -60,8 +61,6 @@ const NewFilesPanel = (props) => { getFolderIcon, newFiles, markAsRead, - setMediaViewerData, - currentFolderId, setIsLoading, t, visible, @@ -203,40 +202,10 @@ const NewFilesPanel = (props) => { } if (isMedia) { - if (currentFolderId !== item.folderId) { - const categoryType = getCategoryTypeByFolderType( - rootFolderType, - item.folderId, - ); - - const state = { - title: "", - rootFolderType, - - isRoot: false, - }; - setIsLoading(true); - - const url = getCategoryUrl(categoryType, item.folderId); - - const filter = FilesFilter.getDefault(); - filter.folder = item.folderId; - - window.DocSpace.navigate(`${url}?${filter.toUrlParams()}`, { state }); - - const mediaItem = { visible: true, id }; - setMediaViewerData(mediaItem); - - setInProgress(false); - onClose(); - } else { - const mediaItem = { visible: true, id }; - setMediaViewerData(mediaItem); - - return onClose(); - } - - return; + return window.open( + combineUrl(MEDIA_VIEW_URL, id), + openOnNewPage ? "_blank" : "_self", + ); } if (fileItemsList && enablePlugins) { @@ -335,7 +304,6 @@ export default inject( filesStore, mediaViewerDataStore, filesActionsStore, - selectedFolderStore, dialogsStore, filesSettingsStore, clientLoadingStore, @@ -349,10 +317,9 @@ export default inject( setIsSectionFilterLoading(param); }; - const { setMediaViewerData, setCurrentItem } = mediaViewerDataStore; + const { setCurrentItem } = mediaViewerDataStore; const { getIcon, getFolderIcon, openOnNewPage } = filesSettingsStore; const { markAsRead } = filesActionsStore; - const { id: currentFolderId } = selectedFolderStore; const { setNewFilesPanelVisible, @@ -371,8 +338,6 @@ export default inject( newFilesIds, isLoading, setCurrentItem, - currentFolderId, - setMediaViewerData, getIcon, getFolderIcon, markAsRead, From d61e5aaa8b69709ef847f6f1358d960a26141357 Mon Sep 17 00:00:00 2001 From: gopienkonikita Date: Sat, 10 Aug 2024 09:02:49 +0300 Subject: [PATCH 5/5] Web: Files: SimulatePassword: fix --- packages/client/src/components/SimulatePassword/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/SimulatePassword/index.js b/packages/client/src/components/SimulatePassword/index.js index e8ded4a622..8529c30515 100644 --- a/packages/client/src/components/SimulatePassword/index.js +++ b/packages/client/src/components/SimulatePassword/index.js @@ -145,7 +145,9 @@ const SimulatePassword = memo( }, [isDisabled]); useEffect(() => { - if (inputValue) setPassword(inputValue); + if (inputValue !== undefined) { + setPassword(inputValue); + } }, [inputValue]); return (