Add url to store
This commit is contained in:
parent
7c6d5a9e54
commit
078bb238fd
@ -12,9 +12,12 @@ import styled from "styled-components";
|
|||||||
|
|
||||||
import { Box, Text, Link, toastr } from "asc-web-components";
|
import { Box, Text, Link, toastr } from "asc-web-components";
|
||||||
import { utils } 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 ConsumerItem from "./sub-components/consumerItem";
|
||||||
import ConsumerModalDialog from "./sub-components/consumerModalDialog";
|
import ConsumerModalDialog from "./sub-components/consumerModalDialog";
|
||||||
|
|
||||||
|
const { getUrlAuthKeys } = commonStore.auth.selectors;
|
||||||
|
|
||||||
const tablet = utils.device.tablet;
|
const tablet = utils.device.tablet;
|
||||||
const mobile = utils.device.mobile;
|
const mobile = utils.device.mobile;
|
||||||
|
|
||||||
@ -125,7 +128,7 @@ class ThirdPartyServices extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { t, i18n, consumers, updateConsumerProps } = this.props;
|
const { t, i18n, consumers, updateConsumerProps, urlAuthKeys } = this.props;
|
||||||
const { dialogVisible, isLoading } = this.state;
|
const { dialogVisible, isLoading } = this.state;
|
||||||
const { onModalClose, onModalOpen, setConsumer, onChangeLoading } = this;
|
const { onModalClose, onModalOpen, setConsumer, onChangeLoading } = this;
|
||||||
|
|
||||||
@ -143,7 +146,7 @@ class ThirdPartyServices extends React.Component {
|
|||||||
color="#316DAA"
|
color="#316DAA"
|
||||||
isHovered={false}
|
isHovered={false}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://helpcenter.onlyoffice.com/ru/server/windows/community/authorization-keys.aspx"
|
href={urlAuthKeys}
|
||||||
>
|
>
|
||||||
{t("LearnMore")}
|
{t("LearnMore")}
|
||||||
</Link>
|
</Link>
|
||||||
@ -200,6 +203,7 @@ ThirdPartyServices.propTypes = {
|
|||||||
t: PropTypes.func.isRequired,
|
t: PropTypes.func.isRequired,
|
||||||
i18n: PropTypes.object.isRequired,
|
i18n: PropTypes.object.isRequired,
|
||||||
consumers: PropTypes.arrayOf(PropTypes.object).isRequired,
|
consumers: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
|
urlAuthKeys: PropTypes.string,
|
||||||
getConsumers: PropTypes.func.isRequired,
|
getConsumers: PropTypes.func.isRequired,
|
||||||
updateConsumerProps: PropTypes.func.isRequired,
|
updateConsumerProps: PropTypes.func.isRequired,
|
||||||
setSelectedConsumer: PropTypes.func.isRequired,
|
setSelectedConsumer: PropTypes.func.isRequired,
|
||||||
@ -208,6 +212,7 @@ ThirdPartyServices.propTypes = {
|
|||||||
const mapStateToProps = (state) => {
|
const mapStateToProps = (state) => {
|
||||||
return {
|
return {
|
||||||
consumers: getConsumersList(state),
|
consumers: getConsumersList(state),
|
||||||
|
urlAuthKeys: getUrlAuthKeys(state),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -48,6 +48,8 @@ const initialState = {
|
|||||||
enableAdmMess: false,
|
enableAdmMess: false,
|
||||||
urlLicense: "https://gnu.org/licenses/gpl-3.0.html",
|
urlLicense: "https://gnu.org/licenses/gpl-3.0.html",
|
||||||
urlSupport: "http://support.onlyoffice.com/",
|
urlSupport: "http://support.onlyoffice.com/",
|
||||||
|
urlAuthKeys:
|
||||||
|
"https://helpcenter.onlyoffice.com/installation/groups-authorization-keys.aspx",
|
||||||
customNames: {
|
customNames: {
|
||||||
id: "Common",
|
id: "Common",
|
||||||
userCaption: "User",
|
userCaption: "User",
|
||||||
|
@ -192,3 +192,5 @@ export const getOrganizationName = createSelector([getSettings], (settings) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const getUrlSupport = (state) => state.auth.settings.urlSupport;
|
export const getUrlSupport = (state) => state.auth.settings.urlSupport;
|
||||||
|
|
||||||
|
export const getUrlAuthKeys = (state) => state.auth.settings.urlAuthKeys;
|
||||||
|
Loading…
Reference in New Issue
Block a user