From 078bb238fddf8da4d177a8e54e5465032dac4620 Mon Sep 17 00:00:00 2001 From: Vladislav Makhov Date: Mon, 9 Nov 2020 16:15:36 +0300 Subject: [PATCH] Add url to store --- .../categories/integration/thirdPartyServicesSettings.js | 9 +++++++-- web/ASC.Web.Common/src/store/auth/reducer.js | 2 ++ web/ASC.Web.Common/src/store/auth/selectors.js | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/web/ASC.Web.Client/src/components/pages/Settings/categories/integration/thirdPartyServicesSettings.js b/web/ASC.Web.Client/src/components/pages/Settings/categories/integration/thirdPartyServicesSettings.js index 24196c010c..00cbe092ff 100644 --- a/web/ASC.Web.Client/src/components/pages/Settings/categories/integration/thirdPartyServicesSettings.js +++ b/web/ASC.Web.Client/src/components/pages/Settings/categories/integration/thirdPartyServicesSettings.js @@ -12,9 +12,12 @@ import styled from "styled-components"; import { Box, Text, Link, toastr } from "asc-web-components"; import { utils } from "asc-web-components"; +import { store as commonStore } from "asc-web-common"; import ConsumerItem from "./sub-components/consumerItem"; import ConsumerModalDialog from "./sub-components/consumerModalDialog"; +const { getUrlAuthKeys } = commonStore.auth.selectors; + const tablet = utils.device.tablet; const mobile = utils.device.mobile; @@ -125,7 +128,7 @@ class ThirdPartyServices extends React.Component { }; render() { - const { t, i18n, consumers, updateConsumerProps } = this.props; + const { t, i18n, consumers, updateConsumerProps, urlAuthKeys } = this.props; const { dialogVisible, isLoading } = this.state; const { onModalClose, onModalOpen, setConsumer, onChangeLoading } = this; @@ -143,7 +146,7 @@ class ThirdPartyServices extends React.Component { color="#316DAA" isHovered={false} target="_blank" - href="https://helpcenter.onlyoffice.com/ru/server/windows/community/authorization-keys.aspx" + href={urlAuthKeys} > {t("LearnMore")} @@ -200,6 +203,7 @@ ThirdPartyServices.propTypes = { t: PropTypes.func.isRequired, i18n: PropTypes.object.isRequired, consumers: PropTypes.arrayOf(PropTypes.object).isRequired, + urlAuthKeys: PropTypes.string, getConsumers: PropTypes.func.isRequired, updateConsumerProps: PropTypes.func.isRequired, setSelectedConsumer: PropTypes.func.isRequired, @@ -208,6 +212,7 @@ ThirdPartyServices.propTypes = { const mapStateToProps = (state) => { return { consumers: getConsumersList(state), + urlAuthKeys: getUrlAuthKeys(state), }; }; diff --git a/web/ASC.Web.Common/src/store/auth/reducer.js b/web/ASC.Web.Common/src/store/auth/reducer.js index ef05a6c1ce..123cdb36c9 100644 --- a/web/ASC.Web.Common/src/store/auth/reducer.js +++ b/web/ASC.Web.Common/src/store/auth/reducer.js @@ -48,6 +48,8 @@ const initialState = { enableAdmMess: false, urlLicense: "https://gnu.org/licenses/gpl-3.0.html", urlSupport: "http://support.onlyoffice.com/", + urlAuthKeys: + "https://helpcenter.onlyoffice.com/installation/groups-authorization-keys.aspx", customNames: { id: "Common", userCaption: "User", diff --git a/web/ASC.Web.Common/src/store/auth/selectors.js b/web/ASC.Web.Common/src/store/auth/selectors.js index c49a87aa15..1c85841c21 100644 --- a/web/ASC.Web.Common/src/store/auth/selectors.js +++ b/web/ASC.Web.Common/src/store/auth/selectors.js @@ -192,3 +192,5 @@ export const getOrganizationName = createSelector([getSettings], (settings) => { }); export const getUrlSupport = (state) => state.auth.settings.urlSupport; + +export const getUrlAuthKeys = (state) => state.auth.settings.urlAuthKeys;