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
6e6bb196
Commit
6e6bb196
authored
Apr 07, 2017
by
2breakegg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/moecube/moecube-accounts-web
parents
f206e585
44c673dc
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
32 additions
and
36 deletions
+32
-36
.roadhogrc.js
.roadhogrc.js
+1
-1
.travis.yml
.travis.yml
+1
-1
src/components/EmailForm.js
src/components/EmailForm.js
+2
-2
src/components/Example.js
src/components/Example.js
+0
-13
src/components/PasswordForm.js
src/components/PasswordForm.js
+1
-1
src/components/SendEmail.js
src/components/SendEmail.js
+1
-1
src/components/UserNameForm.js
src/components/UserNameForm.js
+2
-2
src/components/UserPanel.js
src/components/UserPanel.js
+4
-3
src/models/auth.js
src/models/auth.js
+15
-5
src/routes/Profiles.js
src/routes/Profiles.js
+3
-2
src/routes/Profiles.less
src/routes/Profiles.less
+0
-2
src/routes/Verify.js
src/routes/Verify.js
+1
-3
src/utils/sso.js
src/utils/sso.js
+1
-0
No files found.
.roadhogrc.js
View file @
6e6bb196
...
@@ -3,7 +3,7 @@ let publicPath = 'https://cdn01.moecube.com/accounts/';
...
@@ -3,7 +3,7 @@ let publicPath = 'https://cdn01.moecube.com/accounts/';
const
API_ROOT
=
{
const
API_ROOT
=
{
development
:
'
http://192.168.1.9:3000
'
,
development
:
'
http://192.168.1.9:3000
'
,
test
:
'
http://114.215.243.95:8082
'
,
test
:
'
http://114.215.243.95:8082
'
,
production
:
'
https://api.moeube.com/accounts
'
production
:
'
https://api.moe
c
ube.com/accounts
'
};
};
let
defineConf
=
{
let
defineConf
=
{
...
...
.travis.yml
View file @
6e6bb196
...
@@ -4,7 +4,7 @@ env:
...
@@ -4,7 +4,7 @@ env:
global
:
global
:
secure
:
NObcZ6fY1VQuoDfxRxKVOZ+p7g3LTDkonG4Ow4HIbx2g8wJ24mMqs9gN0J3Asbdbz68isDMpkKy7IW1mK9+N9fM0pBauqD1YMbglnEv+HhYjhiEsQdRdDM2nzDIjS4PCwavI1Da5TLhaUjSAM4lrHx7bVOK4YsvF3s8JEApS54QgSlbeJgvSbPcCiapl0VwwaL36cGndChc3tawq4xseuk4bP2NrTEd7ifYZMt+iojId+UuhRQk4w0HUlBhEDKiT/fLxeQDwMRv2WIdIPW7D7+Wo01iX+T0Ti629QhQBe/S76affkG6G085HIPin3VvXDQaiYbK4ALbc79O+9jqSxEFd9nwG8xbp2jezzvclUSXPhIyZe7VSRS6z1MdevlyQa56AUEP7My7IMqj8j7NPoUgrnVlKtR8WPHQacfAVkrcOIX+Tzwl2IMOCqonamDtJjUNX5xpYB+IEj+INvQmRqT2NicExGWj9LZp3L3kscwq1u+0hPzgoQ9yovE+OvLFNE/R5AE90GIaSlwXw4MqOeB+8l+ou2JzNZFJhHBvAsOFwQTloFz/pu7ichJ+P0KsMPteLFA4Btuo6bBu31K7R310CmlIdYJIeeybMuM6e6bG8IkbVcMq5skg9LNa64KuDG46oopwGLiWkdRwDzG3VmXGwVm+OF2EWZi/B0wIcTwY=
secure
:
NObcZ6fY1VQuoDfxRxKVOZ+p7g3LTDkonG4Ow4HIbx2g8wJ24mMqs9gN0J3Asbdbz68isDMpkKy7IW1mK9+N9fM0pBauqD1YMbglnEv+HhYjhiEsQdRdDM2nzDIjS4PCwavI1Da5TLhaUjSAM4lrHx7bVOK4YsvF3s8JEApS54QgSlbeJgvSbPcCiapl0VwwaL36cGndChc3tawq4xseuk4bP2NrTEd7ifYZMt+iojId+UuhRQk4w0HUlBhEDKiT/fLxeQDwMRv2WIdIPW7D7+Wo01iX+T0Ti629QhQBe/S76affkG6G085HIPin3VvXDQaiYbK4ALbc79O+9jqSxEFd9nwG8xbp2jezzvclUSXPhIyZe7VSRS6z1MdevlyQa56AUEP7My7IMqj8j7NPoUgrnVlKtR8WPHQacfAVkrcOIX+Tzwl2IMOCqonamDtJjUNX5xpYB+IEj+INvQmRqT2NicExGWj9LZp3L3kscwq1u+0hPzgoQ9yovE+OvLFNE/R5AE90GIaSlwXw4MqOeB+8l+ou2JzNZFJhHBvAsOFwQTloFz/pu7ichJ+P0KsMPteLFA4Btuo6bBu31K7R310CmlIdYJIeeybMuM6e6bG8IkbVcMq5skg9LNa64KuDG46oopwGLiWkdRwDzG3VmXGwVm+OF2EWZi/B0wIcTwY=
script
:
npm run build
:test
script
:
npm run build
before_deploy
:
before_deploy
:
-
curl --location --retry 5 --output ossutil 'https://github.com/mycard/ossutil/releases/download/1.0.0.Beta2/ossutil'
-
curl --location --retry 5 --output ossutil 'https://github.com/mycard/ossutil/releases/download/1.0.0.Beta2/ossutil'
-
chmod +x ossutil
-
chmod +x ossutil
...
...
src/components/EmailForm.js
View file @
6e6bb196
...
@@ -44,7 +44,7 @@ class EmailForm extends React.Component {
...
@@ -44,7 +44,7 @@ class EmailForm extends React.Component {
label
:
messages
.
email
,
label
:
messages
.
email
,
hasFeedback
:
true
,
hasFeedback
:
true
,
validateStatus
:
checkEmail
,
validateStatus
:
checkEmail
,
help
:
isEmailExists
?
'
email exists
'
:
''
,
extra
:
isEmailExists
?
'
//i18n
email exists
'
:
''
,
...
formItemLayout
,
...
formItemLayout
,
},
},
decorator
:
{
decorator
:
{
...
@@ -87,7 +87,7 @@ class EmailForm extends React.Component {
...
@@ -87,7 +87,7 @@ class EmailForm extends React.Component {
<
/FormItem
>
<
/FormItem
>
<
FormItem
{...
passwordProps
.
fromItem
}
>
<
FormItem
{...
passwordProps
.
fromItem
}
>
{
getFieldDecorator
(
'
password
'
)(
{
getFieldDecorator
(
'
password
'
,
{
...
passwordProps
.
decorator
}
)(
<
Input
{...
passwordProps
.
input
}
/>
,
<
Input
{...
passwordProps
.
input
}
/>
,
)}
)}
<
/FormItem
>
<
/FormItem
>
...
...
src/components/Example.js
deleted
100644 → 0
View file @
f206e585
import
React
from
'
react
'
;
const
Example
=
()
=>
{
return
(
<
div
>
Example
<
/div
>
);
};
Example
.
propTypes
=
{};
export
default
Example
;
src/components/PasswordForm.js
View file @
6e6bb196
...
@@ -62,7 +62,7 @@ class EmailForm extends React.Component {
...
@@ -62,7 +62,7 @@ class EmailForm extends React.Component {
const
passwordProps
=
{
const
passwordProps
=
{
fromItem
:
{
fromItem
:
{
label
:
'
old passwrod
'
,
label
:
messages
[
'
old-password
'
]
,
...
formItemLayout
,
...
formItemLayout
,
},
},
decorator
:
{
decorator
:
{
...
...
src/components/SendEmail.js
View file @
6e6bb196
...
@@ -43,7 +43,7 @@ class EmailForm extends React.Component {
...
@@ -43,7 +43,7 @@ class EmailForm extends React.Component {
label
:
messages
.
email
,
label
:
messages
.
email
,
hasFeedback
:
true
,
hasFeedback
:
true
,
validateStatus
:
checkEmail
,
validateStatus
:
checkEmail
,
help
:
isEmailExists
?
'
email exists
'
:
''
,
extra
:
isEmailExists
?
'
//i18n
email exists
'
:
''
,
...
formItemLayout
,
...
formItemLayout
,
},
},
decorator
:
{
decorator
:
{
...
...
src/components/UserNameForm.js
View file @
6e6bb196
...
@@ -43,7 +43,7 @@ class EmailForm extends React.Component {
...
@@ -43,7 +43,7 @@ class EmailForm extends React.Component {
label
:
messages
.
username
,
label
:
messages
.
username
,
hasFeedback
:
true
,
hasFeedback
:
true
,
validateStatus
:
checkUsername
,
validateStatus
:
checkUsername
,
help
:
isUserNameExists
?
'
username exists
'
:
''
,
extra
:
isUserNameExists
?
'
username exists
'
:
''
,
...
formItemLayout
,
...
formItemLayout
,
},
},
decorator
:
{
decorator
:
{
...
@@ -84,7 +84,7 @@ class EmailForm extends React.Component {
...
@@ -84,7 +84,7 @@ class EmailForm extends React.Component {
<
/FormItem
>
<
/FormItem
>
<
FormItem
{...
passwordProps
.
fromItem
}
>
<
FormItem
{...
passwordProps
.
fromItem
}
>
{
getFieldDecorator
(
'
password
'
)(
{
getFieldDecorator
(
'
password
'
,
{
...
passwordProps
.
decorator
}
)(
<
Input
{...
passwordProps
.
input
}
/>
,
<
Input
{...
passwordProps
.
input
}
/>
,
)}
)}
<
/FormItem
>
<
/FormItem
>
...
...
src/components/UserPanel.js
View file @
6e6bb196
...
@@ -38,9 +38,10 @@ function UserPanel({ dispatch, user }) {
...
@@ -38,9 +38,10 @@ function UserPanel({ dispatch, user }) {
<img
<img
alt=
"
avatar
"
src={avatar || defaultAvatar}
alt=
"
avatar
"
src={avatar || defaultAvatar}
style={{ borderRadius: '45px',
style={{ borderRadius: '45px',
height: '45px',
height: '40px',
weight: '45px',
weight: '40px',
border: '2px solid rgba(255,255,255,0.2' }} />
boxSizing: 'content-box',
border: '2px solid rgba(255,255,255,0.3' }} />
</div>
</div>
</Dropdown>
</Dropdown>
);
);
...
...
src/models/auth.js
View file @
6e6bb196
...
@@ -168,15 +168,16 @@ export default {
...
@@ -168,15 +168,16 @@ export default {
message
.
success
(
messages
[
'
Your-account-has-been-successfully-activated!
'
],
3
);
message
.
success
(
messages
[
'
Your-account-has-been-successfully-activated!
'
],
3
);
}
}
}
catch
(
error
)
{
}
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
)
{
if
(
!
payload
.
email
)
{
yield
put
({
type
:
'
check
'
,
payload
:
{
checkEmail
:
'
error
'
}
});
yield
put
({
type
:
'
check
'
,
payload
:
{
checkEmail
:
'
error
'
}
});
return
;
return
;
}
}
const
{
messages
}
=
yield
select
(
state
=>
state
.
common
);
try
{
try
{
const
{
data
}
=
yield
call
(
checkUserExists
,
{
const
{
data
}
=
yield
call
(
checkUserExists
,
{
email
:
payload
.
email
,
email
:
payload
.
email
,
...
@@ -186,15 +187,20 @@ export default {
...
@@ -186,15 +187,20 @@ export default {
yield
put
({
type
:
'
check
'
,
payload
:
{
isEmailExists
:
true
,
checkEmail
:
'
warning
'
}
});
yield
put
({
type
:
'
check
'
,
payload
:
{
isEmailExists
:
true
,
checkEmail
:
'
warning
'
}
});
}
}
}
catch
(
error
)
{
}
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
)
{
if
(
!
payload
.
username
)
{
yield
put
({
type
:
'
check
'
,
payload
:
{
checkUsername
:
'
error
'
}
});
yield
put
({
type
:
'
check
'
,
payload
:
{
checkUsername
:
'
error
'
}
});
return
;
return
;
}
}
const
{
messages
}
=
yield
select
(
state
=>
state
.
common
);
try
{
try
{
const
{
data
}
=
yield
call
(
checkUserExists
,
{
const
{
data
}
=
yield
call
(
checkUserExists
,
{
username
:
payload
.
username
,
username
:
payload
.
username
,
...
@@ -204,7 +210,11 @@ export default {
...
@@ -204,7 +210,11 @@ export default {
yield
put
({
type
:
'
check
'
,
payload
:
{
isUserNameExists
:
true
,
checkUsername
:
'
warning
'
}
});
yield
put
({
type
:
'
check
'
,
payload
:
{
isUserNameExists
:
true
,
checkUsername
:
'
warning
'
}
});
}
}
}
catch
(
error
)
{
}
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
})
{
*
login
({
payload
},
{
call
,
put
,
select
})
{
...
...
src/routes/Profiles.js
View file @
6e6bb196
...
@@ -114,7 +114,8 @@ class Profiles extends React.Component {
...
@@ -114,7 +114,8 @@ class Profiles extends React.Component {
this
.
cropper
=
cropper
;
this
.
cropper
=
cropper
;
}}
}}
src
=
{
imageUrl
||
defaultAvatar
}
src
=
{
imageUrl
||
defaultAvatar
}
style
=
{{
maxHeight
:
'
20vw
'
,
maxWidth
:
'
20vw
'
}}
className
=
"
cropper-image
"
style
=
{{
height
:
'
20vw
'
,
width
:
'
20vw
'
}}
aspectRatio
=
{
1
/
1
}
aspectRatio
=
{
1
/
1
}
guides
guides
/>
/>
...
@@ -124,7 +125,7 @@ class Profiles extends React.Component {
...
@@ -124,7 +125,7 @@ class Profiles extends React.Component {
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
!
isUpload
?
'
flex
'
:
'
none
'
,
flexDirection
:
'
column
'
}}
>
<
div
style
=
{{
display
:
!
isUpload
?
'
flex
'
:
'
none
'
,
flexDirection
:
'
column
'
}}
>
<
img
alt
=
"
avatar
"
src
=
{
avatar
||
imageUrl
||
defaultAvatar
}
/
>
<
img
alt
=
"
avatar
"
s
tyle
=
{{
height
:
'
20vw
'
,
width
:
'
20vw
'
}}
s
rc
=
{
avatar
||
imageUrl
||
defaultAvatar
}
/
>
<
Button
style
=
{{
padding
:
'
4px 0
'
}}
>
<
Button
style
=
{{
padding
:
'
4px 0
'
}}
>
<
label
style
=
{{
display
:
'
flex
'
,
flex
:
1
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
}}
>
<
label
style
=
{{
display
:
'
flex
'
,
flex
:
1
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
}}
>
<
Icon
type
=
"
plus
"
/><
Format
id
=
"
Change-Avatar
"
/>
<
Icon
type
=
"
plus
"
/><
Format
id
=
"
Change-Avatar
"
/>
...
...
src/routes/Profiles.less
View file @
6e6bb196
:global {
:global {
.app-detail-nav {
}
.ant-card {
.ant-card {
margin: 2vh 0;
margin: 2vh 0;
}
}
...
...
src/routes/Verify.js
View file @
6e6bb196
...
@@ -68,9 +68,7 @@ class Verify extends React.Component {
...
@@ -68,9 +68,7 @@ class Verify extends React.Component {
return
(
return
(
<
div
<
div
style
=
{{
display
:
'
flex
'
,
flex
:
1
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
height
:
'
100%
'
}}
>
style
=
{{
display
:
'
flex
'
,
flex
:
1
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
height
:
'
100%
'
}}
>
<
Spin
spinning
=
{
loading
}
delay
=
{
100
}
>
<
Spin
spinning
=
{
loading
}
delay
=
{
100
}
>
<
Steps
size
=
"
large
"
current
=
{
1
}
>
<
Steps
size
=
"
large
"
current
=
{
1
}
>
...
...
src/utils/sso.js
View file @
6e6bb196
...
@@ -20,6 +20,7 @@ export const handleSSO = (user) => {
...
@@ -20,6 +20,7 @@ export const handleSSO = (user) => {
params
.
set
(
'
return_sso_url
'
,
sso
.
get
(
'
return_sso_url
'
));
params
.
set
(
'
return_sso_url
'
,
sso
.
get
(
'
return_sso_url
'
));
params
.
set
(
'
nonce
'
,
sso
.
get
(
'
nonce
'
));
params
.
set
(
'
nonce
'
,
sso
.
get
(
'
nonce
'
));
params
.
set
(
'
external_id
'
,
user
.
id
);
params
.
set
(
'
external_id
'
,
user
.
id
);
params
.
set
(
'
avatar_url
'
,
user
.
avatar
);
const
payload
=
Buffer
.
from
(
params
.
toString
()).
toString
(
'
base64
'
);
const
payload
=
Buffer
.
from
(
params
.
toString
()).
toString
(
'
base64
'
);
url
.
searchParams
.
set
(
'
sso
'
,
payload
);
url
.
searchParams
.
set
(
'
sso
'
,
payload
);
...
...
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