Commit a96f7307 authored by 2breakegg's avatar 2breakegg

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/models/user.js
parents a4d9fd27 2a6b213d
{ {
"entry": "src/index.js", "entry": "src/index.js",
"publicPath":"https://cdn01.moecube.com/accounts/",
"env": { "env": {
"development": { "development": {
"extraBabelPlugins": [ "extraBabelPlugins": [
......
...@@ -120,12 +120,13 @@ export default { ...@@ -120,12 +120,13 @@ export default {
const { token } = payload; const { token } = payload;
try { try {
let { data } = yield call(getAuthUser, { token }); let { data } = yield call(getAuthUser, { token })
if (data) { if(data) {
yield put({ type: 'getAuthUserSuccess', payload: { user: data, token } }); yield put({ type: 'getAuthUserSuccess', payload: { user: data, token }})
} }
} catch (error) { }catch(error) {
message.error(error.message); yield put({ type: 'getAuthUserFail'})
// message.error(error.message)
} }
}, },
*preLogin({ payload }, { call, put, select }) { *preLogin({ payload }, { call, put, select }) {
......
...@@ -14,7 +14,7 @@ class Active extends React.Component { ...@@ -14,7 +14,7 @@ class Active extends React.Component {
render() { render() {
const { loading } = this.props; const { loading } = this.props;
return ( return (
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', minHeight: '100%' }}> <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', flex: 1 }}>
<Button type="primary" icon="poweroff" loading={loading} onClick={this.handleClick}> <Button type="primary" icon="poweroff" loading={loading} onClick={this.handleClick}>
<Format id={'verify-email'} /> <Format id={'verify-email'} />
</Button> </Button>
......
...@@ -46,7 +46,7 @@ class Login extends React.Component { ...@@ -46,7 +46,7 @@ class Login extends React.Component {
const { loading } = this.props; const { loading } = this.props;
const { intl: { messages } } = this.context; const { intl: { messages } } = this.context;
return ( return (
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100%' }}> <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', flex: 1}}>
<Spin spinning={loading} delay={100}> <Spin spinning={loading} delay={100}>
<Form onSubmit={this.onSubmitLogin} className="login-form"> <Form onSubmit={this.onSubmitLogin} className="login-form">
......
...@@ -125,7 +125,7 @@ const particleConfig = { ...@@ -125,7 +125,7 @@ const particleConfig = {
function Index({ dispatch, children, messages }) { function Index({ dispatch, children, messages }) {
return ( return (
<div style={{ height: "100%" }}> <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'}}>
......
...@@ -77,7 +77,7 @@ class Register extends React.Component { ...@@ -77,7 +77,7 @@ class Register extends React.Component {
}; };
return ( return (
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', height: '100%' }}> <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', flex: 1 }}>
<Spin spinning={loading} delay={100}> <Spin spinning={loading} delay={100}>
<Steps size="large" current={0}> <Steps size="large" current={0}>
......
...@@ -51,7 +51,7 @@ class Reset extends React.Component { ...@@ -51,7 +51,7 @@ class Reset extends React.Component {
const { intl: { messages } } = this.context; const { intl: { messages } } = this.context;
return ( return (
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100%' }}> <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', flex: 1 }}>
<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>
......
...@@ -64,7 +64,7 @@ class Verify extends React.Component { ...@@ -64,7 +64,7 @@ class Verify extends React.Component {
return ( return (
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', height: '100%' }}> <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', flex: 1 }}>
<Spin spinning={loading} delay={100}> <Spin spinning={loading} delay={100}>
<Steps size="large" current={1}> <Steps size="large" current={1}>
......
This diff is collapsed.
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