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
ad3f621b
Commit
ad3f621b
authored
Apr 06, 2017
by
2breakegg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reformat code
parent
0567886c
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
253 additions
and
211 deletions
+253
-211
.idea/workspace.xml
.idea/workspace.xml
+228
-208
i18n.json
i18n.json
+2
-0
src/models/auth.js
src/models/auth.js
+6
-0
src/routes/Index.js
src/routes/Index.js
+16
-3
src/routes/Profiles.js
src/routes/Profiles.js
+1
-0
No files found.
.idea/workspace.xml
View file @
ad3f621b
This diff is collapsed.
Click to expand it.
i18n.json
View file @
ad3f621b
...
...
@@ -20,6 +20,7 @@
"yonghuan"
:
"The Disappearing of Gensokyo"
,
"sign-up"
:
"Sign Up"
,
"sign-in"
:
"Sign In"
,
"sign-out"
:
"Sign out"
,
"Please-sign-in"
:
"Please sign In"
,
"email-address-or-username"
:
"E-Mail or Username"
,
"register-now"
:
"register-now!"
,
...
...
@@ -100,6 +101,7 @@
"yonghuan"
:
"永远消失的幻想乡"
,
"sign-up"
:
"注册"
,
"sign-in"
:
"登陆"
,
"sign-out"
:
"登出"
,
"Please-sign-in"
:
"您尚未登录,请先登录"
,
"email-address-or-username"
:
"邮箱或用户名"
,
"register-now"
:
"现在注册"
,
...
...
src/models/auth.js
View file @
ad3f621b
...
...
@@ -21,6 +21,12 @@ export default {
register
:
{},
},
reducers
:
{
signOut
(
state
){
console
.
log
(
'
sign out
'
);
localStorage
.
removeItem
(
'
token
'
);
localStorage
.
removeItem
(
'
user
'
);
return
state
;
},
change
(
state
,
action
)
{
return
{
...
state
,
...
action
.
payload
,
...
...
src/routes/Index.js
View file @
ad3f621b
...
...
@@ -6,9 +6,8 @@ import DocumentTitle from 'react-document-title';
import
{
FormattedMessage
as
Format
}
from
'
react-intl
'
;
import
Particles
from
'
react-particles-js
'
;
import
logo
from
'
../assets/MoeCube.png
'
;
const
{
Header
,
Footer
,
Sider
,
Content
}
=
Layout
;
const
{
Header
,
Footer
}
=
Layout
;
const
particleConfig
=
{
particles
:
{
number
:
{
...
...
@@ -123,7 +122,7 @@ const particleConfig = {
retina_detect
:
true
,
};
function
Index
({
children
,
messages
})
{
function
Index
({
children
,
messages
,
dispatch
})
{
return
(
<
div
style
=
{{
height
:
'
100%
'
}}
>
<
DocumentTitle
title
=
{
messages
.
title
||
'
Moe Cube
'
}
/
>
...
...
@@ -145,6 +144,20 @@ function Index({ children, messages }) {
<
/Link
>
<
/Menu.Item
>
<
/Menu
>
<
Menu
theme
=
"
dark
"
mode
=
"
horizontal
"
defaultSelectedKeys
=
{[
'
1
'
]}
style
=
{{
lineHeight
:
'
64px
'
,
position
:
'
absolute
'
,
right
:
'
50px
'
}}
>
{
localStorage
.
getItem
(
'
user
'
)
?
(
<
Menu
.
Item
key
=
"
1
"
>
<
div
onClick
=
{()
=>
{
dispatch
({
type
:
'
auth/signOut
'
})
}}
>
<
Format
id
=
"
sign-out
"
/>
<
/div
>
<
/Menu.Item>
)
:
(
<div></
div
>
)
}
<
/Menu
>
<
/Header
>
<
Particles
...
...
src/routes/Profiles.js
View file @
ad3f621b
...
...
@@ -125,6 +125,7 @@ class Profiles extends React.Component {
<
/div
>
:
<
img
src
=
{
avatar
||
imageUrl
||
defaultAvatar
}
style
=
{{
height
:
'
256px
'
,
width
:
'
256px
'
}}
onClick
=
{()
=>
dispatch
({
type
:
'
upload/start
'
})}
/
>
}
...
...
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