Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Moecube Store
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 Store
Commits
40bea00b
Commit
40bea00b
authored
Mar 20, 2017
by
2breakegg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
清楚等待
parent
c8d65f7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
24 deletions
+37
-24
src/App.js
src/App.js
+37
-24
No files found.
src/App.js
View file @
40bea00b
...
@@ -38,21 +38,17 @@ export default class App extends Component {
...
@@ -38,21 +38,17 @@ export default class App extends Component {
}
}
})
})
const
initState
=
{
const
[
signups
,
online
,
win32
,
drawin
]
=
await
Promise
.
all
([
stats
:
{
this
.
get_stats_signups
(),
signups
:
await
this
.
get_stats_signups
(),
this
.
get_stats_online
(),
online
:
await
this
.
get_stats_online
()
this
.
get_latest_win32
(),
}
this
.
get_latest_drawin
()
}
])
const
initLatest
=
{
latest
:
{
this
.
setState
({
win32
:
await
this
.
get_latest_win32
(),
stats
:
{
signups
,
online
},
drawin
:
await
this
.
get_latest_drawin
()
latest
:
{
win32
,
drawin
}
}
})
}
this
.
setState
(
initState
)
this
.
setState
(
initLatest
)
}
}
async
get_latest_win32
()
{
async
get_latest_win32
()
{
...
@@ -156,7 +152,7 @@ export default class App extends Component {
...
@@ -156,7 +152,7 @@ export default class App extends Component {
<
/a
>
<
/a
>
<
/div
>
<
/div
>
)
:
(
)
:
(
<
div
className
=
"
loading
"
>
L
oading
...
<
/div
>
<
div
className
=
"
loading
"
>
l
oading
...
<
/div
>
)}
)}
<
/div
>
<
/div
>
<
/Col
>
<
/Col
>
...
@@ -172,7 +168,11 @@ export default class App extends Component {
...
@@ -172,7 +168,11 @@ export default class App extends Component {
<
p
className
=
"
App-Card-content
"
>
<
p
className
=
"
App-Card-content
"
>
<
FormattedMessage
id
=
{
"
CardContent1
"
}
/
>
<
FormattedMessage
id
=
{
"
CardContent1
"
}
/
>
<
/p
>
<
/p
>
<
a
href
=
{
latest
[
this
.
state
.
platform
].
url
}
><
Button
type
=
"
primary
"
icon
=
"
download
"
><
FormattedMessage
id
=
{
"
CardAction1
"
}
/></
Button
><
/a
>
<
a
href
=
{
latest
[
this
.
state
.
platform
].
url
}
>
{
latest
[
this
.
state
.
platform
].
url
?
(
<
Button
type
=
"
primary
"
icon
=
"
download
"
><
FormattedMessage
id
=
{
"
CardAction1
"
}
/></
Button
>
)
:
(
<
Button
type
=
"
primary
"
icon
=
"
download
"
disabled
>
loading
...
<
/Button
>
)}
<
/a
>
<
/Card
>
<
/Card
>
<
/Col
>
<
/Col
>
...
@@ -229,7 +229,10 @@ export default class App extends Component {
...
@@ -229,7 +229,10 @@ export default class App extends Component {
<
p
className
=
"
App-Card-content
"
>
<
p
className
=
"
App-Card-content
"
>
<
FormattedMessage
id
=
{
"
CardContent1
"
}
/
>
<
FormattedMessage
id
=
{
"
CardContent1
"
}
/
>
<
/p
>
<
/p
>
<
a
href
=
""
><
Button
type
=
"
primary
"
icon
=
"
download
"
><
FormattedMessage
id
=
{
"
CardAction1
"
}
/></
Button
><
/a
>
<
a
href
=
{
latest
[
this
.
state
.
platform
].
url
}
>
{
latest
[
this
.
state
.
platform
].
url
?
(
<
Button
type
=
"
primary
"
icon
=
"
download
"
><
FormattedMessage
id
=
{
"
CardAction1
"
}
/></
Button
>
)
:
(
<
Button
type
=
"
primary
"
icon
=
"
download
"
disabled
>
loading
...
<
/Button
>
)}
<
/a
>
<
/Card
>
<
/Card
>
<
/Col
>
<
/Col
>
<
/Row
>
<
/Row
>
...
@@ -287,9 +290,14 @@ export default class App extends Component {
...
@@ -287,9 +290,14 @@ export default class App extends Component {
<
Col
span
=
"
14
"
>
<
Col
span
=
"
14
"
>
<
p
id
=
"
Welcome
"
><
FormattedMessage
id
=
{
"
Welcome
"
}
/></
p
>
<
p
id
=
"
Welcome
"
><
FormattedMessage
id
=
{
"
Welcome
"
}
/></
p
>
<
a
href
=
{
latest
[
this
.
state
.
platform
].
url
}
>
<
a
href
=
{
latest
[
this
.
state
.
platform
].
url
}
>
<
Button
id
=
"
downloadbot
"
type
=
"
primary
"
icon
=
"
download
"
size
=
'
large
'
>
{
latest
[
this
.
state
.
platform
].
url
?
<
FormattedMessage
id
=
{
"
Download
"
}
/
>
(
<
Button
id
=
"
downloadbot
"
type
=
"
primary
"
icon
=
"
download
"
size
=
'
large
'
>
<
/Button
>
<
FormattedMessage
id
=
{
"
Download
"
}
/
>
<
/Button>
)
:
(
<
Button
id
=
"
downloadbot
"
type
=
"
primary
"
icon
=
"
download
"
size
=
'
large
'
disabled
>
loading
...
<
/Button
>
)}
<
/a
>
<
/a
>
<
/Col
>
<
/Col
>
<
Col
span
=
"
10
"
>
<
Col
span
=
"
10
"
>
...
@@ -301,9 +309,14 @@ export default class App extends Component {
...
@@ -301,9 +309,14 @@ export default class App extends Component {
<
Col
span
=
"
24
"
>
<
Col
span
=
"
24
"
>
<
p
id
=
"
Welcome
"
><
FormattedMessage
id
=
{
"
Welcome
"
}
/></
p
>
<
p
id
=
"
Welcome
"
><
FormattedMessage
id
=
{
"
Welcome
"
}
/></
p
>
<
a
href
=
{
latest
[
this
.
state
.
platform
].
url
}
>
<
a
href
=
{
latest
[
this
.
state
.
platform
].
url
}
>
<
Button
id
=
"
downloadbot
"
type
=
"
primary
"
icon
=
"
download
"
size
=
'
large
'
>
{
latest
[
this
.
state
.
platform
].
url
?
<
FormattedMessage
id
=
{
"
Download
"
}
/
>
(
<
Button
id
=
"
downloadbot
"
type
=
"
primary
"
icon
=
"
download
"
size
=
'
large
'
>
<
/Button
>
<
FormattedMessage
id
=
{
"
Download
"
}
/
>
<
/Button>
)
:
(
<
Button
id
=
"
downloadbot
"
type
=
"
primary
"
icon
=
"
download
"
size
=
'
large
'
disabled
>
loading
...
<
/Button
>
)}
<
/a
>
<
/a
>
<
p
id
=
"
requirments
"
><
FormattedMessage
id
=
{
"
SystemRequirements
"
}
/></
p
>
<
p
id
=
"
requirments
"
><
FormattedMessage
id
=
{
"
SystemRequirements
"
}
/></
p
>
<
/Col
>
<
/Col
>
...
...
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