Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Moecube Accounts Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Moecube Accounts Web
Commits
6893752b
Commit
6893752b
authored
Apr 07, 2017
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
81d8bda4
aad83c4e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
src/components/UserPanel.js
src/components/UserPanel.js
+1
-0
src/models/auth.js
src/models/auth.js
+15
-5
src/routes/Verify.js
src/routes/Verify.js
+2
-4
No files found.
src/components/UserPanel.js
View file @
6893752b
...
...
@@ -40,6 +40,7 @@ function UserPanel({ dispatch, user }) {
style={{ borderRadius: '45px',
height: '45px',
weight: '45px',
boxSizing: 'content-box',
border: '2px solid rgba(255,255,255,0.2' }} />
</div>
</Dropdown>
...
...
src/models/auth.js
View file @
6893752b
...
...
@@ -168,15 +168,16 @@ export default {
message
.
success
(
messages
[
'
Your-account-has-been-successfully-activated!
'
],
3
);
}
}
catch
(
error
)
{
message
.
error
(
error
.
message
,
3
);
message
.
error
(
messages
[
error
.
message
]
||
error
.
message
,
3
);
}
},
*
checkEmail
({
payload
},
{
call
,
put
})
{
*
checkEmail
({
payload
},
{
call
,
put
,
select
})
{
if
(
!
payload
.
email
)
{
yield
put
({
type
:
'
check
'
,
payload
:
{
checkEmail
:
'
error
'
}
});
return
;
}
const
{
messages
}
=
yield
select
(
state
=>
state
.
common
);
try
{
const
{
data
}
=
yield
call
(
checkUserExists
,
{
email
:
payload
.
email
,
...
...
@@ -186,15 +187,20 @@ export default {
yield
put
({
type
:
'
check
'
,
payload
:
{
isEmailExists
:
true
,
checkEmail
:
'
warning
'
}
});
}
}
catch
(
error
)
{
yield
put
({
type
:
'
check
'
,
payload
:
{
isEmailExists
:
false
,
checkEmail
:
'
success
'
}
});
if
(
error
.
message
===
'
i_not_found
'
)
{
yield
put
({
type
:
'
check
'
,
payload
:
{
isEmailExists
:
false
,
checkEmail
:
'
success
'
}
});
}
else
{
message
.
error
(
messages
[
error
.
message
]
||
error
.
message
,
3
);
}
}
},
*
checkUsername
({
payload
},
{
call
,
put
})
{
*
checkUsername
({
payload
},
{
call
,
put
,
select
})
{
if
(
!
payload
.
username
)
{
yield
put
({
type
:
'
check
'
,
payload
:
{
checkUsername
:
'
error
'
}
});
return
;
}
const
{
messages
}
=
yield
select
(
state
=>
state
.
common
);
try
{
const
{
data
}
=
yield
call
(
checkUserExists
,
{
username
:
payload
.
username
,
...
...
@@ -204,7 +210,11 @@ export default {
yield
put
({
type
:
'
check
'
,
payload
:
{
isUserNameExists
:
true
,
checkUsername
:
'
warning
'
}
});
}
}
catch
(
error
)
{
yield
put
({
type
:
'
check
'
,
payload
:
{
isUserNameExists
:
false
,
checkUsername
:
'
success
'
}
});
if
(
error
.
message
===
'
i_not_found
'
)
{
yield
put
({
type
:
'
check
'
,
payload
:
{
isUserNameExists
:
false
,
checkUsername
:
'
success
'
}
});
}
else
{
message
.
error
(
messages
[
error
.
message
]
||
error
.
message
,
3
);
}
}
},
*
login
({
payload
},
{
call
,
put
,
select
})
{
...
...
src/routes/Verify.js
View file @
6893752b
import
{
Alert
,
Form
,
Icon
,
Input
,
Spin
,
Steps
,
Tag
}
from
'
antd
'
;
import
{
Alert
,
Form
,
Icon
,
Input
,
Spin
,
Steps
,
Tag
,
Breadcrumb
}
from
'
antd
'
;
import
{
connect
}
from
'
dva
'
;
import
{
routerRedux
}
from
'
dva/router
'
;
import
React
,
{
PropTypes
}
from
'
react
'
;
...
...
@@ -68,9 +68,7 @@ class Verify extends React.Component {
return
(
<
div
style
=
{{
display
:
'
flex
'
,
flex
:
1
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
height
:
'
100%
'
}}
>
<
div
style
=
{{
display
:
'
flex
'
,
flex
:
1
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
height
:
'
100%
'
}}
>
<
Spin
spinning
=
{
loading
}
delay
=
{
100
}
>
<
Steps
size
=
"
large
"
current
=
{
1
}
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment