From 9de4f057ad86275dd8b8986a1ce9d5285f8eccda Mon Sep 17 00:00:00 2001 From: Elyor Djalilov Date: Mon, 6 May 2024 17:31:06 +0500 Subject: [PATCH] fix bad merge --- packages/client/src/HOCs/withPeopleContent.js | 16 +- .../src/components/FilesPanels/index.js | 2 + .../dialogs/LogoutAllSessionDialog/index.js | 51 +++- .../UserSessionsPanel/AllSessionsBlock.js | 4 +- .../UserSessionsPanel/LastSessionBlock.js | 2 +- .../panels/UserSessionsPanel/UserInfoBlock.js | 4 +- .../RowView/SessionsRowContent.js | 4 +- .../Layout/Section/Header/index.js | 267 ++++++++++++++---- .../RowView/SessionsRowContent.js | 6 +- .../TableView/SessionsTableRow.js | 32 +-- packages/client/src/store/DialogsStore.js | 7 +- .../client/src/store/SelectionPeopleStore.js | 33 ++- .../client/src/store/SettingsSetupStore.js | 7 + 13 files changed, 310 insertions(+), 125 deletions(-) diff --git a/packages/client/src/HOCs/withPeopleContent.js b/packages/client/src/HOCs/withPeopleContent.js index a21085e433..333c72bb86 100644 --- a/packages/client/src/HOCs/withPeopleContent.js +++ b/packages/client/src/HOCs/withPeopleContent.js @@ -67,14 +67,14 @@ export default function withContent(WrappedContent) { const onContentRowClick = (e, user) => { if ( e.target?.tagName === "A" || - e.target.closest(".checkbox") || - e.target.closest(".table-container_row-checkbox") || - e.target.closest(".type-combobox") || - e.target.closest(".groups-combobox") || - e.target.closest(".paid-badge") || - e.target.closest(".pending-badge") || - e.target.closest(".disabled-badge") || - e.target.closest(".dropdown-container") || + e.target?.closest(".checkbox") || + e.target?.closest(".table-container_row-checkbox") || + e.target?.closest(".type-combobox") || + e.target?.closest(".groups-combobox") || + e.target?.closest(".paid-badge") || + e.target?.closest(".pending-badge") || + e.target?.closest(".disabled-badge") || + e.target?.closest(".dropdown-container") || e.detail === 0 ) { return; diff --git a/packages/client/src/components/FilesPanels/index.js b/packages/client/src/components/FilesPanels/index.js index 2ad91a4e88..f79f6b5590 100644 --- a/packages/client/src/components/FilesPanels/index.js +++ b/packages/client/src/components/FilesPanels/index.js @@ -317,6 +317,8 @@ const Panels = (props) => { /> ), pdfFormEditVisible && , + + userSessionsPanelVisible && , ]; }; diff --git a/packages/client/src/components/dialogs/LogoutAllSessionDialog/index.js b/packages/client/src/components/dialogs/LogoutAllSessionDialog/index.js index 64186f2809..904e3ec131 100644 --- a/packages/client/src/components/dialogs/LogoutAllSessionDialog/index.js +++ b/packages/client/src/components/dialogs/LogoutAllSessionDialog/index.js @@ -25,21 +25,23 @@ // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode import { useState } from "react"; +import { inject, observer } from "mobx-react"; import { ModalDialog } from "@docspace/shared/components/modal-dialog"; import { Checkbox } from "@docspace/shared/components/checkbox"; import { Button } from "@docspace/shared/components/button"; -import { Box } from "@docspace/shared/components/box"; import { Text } from "@docspace/shared/components/text"; import ModalDialogContainer from "../ModalDialogContainer"; const LogoutAllSessionDialog = ({ t, + data, visible, - onClose, isLoading, + onClose, onRemoveAllSessions, onRemoveAllExceptThis, + isSeveralSelection, }) => { const [isChecked, setIsChecked] = useState(false); @@ -51,6 +53,29 @@ const LogoutAllSessionDialog = ({ isChecked ? onRemoveAllSessions() : onRemoveAllExceptThis(); }; + const isProfile = location.pathname.includes("/profile"); + + const bodySubtitle = + isSeveralSelection || isProfile + ? t("Profile:LogoutDescription") + : t("Profile:LogoutCurrentUserDescription", { + displayName: data?.displayName, + }); + + const bodyText = !isSeveralSelection && ( + <> + + {t("Profile:DescriptionForSecurity")} + + + + ); + return ( - {t("Profile:LogoutDescription")} - - {t("Profile:DescriptionForSecurity")} - - - - {t("Profile:ChangePasswordAfterLoggingOut")} - + {bodySubtitle} + {bodyText}