You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by su...@apache.org on 2021/02/22 09:45:12 UTC

[apisix-dashboard] branch master updated: feat: add tips on login page (#1491)

This is an automated email from the ASF dual-hosted git repository.

sunyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new e56163a  feat: add tips on login page (#1491)
e56163a is described below

commit e56163adfa5ebab4e3fdb79519162f1576df9efe
Author: Baoyuan <ba...@gmail.com>
AuthorDate: Mon Feb 22 17:45:05 2021 +0800

    feat: add tips on login page (#1491)
---
 web/src/pages/User/components/LoginMethodPassword.tsx | 9 ++++++++-
 web/src/pages/User/locales/en-US.ts                   | 2 ++
 web/src/pages/User/locales/zh-CN.ts                   | 2 ++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/web/src/pages/User/components/LoginMethodPassword.tsx b/web/src/pages/User/components/LoginMethodPassword.tsx
index 970f2dd..8e0948d 100644
--- a/web/src/pages/User/components/LoginMethodPassword.tsx
+++ b/web/src/pages/User/components/LoginMethodPassword.tsx
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 import React from 'react';
-import { Form, Input } from 'antd';
+import { Form, Input, Tooltip } from 'antd';
 import type { FormInstance } from 'antd/lib/form';
 import { UserOutlined, LockTwoTone } from '@ant-design/icons';
 import { request, formatMessage } from 'umi';
@@ -68,6 +68,13 @@ const LoginMethodPassword: UserModule.LoginMethod = {
             prefix={<LockTwoTone />}
           />
         </Form.Item>
+        <Form.Item>
+          <Tooltip title={formatMessage({ id: 'component.user.loginMethodPassword.modificationMethod' })}>
+            <a href="https://github.com/apache/apisix-dashboard/blob/master/api/conf/conf.yaml#L53-L57">
+              {formatMessage({ id: 'component.user.loginMethodPassword.changeDefaultAccount' })}
+            </a>
+          </Tooltip>
+        </Form.Item>
       </Form>
     );
   },
diff --git a/web/src/pages/User/locales/en-US.ts b/web/src/pages/User/locales/en-US.ts
index 423e792..bdf6b9c 100644
--- a/web/src/pages/User/locales/en-US.ts
+++ b/web/src/pages/User/locales/en-US.ts
@@ -25,6 +25,8 @@ export default {
   'component.user.loginMethodPassword.incorrectPassword': 'Incorrect username or password',
   'component.user.loginMethodPassword.fieldInvalid': 'Please check username and password',
   'component.user.loginMethodPassword.success': 'Login Success',
+  'component.user.loginMethodPassword.changeDefaultAccount': 'How to update username/password?',
+  'component.user.loginMethodPassword.modificationMethod': 'Please modify the users field in the /api/conf/conf.yaml file',
   'component.user.loginMethodExample': 'Example',
   'component.user.loginMethodExample.message':
     'Example Login Method, It is only used as an extension example of login method and cannot be used.',
diff --git a/web/src/pages/User/locales/zh-CN.ts b/web/src/pages/User/locales/zh-CN.ts
index c2a28b6..6054bbe 100644
--- a/web/src/pages/User/locales/zh-CN.ts
+++ b/web/src/pages/User/locales/zh-CN.ts
@@ -25,6 +25,8 @@ export default {
   'component.user.loginMethodPassword.incorrectPassword': '账号或密码错误',
   'component.user.loginMethodPassword.fieldInvalid': '请检查账号和密码',
   'component.user.loginMethodPassword.success': '登录成功',
+  'component.user.loginMethodPassword.changeDefaultAccount': '如何修改默认账户和密码?',
+  'component.user.loginMethodPassword.modificationMethod': '请修改 /api/conf/conf.yaml 文件中 users 字段',
   'component.user.loginMethodExample': '示例登录',
   'component.user.loginMethodExample.message': '示例登录方式,仅作为登录方式扩展例子,无法使用',
 };