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
xiaoye
mycard
Commits
ba81af1e
Commit
ba81af1e
authored
Oct 29, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
target es6
parent
0a5ddc82
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
55 deletions
+70
-55
app/mycard.component.ts
app/mycard.component.ts
+2
-1
app/ygopro.component.ts
app/ygopro.component.ts
+2
-2
aria2.js
aria2.js
+12
-13
aria2.js.map
aria2.js.map
+10
-1
systemjs.config.js
systemjs.config.js
+39
-36
tsconfig.json
tsconfig.json
+5
-1
typings.json
typings.json
+0
-1
No files found.
app/mycard.component.ts
View file @
ba81af1e
import
{
Component
,
Renderer
}
from
"
@angular/core
"
;
import
{
Component
,
Renderer
}
from
"
@angular/core
"
;
import
{
TranslateService
}
from
"
ng2-translate
"
;
import
{
TranslateService
}
from
"
ng2-translate
"
;
import
{
remote
}
from
"
electron
"
;
import
{
remote
}
from
"
electron
"
;
import
{
LoginService
}
from
"
./login.service
"
;
@
Component
({
@
Component
({
selector
:
'
mycard
'
,
selector
:
'
mycard
'
,
...
@@ -14,7 +15,7 @@ export class MyCardComponent {
...
@@ -14,7 +15,7 @@ export class MyCardComponent {
platform
=
process
.
platform
;
platform
=
process
.
platform
;
constructor
(
private
renderer
:
Renderer
,
private
translate
:
TranslateService
)
{
constructor
(
private
renderer
:
Renderer
,
private
translate
:
TranslateService
,
private
loginService
:
LoginService
)
{
renderer
.
listenGlobal
(
'
window
'
,
'
message
'
,
(
event
)
=>
{
renderer
.
listenGlobal
(
'
window
'
,
'
message
'
,
(
event
)
=>
{
console
.
log
(
event
);
console
.
log
(
event
);
// Do something with 'event'
// Do something with 'event'
...
...
app/ygopro.component.ts
View file @
ba81af1e
...
@@ -149,10 +149,10 @@ export class YGOProComponent implements OnInit {
...
@@ -149,10 +149,10 @@ export class YGOProComponent implements OnInit {
fix_fonts
=
(
data
)
=>
{
fix_fonts
=
(
data
)
=>
{
return
this
.
get_font
([
data
.
numfont
])
return
this
.
get_font
([
data
.
numfont
])
.
catch
(()
=>
this
.
get_font
(
this
.
numfont
[
process
.
platform
]).
then
(
font
=>
data
[
'
numfont
'
]
=
font
))
.
catch
(()
=>
this
.
get_font
(
this
.
numfont
[
process
.
platform
]).
then
(
font
=>
data
[
'
numfont
'
]
=
font
))
.
catch
()
.
catch
(
null
)
.
then
(()
=>
this
.
get_font
([
data
.
textfont
.
split
(
'
'
,
2
)[
0
]]))
.
then
(()
=>
this
.
get_font
([
data
.
textfont
.
split
(
'
'
,
2
)[
0
]]))
.
catch
(()
=>
this
.
get_font
(
this
.
textfont
[
process
.
platform
]).
then
(
font
=>
data
[
'
textfont
'
]
=
`
${
font
}
14`
))
.
catch
(()
=>
this
.
get_font
(
this
.
textfont
[
process
.
platform
]).
then
(
font
=>
data
[
'
textfont
'
]
=
`
${
font
}
14`
))
.
catch
()
.
catch
(
null
)
.
then
(()
=>
data
)
.
then
(()
=>
data
)
};
};
...
...
aria2.js
View file @
ba81af1e
...
@@ -2,28 +2,27 @@
...
@@ -2,28 +2,27 @@
/**
/**
* Created by weijian on 2016/10/27.
* Created by weijian on 2016/10/27.
*/
*/
var
Rx
=
require
(
"
rxjs/Rx
"
);
const
Rx
=
require
(
"
rxjs/Rx
"
);
var
ipcMain
=
require
(
'
electron
'
).
ipcMain
;
const
{
ipcMain
}
=
require
(
'
electron
'
)
;
var
child_process_1
=
require
(
"
child_process
"
);
const
child_process_1
=
require
(
"
child_process
"
);
// import * as Aria2 from "aria2";
// import * as Aria2 from "aria2";
var
Aria2
=
require
(
"
aria2
"
);
const
Aria2
=
require
(
"
aria2
"
);
var
a
=
(
createProcess
(
"
D:/Github/mycard/bin/aria2c.exe
"
,
[
'
--enable-rpc
'
,
'
--rpc-allow-origin-all
'
,
"
--continue
"
,
"
--split=10
"
,
"
--min-split-size=1M
"
,
"
--max-connection-per-server=10
"
]));
let
a
=
(
createProcess
(
"
D:/Github/mycard/bin/aria2c.exe
"
,
[
'
--enable-rpc
'
,
'
--rpc-allow-origin-all
'
,
"
--continue
"
,
"
--split=10
"
,
"
--min-split-size=1M
"
,
"
--max-connection-per-server=10
"
]));
a
.
on
(
'
error
'
,
function
(
error
)
{
a
.
on
(
'
error
'
,
(
error
)
=>
{
console
.
log
(
error
);
console
.
log
(
error
);
});
});
// console.log(Aria2,2);
// console.log(Aria2,2);
function
createProcess
(
aria2c_path
,
args
)
{
function
createProcess
(
aria2c_path
,
args
=
[])
{
if
(
args
===
void
0
)
{
args
=
[];
}
return
child_process_1
.
spawn
(
aria2c_path
,
args
);
return
child_process_1
.
spawn
(
aria2c_path
,
args
);
}
}
var
options
=
{
'
host
'
:
'
localhost
'
,
'
port
'
:
6800
,
'
secure
'
:
false
};
let
options
=
{
'
host
'
:
'
localhost
'
,
'
port
'
:
6800
,
'
secure
'
:
false
};
var
aria2
=
new
Aria2
(
options
);
let
aria2
=
new
Aria2
(
options
);
aria2
.
onDownloadComplete
=
function
(
response
)
{
aria2
.
onDownloadComplete
=
(
response
)
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
};
};
var
open
=
aria2
.
open
();
let
open
=
aria2
.
open
();
function
addUri
(
uri
,
path
)
{
function
addUri
(
uri
,
path
)
{
return
open
.
then
(
function
()
{
return
open
.
then
(
()
=>
{
return
aria2
.
addUri
(
uri
,
{
'
dir
'
:
path
});
return
aria2
.
addUri
(
uri
,
{
'
dir
'
:
path
});
});
});
}
}
...
...
aria2.js.map
View file @
ba81af1e
{"version":3,"file":"aria2.js","sourceRoot":"","sources":["aria2.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,IAAM,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AACvB,yCAAO,CAAuB;AACrC,8BAAkC,eAAe,CAAC,CAAA;AAClD,kCAAkC;AAClC,IAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE/B,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,iCAAiC,EAAE,CAAC,cAAc,EAAE,wBAAwB,EAAE,YAAY,EAAE,YAAY,EAAE,qBAAqB,EAAE,gCAAgC,CAAC,CAAC,CAAC,CAAA;AAC3L,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,UAAC,KAAK;IAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC;AACH,wBAAwB;AACxB,uBAAuB,WAAmB,EAAE,IAAmB;IAAnB,oBAAmB,GAAnB,SAAmB;IAC3D,MAAM,CAAC,qBAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,IAAI,OAAO,GAAG,EAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAA;AAClE,IAAI,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAE/B,KAAK,CAAC,kBAAkB,GAAG,UAAC,QAAQ;IAChC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEF,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;AACxB,gBAAgB,GAAa,EAAE,IAAY;IACvC,MAAM,CAAC,IAAI,CAAC,IAAI,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AAG,CAAC,QAAQ;IAChC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEF,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;AACxB,gBAAgB,GAAa,EAAE,IAAY;IACvC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;QACb,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACP,CAAC;AACD,eAAe,GAAW;IACtB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AAC3B,CAAC;AAED;IACI,KAAK,CAAC,UAAU,EAAE,CAAA;AACtB,CAAC;AAED,cAAc"
}
\ No newline at end of file
systemjs.config.js
View file @
ba81af1e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* Adjust as necessary for your application needs.
* Adjust as necessary for your application needs.
*/
*/
// map tells the System loader where to look for things
// map tells the System loader where to look for things
var
map
=
{
var
map
=
{
'
app
'
:
'
app
'
,
// 'dist',
'
app
'
:
'
app
'
,
// 'dist',
'
@angular
'
:
'
node_modules/@angular
'
,
'
@angular
'
:
'
node_modules/@angular
'
,
'
angular2-in-memory-web-api
'
:
'
node_modules/angular2-in-memory-web-api
'
,
'
angular2-in-memory-web-api
'
:
'
node_modules/angular2-in-memory-web-api
'
,
...
@@ -11,20 +11,23 @@
...
@@ -11,20 +11,23 @@
'
ng2-translate
'
:
'
node_modules/ng2-translate/bundles/index.js
'
,
'
ng2-translate
'
:
'
node_modules/ng2-translate/bundles/index.js
'
,
"
electron
"
:
"
@node/electron
"
,
"
electron
"
:
"
@node/electron
"
,
"
ini
"
:
"
@node/ini
"
,
"
ini
"
:
"
@node/ini
"
,
"
mkdirp
"
:
"
@node/mkdirp
"
,
"
aria2
"
:
"
@node/aria2
"
,
"
electron-sudo
"
:
"
@node/electron-sudo
"
};
};
// packages tells the System loader how to load when no filename and/or no extension
// packages tells the System loader how to load when no filename and/or no extension
var
packages
=
{
var
packages
=
{
'
app
'
:
{
main
:
'
main.js
'
,
defaultExtension
:
'
js
'
},
'
app
'
:
{
main
:
'
main.js
'
,
defaultExtension
:
'
js
'
},
'
rxjs
'
:
{
defaultExtension
:
'
js
'
},
'
rxjs
'
:
{
defaultExtension
:
'
js
'
},
'
angular2-in-memory-web-api
'
:
{
main
:
'
index.js
'
,
defaultExtension
:
'
js
'
}
'
angular2-in-memory-web-api
'
:
{
main
:
'
index.js
'
,
defaultExtension
:
'
js
'
}
};
};
let
builtin_modules
=
[
"
buffer
"
,
"
querystring
"
,
"
events
"
,
"
http
"
,
"
cluster
"
,
"
zlib
"
,
"
os
"
,
"
https
"
,
"
punycode
"
,
"
repl
"
,
"
readline
"
,
"
vm
"
,
"
child_process
"
,
"
url
"
,
"
dns
"
,
"
net
"
,
"
dgram
"
,
"
fs
"
,
"
path
"
,
"
string_decoder
"
,
"
tls
"
,
"
crypto
"
,
"
stream
"
,
"
util
"
,
"
assert
"
,
"
tty
"
,
"
domain
"
,
"
constants
"
,
"
process
"
,
"
v8
"
,
"
timers
"
,
"
console
"
];
let
builtin_modules
=
[
"
buffer
"
,
"
querystring
"
,
"
events
"
,
"
http
"
,
"
cluster
"
,
"
zlib
"
,
"
os
"
,
"
https
"
,
"
punycode
"
,
"
repl
"
,
"
readline
"
,
"
vm
"
,
"
child_process
"
,
"
url
"
,
"
dns
"
,
"
net
"
,
"
dgram
"
,
"
fs
"
,
"
path
"
,
"
string_decoder
"
,
"
tls
"
,
"
crypto
"
,
"
stream
"
,
"
util
"
,
"
assert
"
,
"
tty
"
,
"
domain
"
,
"
constants
"
,
"
process
"
,
"
v8
"
,
"
timers
"
,
"
console
"
];
for
(
let
mod
of
builtin_modules
)
{
for
(
let
mod
of
builtin_modules
)
{
map
[
mod
]
=
`@node/
${
mod
}
`
;
map
[
mod
]
=
`@node/
${
mod
}
`
;
}
}
var
ngPackageNames
=
[
var
ngPackageNames
=
[
'
common
'
,
'
common
'
,
'
compiler
'
,
'
compiler
'
,
'
core
'
,
'
core
'
,
...
@@ -35,23 +38,23 @@ for (let mod of builtin_modules) {
...
@@ -35,23 +38,23 @@ for (let mod of builtin_modules) {
'
router
'
,
'
router
'
,
'
router-deprecated
'
,
'
router-deprecated
'
,
'
upgrade
'
,
'
upgrade
'
,
];
];
// Individual files (~300 requests):
// Individual files (~300 requests):
function
packIndex
(
pkgName
)
{
function
packIndex
(
pkgName
)
{
packages
[
'
@angular/
'
+
pkgName
]
=
{
main
:
'
index.js
'
,
defaultExtension
:
'
js
'
};
packages
[
'
@angular/
'
+
pkgName
]
=
{
main
:
'
index.js
'
,
defaultExtension
:
'
js
'
};
}
}
// Bundled (~40 requests):
// Bundled (~40 requests):
function
packUmd
(
pkgName
)
{
function
packUmd
(
pkgName
)
{
packages
[
'
@angular/
'
+
pkgName
]
=
{
main
:
'
bundles/
'
+
pkgName
+
'
.umd.js
'
,
defaultExtension
:
'
js
'
};
packages
[
'
@angular/
'
+
pkgName
]
=
{
main
:
'
bundles/
'
+
pkgName
+
'
.umd.js
'
,
defaultExtension
:
'
js
'
};
}
}
// Most environments should use UMD; some (Karma) need the individual index files
// Most environments should use UMD; some (Karma) need the individual index files
var
setPackageConfig
=
System
.
packageWithIndex
?
packIndex
:
packUmd
;
var
setPackageConfig
=
System
.
packageWithIndex
?
packIndex
:
packUmd
;
// Add package entries for angular packages
// Add package entries for angular packages
ngPackageNames
.
forEach
(
setPackageConfig
);
ngPackageNames
.
forEach
(
setPackageConfig
);
var
config
=
{
var
config
=
{
map
:
map
,
map
:
map
,
packages
:
packages
packages
:
packages
};
};
System
.
config
(
config
);
System
.
config
(
config
);
tsconfig.json
View file @
ba81af1e
{
{
"compilerOptions"
:
{
"compilerOptions"
:
{
"target"
:
"es5"
,
"target"
:
"es6"
,
"lib"
:
[
"dom"
,
"es2016"
],
"module"
:
"commonjs"
,
"module"
:
"commonjs"
,
"moduleResolution"
:
"node"
,
"moduleResolution"
:
"node"
,
"sourceMap"
:
true
,
"sourceMap"
:
true
,
...
...
typings.json
View file @
ba81af1e
{
{
"globalDependencies"
:
{
"globalDependencies"
:
{
"core-js"
:
"registry:dt/core-js"
,
"electron/github-electron"
:
"registry:dt/electron/github-electron"
,
"electron/github-electron"
:
"registry:dt/electron/github-electron"
,
"ini"
:
"registry:dt/ini"
,
"ini"
:
"registry:dt/ini"
,
"jasmine"
:
"registry:dt/jasmine"
,
"jasmine"
:
"registry:dt/jasmine"
,
...
...
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