Explorar el Código

update position and add next link

ryoji-s hace 3 años
padre
commit
198d4d9627

+ 1 - 1
packages/app/public/static/locales/en_US/commons.json

@@ -21,7 +21,7 @@
   "alert": {
     "siteUrl_is_not_set": "'Site URL' is NOT set. Set it from the {{link}}",
     "please_enable_mailer": "Please setup mailer first.",
-    "register_limitation_please_enable_mailer": "Please setup mailer first."
+    "password_reset_please_enable_mailer": "Please setup mailer first."
   },
   "headers": {
     "app_settings": "App Settings"

+ 1 - 1
packages/app/public/static/locales/ja_JP/commons.json

@@ -21,7 +21,7 @@
   "alert": {
     "siteUrl_is_not_set": "'サイトURL' が設定されていません。{{link}} から設定してください。",
     "please_enable_mailer": "メール認証を有効にするには、メール設定を完了させてください。",
-    "register_limitation_please_enable_mailer": "登録の制限をするには、メール設定を完了させてください。"
+    "password_reset_please_enable_mailer": "パスワード再設定を有効化するには、メール設定を完了させてください。"
   },
   "headers": {
     "app_settings": "アプリ設定"

+ 1 - 1
packages/app/public/static/locales/zh_CN/commons.json

@@ -21,7 +21,7 @@
   "alert": {
     "siteUrl_is_not_set": "主页URL未设置,通过 {{link}} 设置",
     "please_enable_mailer": "请先设置邮件程序。",
-    "register_limitation_please_enable_mailer": "请先设置邮件程序。"
+    "password_reset_please_enable_mailer": "请先设置邮件程序。"
   },
   "headers": {
     "app_settings": "系统设置"

+ 12 - 8
packages/app/src/components/Admin/Security/LocalSecuritySettingContents.jsx

@@ -1,9 +1,9 @@
 import React from 'react';
 
 import { useTranslation } from 'next-i18next';
+import Link from 'next/link';
 import PropTypes from 'prop-types';
 
-
 import AdminGeneralSecurityContainer from '~/client/services/AdminGeneralSecurityContainer';
 import AdminLocalSecurityContainer from '~/client/services/AdminLocalSecurityContainer';
 import { toastSuccess, toastError } from '~/client/util/toastr';
@@ -134,12 +134,6 @@ class LocalSecuritySettingContents extends React.Component {
                       {t('security_settings.registration_mode.closed')}
                     </button>
                   </div>
-                  {!isMailerSetup && (
-                    <div className="alert alert-warning p-1 my-1 small d-inline-block">
-                      <span>{t('commons:alert.register_limitation_please_enable_mailer')}</span>
-                      <a href="/admin/app#mail-settings"> <i className="fa fa-link"></i> {t('app_setting.mail_settings')}</a>
-                    </div>
-                  )}
                 </div>
                 <p className="form-text text-muted small">{t('security_settings.register_limitation_desc')}</p>
               </div>
@@ -183,6 +177,14 @@ class LocalSecuritySettingContents extends React.Component {
                     {t('security_settings.Local.enable_password_reset_by_users')}
                   </label>
                 </div>
+                {!isMailerSetup && (
+                  <div className="alert alert-warning p-1 my-1 small d-inline-block">
+                    <span>{t('commons:alert.password_reset_please_enable_mailer')}</span>
+                    <Link href="/admin/app#mail-settings">
+                      <i className="fa fa-link"></i> {t('app_setting.mail_settings')}
+                    </Link>
+                  </div>
+                )}
                 <p className="form-text text-muted small">
                   {t('security_settings.Local.password_reset_desc')}
                 </p>
@@ -207,7 +209,9 @@ class LocalSecuritySettingContents extends React.Component {
                 {!isMailerSetup && (
                   <div className="alert alert-warning p-1 my-1 small d-inline-block">
                     <span>{t('commons:alert.please_enable_mailer')}</span>
-                    <a href="/admin/app#mail-settings"> <i className="fa fa-link"></i> {t('app_setting.mail_settings')}</a>
+                    <Link href="/admin/app#mail-settings">
+                      <i className="fa fa-link"></i> {t('app_setting.mail_settings')}
+                    </Link>
                   </div>
                 )}
                 <p className="form-text text-muted small">