From 2d7214334f6ca8d7d8798b59dcdf5bf12ef9dca0 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Mon, 12 Apr 2021 19:11:09 +0300 Subject: [PATCH 001/229] Web: People: added login settings --- .../src/pages/Profile/Section/Body/index.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/products/ASC.People/Client/src/pages/Profile/Section/Body/index.js b/products/ASC.People/Client/src/pages/Profile/Section/Body/index.js index 0e6eff2461..1e8fb931aa 100644 --- a/products/ASC.People/Client/src/pages/Profile/Section/Body/index.js +++ b/products/ASC.People/Client/src/pages/Profile/Section/Body/index.js @@ -59,6 +59,13 @@ const ContactWrapper = styled.div` } `; +const LinkActionWrapper = styled.div` + margin-top: 17px; + .link-action { + margin-right: 5px; + } +`; + const createContacts = (contacts) => { const styledContacts = contacts.map((contact, index) => { let url = null; @@ -175,6 +182,22 @@ class SectionBodyContent extends React.PureComponent { )} + {isSelf && ( + + + {t("TwoFactorDescription")} + + + {t("ResetApplication")} + + + {t("ShowBackupCodes")} + + + + + )} + {profile.notes && ( From 47b0046b2e0f8eb7f45fad23e3c1c7a20c1f5eba Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Mon, 12 Apr 2021 19:11:25 +0300 Subject: [PATCH 002/229] Web: People: added translates --- products/ASC.People/Client/public/locales/en/Profile.json | 6 +++++- products/ASC.People/Client/public/locales/ru/Profile.json | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/products/ASC.People/Client/public/locales/en/Profile.json b/products/ASC.People/Client/public/locales/en/Profile.json index 3a1e5e7655..50b167b342 100644 --- a/products/ASC.People/Client/public/locales/en/Profile.json +++ b/products/ASC.People/Client/public/locales/en/Profile.json @@ -48,5 +48,9 @@ "selectNewPhotoLabel": "Select new photo", "orDropFileHereLabel": "or drop file here", "maxSizeFileError": "Maximum file size exceeded", - "editAvatar": "Edit" + "editAvatar": "Edit", + "LoginSettings": "Login settings", + "TwoFactorDescription": "Two-factor authentication via code generating application was enabled for all users by cloud service administrator.", + "ResetApplication": "Reset application", + "ShowBackupCodes": "Show backup codes" } diff --git a/products/ASC.People/Client/public/locales/ru/Profile.json b/products/ASC.People/Client/public/locales/ru/Profile.json index e21b97e9a3..89dee6fc90 100644 --- a/products/ASC.People/Client/public/locales/ru/Profile.json +++ b/products/ASC.People/Client/public/locales/ru/Profile.json @@ -48,5 +48,9 @@ "selectNewPhotoLabel": "Выбрать новое фото", "orDropFileHereLabel": "или перетащите файл сюда", "maxSizeFileError": "Превышен максимальный размер файла", - "editAvatar": "Изменить" + "editAvatar": "Изменить", + "LoginSettings": "Настройки входа", + "TwoFactorDescription": "Двухфакторная аутентификация через приложение для генерации кодов включена для всех пользователей администратором облачного сервиса.", + "ResetApplication": "Сбросить приложение", + "ShowBackupCodes": "Показать резервные коды" } From 800b85f5c8934923cd404a55fb3c00b6e3c2fd16 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Mon, 12 Apr 2021 23:33:41 +0300 Subject: [PATCH 003/229] Web: People: strong text --- .../Client/public/locales/en/Profile.json | 2 +- .../Client/public/locales/ru/Profile.json | 2 +- .../Client/src/pages/Profile/Section/Body/index.js | 13 ++++++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/products/ASC.People/Client/public/locales/en/Profile.json b/products/ASC.People/Client/public/locales/en/Profile.json index 50b167b342..dbf69102eb 100644 --- a/products/ASC.People/Client/public/locales/en/Profile.json +++ b/products/ASC.People/Client/public/locales/en/Profile.json @@ -50,7 +50,7 @@ "maxSizeFileError": "Maximum file size exceeded", "editAvatar": "Edit", "LoginSettings": "Login settings", - "TwoFactorDescription": "Two-factor authentication via code generating application was enabled for all users by cloud service administrator.", + "TwoFactorDescription": "Two-factor authentication via code generating application was enabled for all users by cloud service administrator.", "ResetApplication": "Reset application", "ShowBackupCodes": "Show backup codes" } diff --git a/products/ASC.People/Client/public/locales/ru/Profile.json b/products/ASC.People/Client/public/locales/ru/Profile.json index 89dee6fc90..8cdec10391 100644 --- a/products/ASC.People/Client/public/locales/ru/Profile.json +++ b/products/ASC.People/Client/public/locales/ru/Profile.json @@ -50,7 +50,7 @@ "maxSizeFileError": "Превышен максимальный размер файла", "editAvatar": "Изменить", "LoginSettings": "Настройки входа", - "TwoFactorDescription": "Двухфакторная аутентификация через приложение для генерации кодов включена для всех пользователей администратором облачного сервиса.", + "TwoFactorDescription": "Двухфакторная аутентификация через приложение для генерации кодов включена для всех пользователей администратором облачного сервиса.", "ResetApplication": "Сбросить приложение", "ShowBackupCodes": "Показать резервные коды" } diff --git a/products/ASC.People/Client/src/pages/Profile/Section/Body/index.js b/products/ASC.People/Client/src/pages/Profile/Section/Body/index.js index 1e8fb931aa..d11a6ec40e 100644 --- a/products/ASC.People/Client/src/pages/Profile/Section/Body/index.js +++ b/products/ASC.People/Client/src/pages/Profile/Section/Body/index.js @@ -18,6 +18,7 @@ import { } from "../../../../helpers/people-helpers"; import config from "../../../../../package.json"; import { AppServerConfig } from "@appserver/common/constants"; +import { Trans, useTranslation } from "react-i18next"; const ProfileWrapper = styled.div` display: flex; @@ -185,12 +186,18 @@ class SectionBodyContent extends React.PureComponent { {isSelf && ( - {t("TwoFactorDescription")} + + + Two-factor authentication via code generating + application was enabled for all users by cloud service + administrator. + + - + {t("ResetApplication")} - + {t("ShowBackupCodes")} From ee7152816e1610f7461bd277e6e5a14812056f39 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Tue, 13 Apr 2021 00:02:06 +0300 Subject: [PATCH 004/229] Web: People: created reset application dialog --- .../locales/en/ResetApplicationDialog.json | 6 ++ .../locales/ru/ResetApplicationDialog.json | 6 ++ .../dialogs/ResetApplicationDialog/index.js | 58 +++++++++++++++++++ .../Client/src/components/dialogs/index.js | 2 + 4 files changed, 72 insertions(+) create mode 100644 products/ASC.People/Client/public/locales/en/ResetApplicationDialog.json create mode 100644 products/ASC.People/Client/public/locales/ru/ResetApplicationDialog.json create mode 100644 products/ASC.People/Client/src/components/dialogs/ResetApplicationDialog/index.js diff --git a/products/ASC.People/Client/public/locales/en/ResetApplicationDialog.json b/products/ASC.People/Client/public/locales/en/ResetApplicationDialog.json new file mode 100644 index 0000000000..b7e9c5ec08 --- /dev/null +++ b/products/ASC.People/Client/public/locales/en/ResetApplicationDialog.json @@ -0,0 +1,6 @@ +{ + "ResetApplicationTitle": "Reset application configuration", + "ResetApplicationDescription": "Authenticator application configuration will be reset.", + "ResetButton": "Reset application", + "CloseButton": "Close" +} diff --git a/products/ASC.People/Client/public/locales/ru/ResetApplicationDialog.json b/products/ASC.People/Client/public/locales/ru/ResetApplicationDialog.json new file mode 100644 index 0000000000..8aa33a7951 --- /dev/null +++ b/products/ASC.People/Client/public/locales/ru/ResetApplicationDialog.json @@ -0,0 +1,6 @@ +{ + "ResetApplicationTitle": "Сбросить настройки приложения", + "ResetApplicationDescription": " Настройки приложения для аутентификации будут сброшены.", + "ResetButton": "Сбросить приложение", + "CloseButton": "Закрыть" +} diff --git a/products/ASC.People/Client/src/components/dialogs/ResetApplicationDialog/index.js b/products/ASC.People/Client/src/components/dialogs/ResetApplicationDialog/index.js new file mode 100644 index 0000000000..7ad840724f --- /dev/null +++ b/products/ASC.People/Client/src/components/dialogs/ResetApplicationDialog/index.js @@ -0,0 +1,58 @@ +import React from "react"; +import PropTypes from "prop-types"; +import ModalDialog from "@appserver/components/modal-dialog"; +import Button from "@appserver/components/button"; +import Text from "@appserver/components/text"; +import { withTranslation } from "react-i18next"; +import ModalDialogContainer from "../ModalDialogContainer"; + +class ResetApplicationDialogComponent extends React.Component { + constructor(props) { + super(props); + } + + render() { + console.log("Render ResetApplicationDialog"); + const { t, visible, onClose } = this.props; + + return ( + + + {t("ResetApplicationTitle")} + + + {t("ResetApplicationDescription")} + + + +