Commit 5f0ec4b2 authored by 2breakegg's avatar 2breakegg

error.messages

parent a96f7307
This diff is collapsed.
{ {
"en": { "en": {
"title":"MoeCube", "title":"MoeCube",
"Home":"Home",
"username": "User Name", "username": "User Name",
"email": "E-Mail", "email": "E-Mail",
"password": "Password", "password": "Password",
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
"send-email": "Send Email", "send-email": "Send Email",
"reset-success": "reset success", "reset-success": "reset success",
"reset-fail": "reset fail", "reset-fail": "reset fail",
"reset-password": "Reset Password", "reset-password2": "Reset Password",
"remember-me":"Remember me", "remember-me":"Remember me",
"Please-use-a-correct-E-Mail-address.": "Please use a correct E-Mail address.", "Please-use-a-correct-E-Mail-address.": "Please use a correct E-Mail address.",
"User-name-can-not-be-empty.": "User name can not be empty.", "User-name-can-not-be-empty.": "User name can not be empty.",
...@@ -80,6 +81,7 @@ ...@@ -80,6 +81,7 @@
}, },
"zh": { "zh": {
"title":"萌立方", "title":"萌立方",
"Home":"主页",
"username": "用户名", "username": "用户名",
"email": "邮箱", "email": "邮箱",
"password": "密码", "password": "密码",
...@@ -106,7 +108,7 @@ ...@@ -106,7 +108,7 @@
"send-email": "发送邮件", "send-email": "发送邮件",
"reset-success": "修改成功", "reset-success": "修改成功",
"reset-fail": "修改失败", "reset-fail": "修改失败",
"reset-password": "重设密码", "reset-password2": "重置密码",
"remember-me":"记住我", "remember-me":"记住我",
"Please-use-a-correct-E-Mail-address.": "请填写正确的邮箱地址", "Please-use-a-correct-E-Mail-address.": "请填写正确的邮箱地址",
"User-name-can-not-be-empty.": "用户名不能为空", "User-name-can-not-be-empty.": "用户名不能为空",
......
...@@ -3,6 +3,7 @@ import { connect } from 'dva'; ...@@ -3,6 +3,7 @@ import { connect } from 'dva';
import styles from './Index.less'; import styles from './Index.less';
import Particles from 'react-particles-js' import Particles from 'react-particles-js'
import DocumentTitle from 'react-document-title' import DocumentTitle from 'react-document-title'
import { FormattedMessage as Format } from 'react-intl';
import { Layout, Button, Menu } from 'antd'; import { Layout, Button, Menu } from 'antd';
import { Link } from 'dva/router' import { Link } from 'dva/router'
import logo from '../assets/MoeCube.png' import logo from '../assets/MoeCube.png'
...@@ -126,24 +127,24 @@ const particleConfig = { ...@@ -126,24 +127,24 @@ const particleConfig = {
function Index({ dispatch, children, messages }) { function Index({ dispatch, children, messages }) {
return ( return (
<div style={{ display: 'flex', flexDirection: 'column', flex: 1, height: '100vh' }}> <div style={{ display: 'flex', flexDirection: 'column', flex: 1, height: '100vh' }}>
<DocumentTitle title={messages['title'] || 'Moe Cube'} /> <DocumentTitle title={messages['title'] || 'Moe Cube'} />
<Header style={{ display: 'flex', alignItems: 'center'}}> <Header style={{ display: 'flex', alignItems: 'center'}}>
<Link to="/" style={{ marginTop: '20px'}}> <Link to="/" style={{ marginTop: '20px'}}>
<img src={logo} style={{ width: '140px', height: '44px'}}/> <img src={logo} style={{ width: '140px', height: '44px'}}/>
</Link> </Link>
<Menu <Menu
theme="dark" theme="dark"
mode="horizontal" mode="horizontal"
defaultSelectedKeys={['1']} defaultSelectedKeys={['1']}
style={{ lineHeight: '64px' }}> style={{ lineHeight: '64px' }}>
<Menu.Item key="1"> <Menu.Item key="1">
<Link to="/"> <Link to="/">
Home <Format id="Home"/>
</Link> </Link>
</Menu.Item> </Menu.Item>
</Menu> </Menu>
</Header> </Header>
<Particles <Particles
...@@ -152,7 +153,7 @@ function Index({ dispatch, children, messages }) { ...@@ -152,7 +153,7 @@ function Index({ dispatch, children, messages }) {
position: "fixed" position: "fixed"
}} }}
/> />
{children} {children}
<Footer style={{ position: 'absolute', width: '100%', bottom: 0, left: 0, display: 'flex', justifyContent: 'space-between' }}> <Footer style={{ position: 'absolute', width: '100%', bottom: 0, left: 0, display: 'flex', justifyContent: 'space-between' }}>
<div>© MoeCube 2017 all right reserved.</div> <div>© MoeCube 2017 all right reserved.</div>
......
...@@ -55,7 +55,7 @@ class Reset extends React.Component { ...@@ -55,7 +55,7 @@ class Reset extends React.Component {
<Spin spinning={isResetSubmit} delay={100}> <Spin spinning={isResetSubmit} delay={100}>
<Form onSubmit={this.onSubmitReset} className="login-form"> <Form onSubmit={this.onSubmitReset} className="login-form">
<FormItem> <FormItem>
<h1><Format id='reset-password'/></h1> <h1><Format id='reset-password2'/></h1>
</FormItem> </FormItem>
<FormItem> <FormItem>
{getFieldDecorator('password', { {getFieldDecorator('password', {
...@@ -81,7 +81,7 @@ class Reset extends React.Component { ...@@ -81,7 +81,7 @@ class Reset extends React.Component {
</FormItem> </FormItem>
<Button type="primary" htmlType="submit" className="login-form-button"> <Button type="primary" htmlType="submit" className="login-form-button">
<Format id='reset-password'/> <Format id='reset-password2'/>
</Button> </Button>
</Form> </Form>
</Spin> </Spin>
......
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