From d92d72061c0570f1c2b17a837cdc84c36182751c Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 7 Aug 2024 12:46:30 +0300 Subject: [PATCH 1/7] Fixed Bug 69551 - Files.Info.History: Fixed "Documents" type in info panel --- packages/client/public/locales/en/InfoPanel.json | 1 + .../History/HistoryBlockContent/MainTextFolderInfo.tsx | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/client/public/locales/en/InfoPanel.json b/packages/client/public/locales/en/InfoPanel.json index 105dbdb5c1..f295708b17 100644 --- a/packages/client/public/locales/en/InfoPanel.json +++ b/packages/client/public/locales/en/InfoPanel.json @@ -12,6 +12,7 @@ "FeedLocationLabel": "Folder «{{folderTitle}}»", "FeedLocationLabelFrom": "from «{{folderTitle}}»", "FeedLocationRoomLabel": "Room «{{folderTitle}}»", + "FeedLocationSectionLabel": "Section «{{folderTitle}}»", "FileConverted": "File converted.", "FileCopied": "Files copied.", "FileCopiedTo": "Files copied to «{{folderTitle}}»", diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/History/HistoryBlockContent/MainTextFolderInfo.tsx b/packages/client/src/pages/Home/InfoPanel/Body/views/History/HistoryBlockContent/MainTextFolderInfo.tsx index 05a4f70a4d..2355bca26a 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/views/History/HistoryBlockContent/MainTextFolderInfo.tsx +++ b/packages/client/src/pages/Home/InfoPanel/Body/views/History/HistoryBlockContent/MainTextFolderInfo.tsx @@ -27,6 +27,7 @@ import { withTranslation } from "react-i18next"; import { inject, observer } from "mobx-react"; import { TTranslation } from "@docspace/shared/types"; +import { FolderType } from "@docspace/shared/enums"; import { StyledHistoryBlockMessage } from "../../../styles/history"; type HistoryMainTextFolderInfoProps = { @@ -54,12 +55,15 @@ const HistoryMainTextFolderInfo = ({ if (!parentTitle) return null; - const isFolder = parentType === 0; - const isFromFolder = fromParentType === 0; + const isSection = parentType === FolderType.USER; + const isFolder = parentType === FolderType.DEFAULT; + const isFromFolder = fromParentType === FolderType.DEFAULT; const destination = isFolder ? t("FeedLocationLabel", { folderTitle: parentTitle }) - : t("FeedLocationRoomLabel", { folderTitle: parentTitle }); + : isSection + ? t("FeedLocationSectionLabel", { folderTitle: parentTitle }) + : t("FeedLocationRoomLabel", { folderTitle: parentTitle }); const sourceDestination = isFromFolder ? t("FeedLocationLabelFrom", { folderTitle: fromParentTitle }) From 49d1cb06b2addeae008d5b707ec6a2562c28c434 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 7 Aug 2024 13:33:34 +0300 Subject: [PATCH 2/7] Editor: Components: FilePassword: Fixed component name --- packages/doceditor/src/components/file-password/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/doceditor/src/components/file-password/index.tsx b/packages/doceditor/src/components/file-password/index.tsx index 275ed417f2..08b8ecadbf 100644 --- a/packages/doceditor/src/components/file-password/index.tsx +++ b/packages/doceditor/src/components/file-password/index.tsx @@ -54,7 +54,7 @@ import { ValidationStatus, WhiteLabelLogoType } from "@docspace/shared/enums"; import { validatePublicRoomPassword } from "@docspace/shared/api/rooms"; import Image from "next/image"; -const FilesPassword = ({ shareKey, title, entryTitle }: FilePasswordProps) => { +const FilePassword = ({ shareKey, title, entryTitle }: FilePasswordProps) => { const { t } = useTranslation(["Common"]); const theme = useTheme(); @@ -210,4 +210,4 @@ const FilesPassword = ({ shareKey, title, entryTitle }: FilePasswordProps) => { ); }; -export default FilesPassword; +export default FilePassword; From d01eaafc4e98f0fa8bc3bfe064141efa84c072eb Mon Sep 17 00:00:00 2001 From: Akmal Isomadinov Date: Wed, 7 Aug 2024 16:07:36 +0500 Subject: [PATCH 3/7] Client:FilesStore Fixed PDF form context menu --- packages/client/src/store/FilesStore.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/client/src/store/FilesStore.js b/packages/client/src/store/FilesStore.js index 26bcf0e656..31fb6bc12c 100644 --- a/packages/client/src/store/FilesStore.js +++ b/packages/client/src/store/FilesStore.js @@ -2176,7 +2176,7 @@ class FilesStore { fileOptions = this.removeOptions(fileOptions, ["download"]); } - if (!isPdf || item.startFilling || item.isForm) { + if (!isPdf || (shouldFillForm && canFillForm)) { fileOptions = this.removeOptions(fileOptions, ["open-pdf"]); } @@ -3380,6 +3380,8 @@ class FilesStore { const isEditing = (item.fileStatus & FileStatus.IsEditing) === FileStatus.IsEditing; + console.log({ isEditing, status: item.fileStatus }); + const docUrl = !canOpenPlayer && !isFolder && this.getItemUrl(id, false, needConvert); From d4dd33f4534d58ee0cf5a4aea830f2adce16756d Mon Sep 17 00:00:00 2001 From: Elyor Djalilov Date: Wed, 7 Aug 2024 16:51:39 +0500 Subject: [PATCH 4/7] Web: Client: Profile. ActiveSessions: fixed styles --- .../src/components/dialogs/LogoutAllSessionDialog/index.js | 7 +++---- packages/client/src/store/SettingsSetupStore.js | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/client/src/components/dialogs/LogoutAllSessionDialog/index.js b/packages/client/src/components/dialogs/LogoutAllSessionDialog/index.js index 64186f2809..1b2245c8c2 100644 --- a/packages/client/src/components/dialogs/LogoutAllSessionDialog/index.js +++ b/packages/client/src/components/dialogs/LogoutAllSessionDialog/index.js @@ -56,10 +56,9 @@ const LogoutAllSessionDialog = ({ visible={visible} onClose={onClose} displayType="modal" + autoMaxHeight > - - {t("Profile:LogoutAllActiveConnections")} - + {t("Common:LogoutButton")} {t("Profile:LogoutDescription")} @@ -70,8 +69,8 @@ const LogoutAllSessionDialog = ({ className="change-password" isChecked={isChecked} onChange={onChangeCheckbox} + label={t("Profile:ChangePasswordAfterLoggingOut")} /> - {t("Profile:ChangePasswordAfterLoggingOut")} diff --git a/packages/client/src/store/SettingsSetupStore.js b/packages/client/src/store/SettingsSetupStore.js index c42fdce4da..cc8c06f14a 100644 --- a/packages/client/src/store/SettingsSetupStore.js +++ b/packages/client/src/store/SettingsSetupStore.js @@ -586,7 +586,6 @@ class SettingsSetupStore { }; getSessions = () => { - if (this.sessionsIsInit) return; this.getAllSessions().then((res) => { this.setSessions(res.items); this.currentSession = res.loginEvent; From 51361c66b587a1d18e7fe7f3e1397c9f54149902 Mon Sep 17 00:00:00 2001 From: Akmal Isomadinov Date: Wed, 7 Aug 2024 16:59:55 +0500 Subject: [PATCH 5/7] Client:Badge Fixed bug 69558 --- packages/client/src/components/Badges.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/components/Badges.js b/packages/client/src/components/Badges.js index ed867031fe..506d6396bd 100644 --- a/packages/client/src/components/Badges.js +++ b/packages/client/src/components/Badges.js @@ -254,7 +254,7 @@ const Badges = ({ )} - {isEditing && !isVisitor && !(isRecentTab && !canEditing) && ( + {isEditing && !(isRecentTab && !canEditing) && ( Date: Wed, 7 Aug 2024 15:10:54 +0300 Subject: [PATCH 6/7] Fixed Bug 69580 - Rooms: Embed: Infinite loader inside embedded file with password --- packages/doceditor/src/components/file-password/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/doceditor/src/components/file-password/index.tsx b/packages/doceditor/src/components/file-password/index.tsx index 08b8ecadbf..78cf52078e 100644 --- a/packages/doceditor/src/components/file-password/index.tsx +++ b/packages/doceditor/src/components/file-password/index.tsx @@ -26,7 +26,7 @@ "use client"; -import React, { useState } from "react"; +import React, { useState, useEffect } from "react"; import { Trans, useTranslation } from "react-i18next"; import { Text } from "@docspace/shared/components/text"; @@ -49,6 +49,7 @@ import { toastr } from "@docspace/shared/components/toast"; import { TData } from "@docspace/shared/components/toast/Toast.type"; import { getLogoUrl } from "@docspace/shared/utils"; +import { frameCallCommand } from "@docspace/shared/utils/common"; import { useTheme } from "styled-components"; import { ValidationStatus, WhiteLabelLogoType } from "@docspace/shared/enums"; import { validatePublicRoomPassword } from "@docspace/shared/api/rooms"; @@ -64,6 +65,8 @@ const FilePassword = ({ shareKey, title, entryTitle }: FilePasswordProps) => { const [isLoading, setIsLoading] = useState(false); const [errorMessage, setErrorMessage] = useState(""); + useEffect(() => frameCallCommand("setIsLoaded"), []); + const onChangePassword = (e: React.ChangeEvent) => { setPassword(e.target.value); !passwordValid && setPasswordValid(true); From a04c2d6c4c9c5f79383fca10f08bf7104b3ea3c3 Mon Sep 17 00:00:00 2001 From: Akmal Isomadinov Date: Wed, 7 Aug 2024 17:25:15 +0500 Subject: [PATCH 7/7] Removed logger --- packages/client/src/store/FilesStore.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/client/src/store/FilesStore.js b/packages/client/src/store/FilesStore.js index 31fb6bc12c..0337a222ef 100644 --- a/packages/client/src/store/FilesStore.js +++ b/packages/client/src/store/FilesStore.js @@ -3380,8 +3380,6 @@ class FilesStore { const isEditing = (item.fileStatus & FileStatus.IsEditing) === FileStatus.IsEditing; - console.log({ isEditing, status: item.fileStatus }); - const docUrl = !canOpenPlayer && !isFolder && this.getItemUrl(id, false, needConvert);