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
e22da6ac
Commit
e22da6ac
authored
Jan 21, 2017
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Init
parent
b7239608
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
app/store.component.ts
app/store.component.ts
+5
-0
tslint.json
tslint.json
+0
-1
No files found.
app/store.component.ts
View file @
e22da6ac
...
@@ -10,6 +10,7 @@ import 'rxjs/Rx';
...
@@ -10,6 +10,7 @@ import 'rxjs/Rx';
})
})
export
class
StoreComponent
implements
OnInit
{
export
class
StoreComponent
implements
OnInit
{
signups
:
number
;
signups
:
number
;
online
:
number
;
constructor
(
private
http
:
Http
)
{
constructor
(
private
http
:
Http
)
{
}
}
...
@@ -21,5 +22,9 @@ export class StoreComponent implements OnInit {
...
@@ -21,5 +22,9 @@ export class StoreComponent implements OnInit {
let
data
=
await
this
.
http
.
get
(
'
https://ygobbs.com/admin/dashboard.json
'
,
{
search
:
params
})
let
data
=
await
this
.
http
.
get
(
'
https://ygobbs.com/admin/dashboard.json
'
,
{
search
:
params
})
.
map
(
response
=>
response
.
json
()).
toPromise
();
.
map
(
response
=>
response
.
json
()).
toPromise
();
this
.
signups
=
data
.
global_reports
.
find
((
item
:
any
)
=>
item
.
type
===
'
signups
'
).
total
;
this
.
signups
=
data
.
global_reports
.
find
((
item
:
any
)
=>
item
.
type
===
'
signups
'
).
total
;
let
document
=
await
this
.
http
.
get
(
'
https://chat.mycard.moe/stats/online
'
)
.
map
(
response
=>
new
DOMParser
().
parseFromString
(
response
.
text
(),
'
text/xml
'
)).
toPromise
();
this
.
online
=
parseInt
(
document
.
querySelector
(
'
#content > table > tbody > tr:nth-child(2) > td:nth-child(2)
'
).
textContent
);
}
}
}
}
tslint.json
View file @
e22da6ac
...
@@ -62,7 +62,6 @@
...
@@ -62,7 +62,6 @@
true
,
true
,
"single"
"single"
],
],
"radix"
:
true
,
"semicolon"
:
[
"semicolon"
:
[
"always"
"always"
],
],
...
...
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