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
8de4a1f3
Commit
8de4a1f3
authored
Aug 26, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recursive load child ygopro data
parent
e6319743
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
70 additions
and
47 deletions
+70
-47
app/about.component.ts
app/about.component.ts
+1
-0
app/app-local.ts
app/app-local.ts
+1
-0
app/app.ts
app/app.ts
+1
-1
app/apps.service.ts
app/apps.service.ts
+1
-2
app/candy.component.ts
app/candy.component.ts
+1
-1
app/download.service.ts
app/download.service.ts
+1
-1
app/error-handler.ts
app/error-handler.ts
+2
-2
app/i18n-providers.ts
app/i18n-providers.ts
+1
-1
app/install-option.ts
app/install-option.ts
+1
-0
app/lobby.component.ts
app/lobby.component.ts
+7
-6
app/login.component.ts
app/login.component.ts
+3
-3
app/mycard.component.ts
app/mycard.component.ts
+5
-4
app/mycard.module.ts
app/mycard.module.ts
+18
-19
app/network.component.ts
app/network.component.ts
+2
-2
app/roster.component.ts
app/roster.component.ts
+2
-1
app/store.component.ts
app/store.component.ts
+1
-0
app/ygopro.component.ts
app/ygopro.component.ts
+21
-4
systemjs.config.js
systemjs.config.js
+1
-0
No files found.
app/about.component.ts
View file @
8de4a1f3
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
* Created by zh99998 on 16/9/2.
* Created by zh99998 on 16/9/2.
*/
*/
import
{
Component
}
from
'
@angular/core
'
;
import
{
Component
}
from
'
@angular/core
'
;
@
Component
({
@
Component
({
moduleId
:
module
.
id
,
moduleId
:
module
.
id
,
selector
:
'
about
'
,
selector
:
'
about
'
,
...
...
app/app-local.ts
View file @
8de4a1f3
import
{
App
}
from
'
./app
'
;
import
{
App
}
from
'
./app
'
;
/**
/**
* Created by zh99998 on 16/9/6.
* Created by zh99998 on 16/9/6.
*/
*/
...
...
app/app.ts
View file @
8de4a1f3
import
{
AppLocal
}
from
'
./app-local
'
;
import
{
AppLocal
}
from
'
./app-local
'
;
import
*
as
path
from
'
path
'
;
import
*
as
path
from
'
path
'
;
import
*
as
ini
from
'
ini
'
;
import
*
as
ini
from
'
ini
'
;
import
*
as
fs
from
'
fs
'
;
import
*
as
fs
from
'
fs
'
;
...
...
app/apps.service.ts
View file @
8de4a1f3
...
@@ -19,9 +19,8 @@ import {LoginService} from './login.service';
...
@@ -19,9 +19,8 @@ import {LoginService} from './login.service';
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
ComparableSet
}
from
'
./shared/ComparableSet
'
;
import
{
ComparableSet
}
from
'
./shared/ComparableSet
'
;
import
{
AppsJson
}
from
'
./apps-json-type
'
;
import
{
AppsJson
}
from
'
./apps-json-type
'
;
import
Timer
=
NodeJS
.
Timer
;
import
ReadableStream
=
NodeJS
.
ReadableStream
;
import
*
as
os
from
'
os
'
;
import
*
as
os
from
'
os
'
;
import
Timer
=
NodeJS
.
Timer
;
const
Logger
=
{
const
Logger
=
{
info
:
(...
message
:
any
[])
=>
{
info
:
(...
message
:
any
[])
=>
{
...
...
app/candy.component.ts
View file @
8de4a1f3
...
@@ -23,7 +23,7 @@ $.fn.init = new Proxy($.fn.init, {
...
@@ -23,7 +23,7 @@ $.fn.init = new Proxy($.fn.init, {
window
[
'
jQuery
'
]
=
$
;
window
[
'
jQuery
'
]
=
$
;
import
{
Component
,
ViewEncapsulation
,
OnInit
,
Input
,
OnChanges
,
SimpleChanges
,
ElementRef
}
from
'
@angular/core
'
;
import
{
Component
,
ElementRef
,
Input
,
OnChanges
,
OnInit
,
SimpleChanges
,
ViewEncapsulation
}
from
'
@angular/core
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
App
}
from
'
./app
'
;
import
{
App
}
from
'
./app
'
;
...
...
app/download.service.ts
View file @
8de4a1f3
/**
/**
* Created by weijian on 2016/10/26.
* Created by weijian on 2016/10/26.
*/
*/
import
{
Injectable
,
NgZone
,
EventEmitter
}
from
'
@angular/core
'
;
import
{
EventEmitter
,
Injectable
,
NgZone
}
from
'
@angular/core
'
;
import
{
Http
}
from
'
@angular/http
'
;
import
{
Http
}
from
'
@angular/http
'
;
// import {error} from 'util';
// import {error} from 'util';
// import Timer = NodeJS.Timer;
// import Timer = NodeJS.Timer;
...
...
app/error-handler.ts
View file @
8de4a1f3
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* Created by zh99998 on 2017/6/1.
* Created by zh99998 on 2017/6/1.
*/
*/
import
*
as
Raven
from
'
raven-js
'
;
import
*
as
Raven
from
'
raven-js
'
;
import
{
ErrorHandler
}
from
'
@angular/core
'
;
import
{
ErrorHandler
}
from
'
@angular/core
'
;
Raven
Raven
.
config
(
'
https://2c5fa0d0f13c43b5b96346f4eff2ea60@sentry.io/174769
'
)
.
config
(
'
https://2c5fa0d0f13c43b5b96346f4eff2ea60@sentry.io/174769
'
)
...
...
app/i18n-providers.ts
View file @
8de4a1f3
import
{
TRANSLATIONS
,
TRANSLATIONS_FORMAT
,
LOCALE_ID
}
from
'
@angular/core
'
;
import
{
LOCALE_ID
,
TRANSLATIONS
,
TRANSLATIONS_FORMAT
}
from
'
@angular/core
'
;
import
{
remote
}
from
'
electron
'
;
import
{
remote
}
from
'
electron
'
;
export
async
function
getTranslationProviders
():
Promise
<
Object
[]
>
{
export
async
function
getTranslationProviders
():
Promise
<
Object
[]
>
{
...
...
app/install-option.ts
View file @
8de4a1f3
import
{
App
}
from
'
./app
'
;
import
{
App
}
from
'
./app
'
;
import
*
as
path
from
'
path
'
;
import
*
as
path
from
'
path
'
;
/**
/**
* Created by weijian on 2016/10/24.
* Created by weijian on 2016/10/24.
*/
*/
...
...
app/lobby.component.ts
View file @
8de4a1f3
/**
/**
* Created by zh99998 on 16/9/2.
* Created by zh99998 on 16/9/2.
*/
*/
import
{
ChangeDetectorRef
,
Component
,
ElementRef
,
OnInit
,
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
'
;
const
ReconnectingWebSocket
=
require
(
'
reconnecting-websocket
'
);
const
ReconnectingWebSocket
=
require
(
'
reconnecting-websocket
'
);
// import 'typeahead.js';
// import 'typeahead.js';
...
...
app/login.component.ts
View file @
8de4a1f3
/**
/**
* 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
'
;
@
Component
({
@
Component
({
moduleId
:
module
.
id
,
moduleId
:
module
.
id
,
...
...
app/mycard.component.ts
View file @
8de4a1f3
import
{
ChangeDetectorRef
,
Component
,
ElementRef
,
OnInit
,
Renderer
,
ViewChild
}
from
'
@angular/core
'
;
import
{
ChangeDetectorRef
,
Component
,
ElementRef
,
OnInit
,
Renderer
,
ViewChild
}
from
'
@angular/core
'
;
import
'
bootstrap
'
;
import
'
bootstrap
'
;
import
{
remote
,
shell
}
from
'
electron
'
;
import
{
remote
,
shell
}
from
'
electron
'
;
import
*
as
$
from
'
jquery
'
;
import
*
as
$
from
'
jquery
'
;
import
*
as
Tether
from
'
tether
'
;
import
*
as
Tether
from
'
tether
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
window
[
'
Tether
'
]
=
Tether
;
window
[
'
Tether
'
]
=
Tether
;
const
autoUpdater
:
Electron
.
AutoUpdater
=
remote
.
getGlobal
(
'
autoUpdater
'
);
const
autoUpdater
:
Electron
.
AutoUpdater
=
remote
.
getGlobal
(
'
autoUpdater
'
);
...
...
app/mycard.module.ts
View file @
8de4a1f3
import
{
ErrorHandler
,
LOCALE_ID
,
NgModule
,
NO_ERRORS_SCHEMA
}
from
'
@angular/core
'
;
import
{
LOCALE_ID
,
NgModule
,
NO_ERRORS_SCHEMA
}
from
'
@angular/core
'
;
import
{
BrowserModule
}
from
'
@angular/platform-browser
'
;
import
{
BrowserModule
}
from
'
@angular/platform-browser
'
;
import
{
FormsModule
,
ReactiveFormsModule
}
from
'
@angular/forms
'
;
import
{
FormsModule
,
ReactiveFormsModule
}
from
'
@angular/forms
'
;
import
{
HttpModule
}
from
'
@angular/http
'
;
import
{
HttpModule
}
from
'
@angular/http
'
;
import
{
MyCardComponent
}
from
'
./mycard.component
'
;
import
{
MyCardComponent
}
from
'
./mycard.component
'
;
import
{
LoginComponent
}
from
'
./login.component
'
;
import
{
LoginComponent
}
from
'
./login.component
'
;
import
{
StoreComponent
}
from
'
./store.component
'
;
import
{
StoreComponent
}
from
'
./store.component
'
;
import
{
LobbyComponent
}
from
'
./lobby.component
'
;
import
{
LobbyComponent
}
from
'
./lobby.component
'
;
import
{
AppDetailComponent
}
from
'
./app-detail.component
'
;
import
{
AppDetailComponent
}
from
'
./app-detail.component
'
;
import
{
RosterComponent
}
from
'
./roster.component
'
;
import
{
RosterComponent
}
from
'
./roster.component
'
;
import
{
YGOProComponent
}
from
'
./ygopro.component
'
;
import
{
YGOProComponent
}
from
'
./ygopro.component
'
;
import
{
AppsService
}
from
'
./apps.service
'
;
import
{
AppsService
}
from
'
./apps.service
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
DownloadService
}
from
'
./download.service
'
;
import
{
DownloadService
}
from
'
./download.service
'
;
import
{
AboutComponent
}
from
'
./about.component
'
;
import
{
AboutComponent
}
from
'
./about.component
'
;
import
{
CandyComponent
}
from
'
./candy.component
'
;
import
{
CandyComponent
}
from
'
./candy.component
'
;
import
{
RavenErrorHandler
}
from
'
./error-handler
'
;
import
{
NetworkComponent
}
from
'
./network.component
'
;
import
{
NetworkComponent
}
from
'
./network.component
'
;
export
function
settingsService_getLocale
(
settingsService
:
SettingsService
)
{
export
function
settingsService_getLocale
(
settingsService
:
SettingsService
)
{
return
settingsService
.
getLocale
();
return
settingsService
.
getLocale
();
...
...
app/network.component.ts
View file @
8de4a1f3
import
{
ChangeDetectorRef
,
Component
,
ElementRef
,
Input
,
OnChanges
,
OnInit
,
SimpleChanges
,
Injectable
}
from
'
@angular/core
'
;
import
{
Component
,
Injectable
,
Input
}
from
'
@angular/core
'
;
import
{
AppsService
}
from
'
./apps.service
'
;
import
{
AppsService
}
from
'
./apps.service
'
;
import
{
App
}
from
'
./app
'
;
import
{
App
}
from
'
./app
'
;
@
Component
({
@
Component
({
...
...
app/roster.component.ts
View file @
8de4a1f3
/**
/**
* Created by zh99998 on 16/9/2.
* Created by zh99998 on 16/9/2.
*/
*/
import
{
Component
,
Input
,
EventEmitter
,
Output
,
OnInit
,
OnChanges
}
from
'
@angular/core
'
;
import
{
Component
,
EventEmitter
,
Input
,
OnChanges
,
OnInit
,
Output
}
from
'
@angular/core
'
;
@
Component
({
@
Component
({
moduleId
:
module
.
id
,
moduleId
:
module
.
id
,
selector
:
'
roster
'
,
selector
:
'
roster
'
,
...
...
app/store.component.ts
View file @
8de4a1f3
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
* Created by zh99998 on 16/9/2.
* Created by zh99998 on 16/9/2.
*/
*/
import
{
Component
}
from
'
@angular/core
'
;
import
{
Component
}
from
'
@angular/core
'
;
@
Component
({
@
Component
({
moduleId
:
module
.
id
,
moduleId
:
module
.
id
,
selector
:
'
store
'
,
selector
:
'
store
'
,
...
...
app/ygopro.component.ts
View file @
8de4a1f3
...
@@ -5,17 +5,17 @@ import {ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnDestroy
...
@@ -5,17 +5,17 @@ import {ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnDestroy
import
{
Headers
,
Http
}
from
'
@angular/http
'
;
import
{
Headers
,
Http
}
from
'
@angular/http
'
;
import
{
clipboard
,
remote
,
shell
}
from
'
electron
'
;
import
{
clipboard
,
remote
,
shell
}
from
'
electron
'
;
import
*
as
fs
from
'
fs-extra
'
;
import
*
as
fs
from
'
fs-extra
'
;
import
*
as
ini
from
'
ini
'
;
import
*
as
$
from
'
jquery
'
;
import
*
as
$
from
'
jquery
'
;
import
*
as
path
from
'
path
'
;
import
*
as
path
from
'
path
'
;
import
'
rxjs/Rx
'
;
import
'
rxjs/Rx
'
;
import
{
ISubscription
}
from
'
rxjs/Subscription
'
;
import
{
ISubscription
}
from
'
rxjs/Subscription
'
;
import
{
App
,
AppStatus
}
from
'
./app
'
;
import
{
App
}
from
'
./app
'
;
import
{
AppsService
}
from
'
./apps.service
'
;
import
{
AppsService
}
from
'
./apps.service
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
LoginService
}
from
'
./login.service
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
Timer
=
NodeJS
.
Timer
;
import
Timer
=
NodeJS
.
Timer
;
import
WillNavigateEvent
=
Electron
.
WillNavigateEvent
;
import
WillNavigateEvent
=
Electron
.
WillNavigateEvent
;
import
_
=
require
(
'
lodash
'
);
interface
SystemConf
{
interface
SystemConf
{
use_d3d
:
string
;
use_d3d
:
string
;
...
@@ -278,8 +278,23 @@ export class YGOProComponent implements OnInit, OnDestroy {
...
@@ -278,8 +278,23 @@ export class YGOProComponent implements OnInit, OnDestroy {
});
});
}
}
getYGOProData
(
app
:
App
)
{
const
ygoproData
=
<
YGOProData
>
app
.
data
;
for
(
const
child
of
this
.
appsService
.
findChildren
(
app
))
{
if
(
child
.
isYGOPro
)
{
const
childData
=
this
.
getYGOProData
(
child
);
_
.
mergeWith
(
ygoproData
,
childData
,
(
objValue
,
srcValue
)
=>
{
if
(
_
.
isArray
(
objValue
))
{
return
objValue
.
concat
(
srcValue
);
}
});
}
}
return
ygoproData
;
}
async
ngOnInit
()
{
async
ngOnInit
()
{
const
ygoproData
=
<
YGOProData
>
this
.
app
.
data
;
const
ygoproData
=
this
.
getYGOProData
(
this
.
app
)
;
this
.
servers
=
ygoproData
.
servers
;
this
.
servers
=
ygoproData
.
servers
;
this
.
selectableServers
=
this
.
servers
.
filter
(
s
=>
!
s
.
hidden
);
this
.
selectableServers
=
this
.
servers
.
filter
(
s
=>
!
s
.
hidden
);
this
.
currentServer
=
this
.
selectableServers
[
0
];
this
.
currentServer
=
this
.
selectableServers
[
0
];
...
@@ -293,11 +308,12 @@ export class YGOProComponent implements OnInit, OnDestroy {
...
@@ -293,11 +308,12 @@ export class YGOProComponent implements OnInit, OnDestroy {
}
}
if
(
ygoproData
.
ygopro
.
lastDeckFormat
)
{
if
(
ygoproData
.
ygopro
.
lastDeckFormat
)
{
//console.log(`Deck format pattern: ${ygoproData.ygopro.lastDeckFormat}`)
//
console.log(`Deck format pattern: ${ygoproData.ygopro.lastDeckFormat}`)
this
.
lastDeckFormat
=
new
RegExp
(
ygoproData
.
ygopro
.
lastDeckFormat
);
this
.
lastDeckFormat
=
new
RegExp
(
ygoproData
.
ygopro
.
lastDeckFormat
);
}
}
this
.
system_conf
=
this
.
app
.
systemConfPath
;
this
.
system_conf
=
this
.
app
.
systemConfPath
;
console
.
log
(
`Will load system conf file from
${
this
.
system_conf
}
`
);
await
this
.
refresh
(
true
);
await
this
.
refresh
(
true
);
let
modal
=
$
(
'
#game-list-modal
'
);
let
modal
=
$
(
'
#game-list-modal
'
);
...
@@ -549,6 +565,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
...
@@ -549,6 +565,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
return
null
;
return
null
;
}
}
try
{
try
{
// console.log(`Loading system conf from ${this.system_conf}`)
let
data
=
await
fs
.
readFile
(
this
.
system_conf
,
{
encoding
:
'
utf-8
'
});
let
data
=
await
fs
.
readFile
(
this
.
system_conf
,
{
encoding
:
'
utf-8
'
});
return
data
;
return
data
;
}
catch
(
e
)
{
}
catch
(
e
)
{
...
...
systemjs.config.js
View file @
8de4a1f3
...
@@ -71,6 +71,7 @@ System.config({
...
@@ -71,6 +71,7 @@ System.config({
"
electron
"
:
"
@node/electron
"
,
"
electron
"
:
"
@node/electron
"
,
"
ini
"
:
"
@node/ini
"
,
"
ini
"
:
"
@node/ini
"
,
"
mustache
"
:
"
@node/mustache
"
,
"
mustache
"
:
"
@node/mustache
"
,
"
lodash
"
:
"
@node/lodash
"
,
"
mkdirp
"
:
"
@node/mkdirp
"
,
"
mkdirp
"
:
"
@node/mkdirp
"
,
"
aria2
"
:
"
@node/aria2
"
,
"
aria2
"
:
"
@node/aria2
"
,
"
electron-sudo
"
:
"
@node/electron-sudo
"
,
"
electron-sudo
"
:
"
@node/electron-sudo
"
,
...
...
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