|
|
@@ -1,16 +1,14 @@
|
|
|
-/* eslint-disable react/no-danger */
|
|
|
import React from 'react';
|
|
|
|
|
|
-import PropTypes from 'prop-types';
|
|
|
+import { pathUtils } from '@growi/core';
|
|
|
import { useTranslation } from 'next-i18next';
|
|
|
-
|
|
|
+import PropTypes from 'prop-types';
|
|
|
import urljoin from 'url-join';
|
|
|
-import { pathUtils } from '@growi/core';
|
|
|
-import { useSiteUrl } from '~/stores/context';
|
|
|
|
|
|
import AdminGeneralSecurityContainer from '~/client/services/AdminGeneralSecurityContainer';
|
|
|
import AdminGoogleSecurityContainer from '~/client/services/AdminGoogleSecurityContainer';
|
|
|
import { toastSuccess, toastError } from '~/client/util/apiNotification';
|
|
|
+import { useSiteUrl } from '~/stores/context';
|
|
|
|
|
|
import { withUnstatedContainers } from '../../UnstatedUtils';
|
|
|
|
|
|
@@ -36,9 +34,11 @@ class GoogleSecurityManagementContents extends React.Component {
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
- const { t, adminGeneralSecurityContainer, adminGoogleSecurityContainer, siteUrl } = this.props;
|
|
|
+ const {
|
|
|
+ t, adminGeneralSecurityContainer, adminGoogleSecurityContainer, siteUrl,
|
|
|
+ } = this.props;
|
|
|
const { isGoogleEnabled } = adminGeneralSecurityContainer.state;
|
|
|
- const googleCallbackUrl = urljoin(pathUtils.removeTrailingSlash(siteUrl), '/passport/google/callback')
|
|
|
+ const googleCallbackUrl = urljoin(pathUtils.removeTrailingSlash(siteUrl), '/passport/google/callback');
|
|
|
|
|
|
return (
|
|
|
|
|
|
@@ -183,7 +183,7 @@ class GoogleSecurityManagementContents extends React.Component {
|
|
|
<li dangerouslySetInnerHTML={{ __html: t('security_setting.OAuth.Google.register_1', { link: '<a href="https://console.cloud.google.com/apis/credentials" target=_blank>Google Cloud Platform API Manager</a>' }) }} />
|
|
|
<li dangerouslySetInnerHTML={{ __html: t('security_setting.OAuth.Google.register_2') }} />
|
|
|
<li dangerouslySetInnerHTML={{ __html: t('security_setting.OAuth.Google.register_3') }} />
|
|
|
- <li dangerouslySetInnerHTML={{ __html: t('security_setting.OAuth.Google.register_4', { url: googleCallbackUrl}) }} />
|
|
|
+ <li dangerouslySetInnerHTML={{ __html: t('security_setting.OAuth.Google.register_4', { url: googleCallbackUrl }) }} />
|
|
|
<li dangerouslySetInnerHTML={{ __html: t('security_setting.OAuth.Google.register_5') }} />
|
|
|
</ol>
|
|
|
</div>
|