Browse Source
feat: add login message (#3918 )
* feat: add login message
* doc: change message text
pull/3946/head
陈帅
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
12 additions and
2 deletions
src/locales/en-US/login.js
src/locales/pt-BR/login.js
src/locales/zh-CN/login.js
src/locales/zh-TW/login.js
src/pages/User/Login.js
src/pages/User/Register.js
@ -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 = ( ) => {