Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
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
syntax_j
mycard
Commits
79f3cb7d
Commit
79f3cb7d
authored
May 14, 2017
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reboot
Signed-off-by:
zh99998
<
zh99998@gmail.com
>
parent
eb17e967
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
62 additions
and
66 deletions
+62
-66
.vscode/settings.json
.vscode/settings.json
+0
-3
app/app-detail.component.ts
app/app-detail.component.ts
+11
-11
app/app.ts
app/app.ts
+6
-5
app/apps.service.ts
app/apps.service.ts
+13
-13
app/lobby.component.ts
app/lobby.component.ts
+7
-8
app/login.component.ts
app/login.component.ts
+6
-6
app/ygopro.component.ts
app/ygopro.component.ts
+14
-14
package.json
package.json
+3
-3
tsconfig.json
tsconfig.json
+2
-3
No files found.
.vscode/settings.json
deleted
100644 → 0
View file @
eb17e967
{
"vsicons.presets.angular"
:
true
}
\ No newline at end of file
app/app-detail.component.ts
View file @
79f3cb7d
import
{
Component
,
OnInit
,
Input
,
ChangeDetectorRef
,
OnChanges
,
SimpleChanges
,
ElementRef
}
from
'
@angular/core
'
;
import
{
ChangeDetectorRef
,
Component
,
ElementRef
,
Input
,
OnChanges
,
OnInit
,
SimpleChanges
}
from
'
@angular/core
'
;
import
{
AppsService
}
from
'
./apps.service
'
;
import
{
AppsService
}
from
'
./apps.service
'
;
import
{
InstallOption
}
from
'
./install-option
'
;
import
{
InstallOption
}
from
'
./install-option
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
App
}
from
'
./app
'
;
import
{
App
}
from
'
./app
'
;
import
{
DownloadService
}
from
'
./download.service
'
;
import
{
DownloadService
}
from
'
./download.service
'
;
import
{
clipboard
,
remote
}
from
'
electron
'
;
import
{
clipboard
,
remote
}
from
'
electron
'
;
import
*
as
path
from
'
path
'
;
import
*
as
path
from
'
path
'
;
import
*
as
fs
from
'
fs
'
;
import
*
as
fs
from
'
fs
'
;
import
*
as
$
from
'
jquery
'
;
import
*
as
$
from
'
jquery
'
;
import
{
Points
}
from
'
./ygopro.component
'
;
import
{
Points
}
from
'
./ygopro.component
'
;
import
{
Http
,
URLSearchParams
}
from
'
@angular/http
'
;
import
{
Http
}
from
'
@angular/http
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
LoginService
}
from
'
./login.service
'
;
declare
const
Notification
:
any
;
declare
const
Notification
:
any
;
...
@@ -253,7 +253,7 @@ export class AppDetailComponent implements OnInit, OnChanges {
...
@@ -253,7 +253,7 @@ export class AppDetailComponent implements OnInit, OnChanges {
let
extname
=
path
.
extname
(
filename
).
slice
(
1
);
let
extname
=
path
.
extname
(
filename
).
slice
(
1
);
// let remote = require('electron').remote
// let remote = require('electron').remote
let
filePaths
=
await
new
Promise
((
resolve
,
reject
)
=>
{
let
filePaths
=
await
new
Promise
<
string
[]
>
((
resolve
,
reject
)
=>
{
remote
.
dialog
.
showOpenDialog
({
remote
.
dialog
.
showOpenDialog
({
filters
:
[{
name
:
filename
,
extensions
:
[
extname
]}],
filters
:
[{
name
:
filename
,
extensions
:
[
extname
]}],
properties
:
[
'
openFile
'
]
properties
:
[
'
openFile
'
]
...
...
app/app.ts
View file @
79f3cb7d
import
{
AppLocal
}
from
'
./app-local
'
;
import
{
AppLocal
}
from
'
./app-local
'
;
export
enum
Category
{
export
enum
Category
{
game
,
game
,
...
@@ -10,6 +10,7 @@ export enum Category {
...
@@ -10,6 +10,7 @@ export enum Category {
expansion
,
expansion
,
module
module
}
}
// export type CategoryString = 'game' | 'music' | 'book' | 'runtime' | 'emulator' | 'language' | 'expansion' | 'module'
// export enum DownloadStatus{
// export enum DownloadStatus{
// downloading,
// downloading,
...
@@ -55,7 +56,7 @@ export class App {
...
@@ -55,7 +56,7 @@ export class App {
description
:
string
;
// i18n
description
:
string
;
// i18n
author
:
string
;
// English Only
author
:
string
;
// English Only
homepage
:
string
;
homepage
:
string
;
developers
:
{
name
:
string
,
url
:
string
}[];
developers
:
{
name
:
string
,
url
:
string
}[];
released_at
:
Date
;
released_at
:
Date
;
category
:
Category
;
category
:
Category
;
parent
?:
App
;
parent
?:
App
;
...
@@ -64,7 +65,7 @@ export class App {
...
@@ -64,7 +65,7 @@ export class App {
references
:
Map
<
string
,
App
>
;
references
:
Map
<
string
,
App
>
;
dependencies
:
Map
<
string
,
App
>
;
dependencies
:
Map
<
string
,
App
>
;
locales
:
string
[];
locales
:
string
[];
news
:
{
title
:
string
,
url
:
string
,
image
:
string
,
updated_at
:
Date
}[];
news
:
{
title
:
string
,
url
:
string
,
image
:
string
,
updated_at
:
Date
}[];
network
:
any
;
network
:
any
;
tags
:
string
[];
tags
:
string
[];
version
:
string
;
version
:
string
;
...
@@ -78,7 +79,7 @@ export class App {
...
@@ -78,7 +79,7 @@ export class App {
cover
:
string
;
cover
:
string
;
background
:
string
;
background
:
string
;
price
:
{
[
currency
:
string
]:
string
};
price
:
{
[
currency
:
string
]:
string
};
key
?:
string
;
key
?:
string
;
static
downloadUrl
(
app
:
App
,
platform
:
string
,
locale
:
string
):
string
{
static
downloadUrl
(
app
:
App
,
platform
:
string
,
locale
:
string
):
string
{
...
@@ -168,7 +169,7 @@ export class App {
...
@@ -168,7 +169,7 @@ export class App {
this
.
released_at
=
app
.
released_at
;
this
.
released_at
=
app
.
released_at
;
this
.
author
=
app
.
author
;
this
.
author
=
app
.
author
;
this
.
homepage
=
app
.
homepage
;
this
.
homepage
=
app
.
homepage
;
this
.
category
=
Category
[
app
.
category
as
string
];
this
.
category
=
Category
[
<
string
>
app
.
category
];
this
.
actions
=
app
.
actions
;
this
.
actions
=
app
.
actions
;
this
.
dependencies
=
app
.
dependencies
;
this
.
dependencies
=
app
.
dependencies
;
this
.
parent
=
app
.
parent
;
this
.
parent
=
app
.
parent
;
...
...
app/apps.service.ts
View file @
79f3cb7d
import
{
ApplicationRef
,
EventEmitter
,
Injectable
,
NgZone
}
from
'
@angular/core
'
;
import
{
ApplicationRef
,
EventEmitter
,
Injectable
,
NgZone
}
from
'
@angular/core
'
;
import
{
Http
,
URLSearchParams
}
from
'
@angular/http
'
;
import
{
Http
}
from
'
@angular/http
'
;
import
*
as
crypto
from
'
crypto
'
;
import
*
as
crypto
from
'
crypto
'
;
import
{
Action
,
App
,
AppStatus
}
from
'
./app
'
;
import
{
Action
,
App
,
AppStatus
}
from
'
./app
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
*
as
fs
from
'
fs
'
;
import
*
as
fs
from
'
fs
'
;
import
{
createReadStream
,
createWriteStream
}
from
'
fs
'
;
import
{
createReadStream
,
createWriteStream
}
from
'
fs
'
;
import
*
as
path
from
'
path
'
;
import
*
as
path
from
'
path
'
;
import
*
as
child_process
from
'
child_process
'
;
import
*
as
child_process
from
'
child_process
'
;
import
{
ChildProcess
}
from
'
child_process
'
;
import
{
ChildProcess
}
from
'
child_process
'
;
import
{
remote
}
from
'
electron
'
;
import
{
remote
}
from
'
electron
'
;
import
'
rxjs/Rx
'
;
import
'
rxjs/Rx
'
;
import
*
as
readline
from
'
readline
'
;
import
*
as
readline
from
'
readline
'
;
import
{
AppLocal
}
from
'
./app-local
'
;
import
{
AppLocal
}
from
'
./app-local
'
;
import
*
as
glob
from
'
glob
'
;
import
*
as
glob
from
'
glob
'
;
import
*
as
ini
from
'
ini
'
;
import
*
as
ini
from
'
ini
'
;
import
{
DownloadService
,
DownloadStatus
}
from
'
./download.service
'
;
import
{
DownloadService
,
DownloadStatus
}
from
'
./download.service
'
;
import
{
InstallOption
}
from
'
./install-option
'
;
import
{
InstallOption
}
from
'
./install-option
'
;
import
{
ComparableSet
}
from
'
./shared/ComparableSet
'
;
import
{
ComparableSet
}
from
'
./shared/ComparableSet
'
;
import
{
Observable
,
Observer
}
from
'
rxjs/Rx
'
;
import
{
Observable
,
Observer
}
from
'
rxjs/Rx
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
Timer
=
NodeJS
.
Timer
;
import
Timer
=
NodeJS
.
Timer
;
import
ReadableStream
=
NodeJS
.
ReadableStream
;
import
ReadableStream
=
NodeJS
.
ReadableStream
;
const
sudo
=
require
(
'
electron-sudo
'
);
const
sudo
=
require
(
'
electron-sudo
'
);
...
...
app/lobby.component.ts
View file @
79f3cb7d
/**
/**
* Created by zh99998 on 16/9/2.
* Created by zh99998 on 16/9/2.
*/
*/
import
{
Component
,
OnInit
,
ChangeDetectorRef
,
ElementRef
,
ViewChild
}
from
'
@angular/core
'
;
import
{
ChangeDetectorRef
,
Component
,
ElementRef
,
OnInit
,
ViewChild
}
from
'
@angular/core
'
;
import
{
AppsService
}
from
'
./apps.service
'
;
import
{
AppsService
}
from
'
./apps.service
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
App
,
Category
}
from
'
./app
'
;
import
{
App
,
Category
}
from
'
./app
'
;
import
{
shell
}
from
'
electron
'
;
import
{
shell
}
from
'
electron
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
URLSearchParams
}
from
'
@angular/http
'
;
const
ReconnectingWebSocket
=
require
(
'
reconnecting-websocket
'
);
const
ReconnectingWebSocket
=
require
(
'
reconnecting-websocket
'
);
// import 'typeahead.js';
// import 'typeahead.js';
...
@@ -60,7 +59,7 @@ export class LobbyComponent implements OnInit {
...
@@ -60,7 +59,7 @@ export class LobbyComponent implements OnInit {
this
.
ref
.
detectChanges
();
this
.
ref
.
detectChanges
();
let
url
=
new
URL
(
'
wss://api.moecube.com:3100
'
);
let
url
=
new
URL
(
'
wss://api.moecube.com:3100
'
);
let
params
:
URLSearchParams
=
url
[
'
searchParams
'
]
;
let
params
:
URLSearchParams
=
url
.
searchParams
;
params
.
set
(
'
user_id
'
,
this
.
loginService
.
user
.
email
);
params
.
set
(
'
user_id
'
,
this
.
loginService
.
user
.
email
);
this
.
messages
=
new
ReconnectingWebSocket
(
url
);
this
.
messages
=
new
ReconnectingWebSocket
(
url
);
this
.
messages
.
onmessage
=
async
(
event
)
=>
{
this
.
messages
.
onmessage
=
async
(
event
)
=>
{
...
...
app/login.component.ts
View file @
79f3cb7d
/**
/**
* Created by zh99998 on 16/9/2.
* Created by zh99998 on 16/9/2.
*/
*/
import
{
Component
}
from
'
@angular/core
'
;
import
{
Component
}
from
'
@angular/core
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
*
as
crypto
from
'
crypto
'
;
import
*
as
crypto
from
'
crypto
'
;
import
{
shell
}
from
'
electron
'
;
import
{
shell
}
from
'
electron
'
;
declare
const
URLSearchParams
:
any
;
@
Component
({
@
Component
({
moduleId
:
module
.
id
,
moduleId
:
module
.
id
,
...
@@ -51,6 +48,9 @@ export class LoginComponent {
...
@@ -51,6 +48,9 @@ export class LoginComponent {
return
;
return
;
}
}
let
token
=
new
URL
(
return_url
)[
'
searchParams
'
].
get
(
'
sso
'
);
let
token
=
new
URL
(
return_url
)[
'
searchParams
'
].
get
(
'
sso
'
);
if
(
!
token
)
{
return
;
}
let
user
=
this
.
toObject
(
new
URLSearchParams
(
Buffer
.
from
(
token
,
'
base64
'
).
toString
()));
let
user
=
this
.
toObject
(
new
URLSearchParams
(
Buffer
.
from
(
token
,
'
base64
'
).
toString
()));
this
.
loginService
.
login
(
user
);
this
.
loginService
.
login
(
user
);
}
}
...
...
app/ygopro.component.ts
View file @
79f3cb7d
...
@@ -2,29 +2,29 @@
...
@@ -2,29 +2,29 @@
* Created by zh99998 on 16/9/2.
* Created by zh99998 on 16/9/2.
*/
*/
import
{
import
{
Component
,
OnInit
,
ChangeDetectorRef
,
ChangeDetectorRef
,
Input
,
Component
,
ElementRef
,
EventEmitter
,
EventEmitter
,
Out
put
,
In
put
,
OnDestroy
,
OnDestroy
,
ViewChild
,
OnInit
,
ElementRef
Output
,
ViewChild
}
from
'
@angular/core
'
;
}
from
'
@angular/core
'
;
import
*
as
fs
from
'
fs
'
;
import
*
as
fs
from
'
fs
'
;
import
*
as
path
from
'
path
'
;
import
*
as
path
from
'
path
'
;
import
*
as
child_process
from
'
child_process
'
;
import
*
as
child_process
from
'
child_process
'
;
import
{
remote
,
shell
}
from
'
electron
'
;
import
{
remote
,
shell
}
from
'
electron
'
;
import
*
as
ini
from
'
ini
'
;
import
*
as
ini
from
'
ini
'
;
import
{
EncodeOptions
}
from
'
ini
'
;
import
{
EncodeOptions
}
from
'
ini
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
App
}
from
'
./app
'
;
import
{
App
}
from
'
./app
'
;
import
{
Http
,
Headers
,
URLSearchParams
}
from
'
@angular/http
'
;
import
{
Headers
,
Http
}
from
'
@angular/http
'
;
import
'
rxjs/Rx
'
;
import
'
rxjs/Rx
'
;
import
{
ISubscription
}
from
'
rxjs/Subscription
'
;
import
{
ISubscription
}
from
'
rxjs/Subscription
'
;
import
{
AppsService
}
from
'
./apps.service
'
;
import
{
AppsService
}
from
'
./apps.service
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
*
as
$
from
'
jquery
'
;
import
*
as
$
from
'
jquery
'
;
import
Timer
=
NodeJS
.
Timer
;
import
Timer
=
NodeJS
.
Timer
;
import
WillNavigateEvent
=
Electron
.
WebViewElement
.
WillNavigateEvent
;
import
WillNavigateEvent
=
Electron
.
WebViewElement
.
WillNavigateEvent
;
...
...
package.json
View file @
79f3cb7d
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
"
aria2
"
:
"
latest
"
,
"
aria2
"
:
"
latest
"
,
"
bootstrap
"
:
"
next
"
,
"
bootstrap
"
:
"
next
"
,
"
candy
"
:
"
https://github.com/moecube/candy/releases/download/v2.2.0/candy.tar.gz
"
,
"
candy
"
:
"
https://github.com/moecube/candy/releases/download/v2.2.0/candy.tar.gz
"
,
"
candy-shop
"
:
"
zh99998/candy-plugins#patch-5
"
,
"
candy-shop
"
:
"
latest
"
,
"
core-js
"
:
"
latest
"
,
"
core-js
"
:
"
latest
"
,
"
electron-auto-updater
"
:
"
latest
"
,
"
electron-auto-updater
"
:
"
latest
"
,
"
electron-is-dev
"
:
"
latest
"
,
"
electron-is-dev
"
:
"
latest
"
,
...
@@ -43,10 +43,10 @@
...
@@ -43,10 +43,10 @@
"
jquery
"
:
"
latest
"
,
"
jquery
"
:
"
latest
"
,
"
marked
"
:
"
latest
"
,
"
marked
"
:
"
latest
"
,
"
raw-socket
"
:
"
latest
"
,
"
raw-socket
"
:
"
latest
"
,
"
reconnecting-websocket
"
:
"
^3.0.3
"
,
"
reconnecting-websocket
"
:
"
latest
"
,
"
reflect-metadata
"
:
"
latest
"
,
"
reflect-metadata
"
:
"
latest
"
,
"
rxjs
"
:
"
latest
"
,
"
rxjs
"
:
"
latest
"
,
"
systemjs
"
:
"
moecube/systemjs#moecube
"
,
"
systemjs
"
:
"
latest
"
,
"
systemjs-plugin-text
"
:
"
latest
"
,
"
systemjs-plugin-text
"
:
"
latest
"
,
"
tether
"
:
"
latest
"
,
"
tether
"
:
"
latest
"
,
"
typeahead.js
"
:
"
latest
"
,
"
typeahead.js
"
:
"
latest
"
,
...
...
tsconfig.json
View file @
79f3cb7d
...
@@ -8,11 +8,10 @@
...
@@ -8,11 +8,10 @@
"experimentalDecorators"
:
true
,
"experimentalDecorators"
:
true
,
"lib"
:
[
"lib"
:
[
"es2017"
,
"es2017"
,
"dom"
"dom
.iterable
"
],
],
"noImplicitAny"
:
true
,
"suppressImplicitAnyIndexErrors"
:
true
,
"suppressImplicitAnyIndexErrors"
:
true
,
"strict
NullChecks
"
:
true
,
"strict"
:
true
,
"skipLibCheck"
:
true
"skipLibCheck"
:
true
},
},
"exclude"
:
[
"exclude"
:
[
...
...
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