Unverified Commit 37c8fb7c authored by 陈帅's avatar 陈帅 Committed by GitHub

feat: add login message (#3918)

* feat: add login message

* doc: change message text
parent 20b0dd96
......@@ -12,6 +12,8 @@ export default {
'app.login.login': 'Login',
'app.register.register': 'Register',
'app.register.get-verification-code': 'Get code',
'app.login.verification-code-warning':
'This project is a demo project and will not actually send you a verification code. Please switch to the account password login interface and log in as prompted.',
'app.register.sign-in': 'Already have an account?',
'app.register-result.msg': 'Account:registered at {email}',
'app.register-result.activation-email':
......
......@@ -13,6 +13,8 @@ export default {
'app.login.login': 'Login',
'app.register.register': 'Cadastro',
'app.register.get-verification-code': 'Recuperar código',
'app.login.verification-code-warning':
'This project is a demo project and will not actually send you a verification code. Please switch to the account password login interface and log in as prompted.',
'app.register.sign-in': 'Já tem uma conta?',
'app.register-result.msg': 'Conta:registrada em {email}',
'app.register-result.activation-email':
......
......@@ -12,6 +12,8 @@ export default {
'app.login.login': '登录',
'app.register.register': '注册',
'app.register.get-verification-code': '获取验证码',
'app.login.verification-code-warning':
'此项目为演示项目,并不会真的给您发送验证码。请切换到账户密码登录界面按提示登录。',
'app.register.sign-in': '使用已有账户登录',
'app.register-result.msg': '你的账户:{email} 注册成功',
'app.register-result.activation-email':
......
......@@ -12,6 +12,8 @@ export default {
'app.login.login': '登錄',
'app.register.register': '註冊',
'app.register.get-verification-code': '獲取驗證碼',
'app.login.verification-code-warning':
'此項目為演示項目,並不會真的給您發送驗證碼。請切換到賬戶密碼登錄界面按提示登錄。',
'app.register.sign-in': '使用已有賬戶登錄',
'app.register-result.msg': '妳的賬戶:{email} 註冊成功',
'app.register-result.activation-email':
......
......@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { connect } from 'dva';
import { formatMessage, FormattedMessage } from 'umi-plugin-react/locale';
import Link from 'umi/link';
import { Checkbox, Alert, Icon } from 'antd';
import { Checkbox, Alert, message, Icon } from 'antd';
import Login from '@/components/Login';
import styles from './Login.less';
......@@ -35,6 +35,7 @@ class LoginPage extends Component {
})
.then(resolve)
.catch(reject);
message.warning(formatMessage({ id: 'app.login.verification-code-warning' }));
}
});
});
......
......@@ -3,7 +3,7 @@ import { connect } from 'dva';
import { formatMessage, FormattedMessage } from 'umi-plugin-react/locale';
import Link from 'umi/link';
import router from 'umi/router';
import { Form, Input, Button, Select, Row, Col, Popover, Progress } from 'antd';
import { Form, Input, Button, message, Select, Row, Col, Popover, Progress } from 'antd';
import styles from './Register.less';
const FormItem = Form.Item;
......@@ -75,6 +75,7 @@ class Register extends Component {
clearInterval(this.interval);
}
}, 1000);
message.warning(formatMessage({ id: 'app.login.verification-code-warning' }));
};
getPasswordStatus = () => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment