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
c1251714
Commit
c1251714
authored
Oct 26, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix start
parent
cdcf2540
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
22 deletions
+23
-22
app/app-detail.component.html
app/app-detail.component.html
+2
-2
app/app-detail.component.ts
app/app-detail.component.ts
+7
-7
app/apps.component.html
app/apps.component.html
+4
-4
app/apps.component.ts
app/apps.component.ts
+8
-6
app/mycard.component.html
app/mycard.component.html
+1
-1
app/ygopro.component.ts
app/ygopro.component.ts
+1
-2
No files found.
app/app-detail.component.html
View file @
c1251714
...
@@ -16,13 +16,13 @@
...
@@ -16,13 +16,13 @@
</progress>
</progress>
</div>
</div>
</div>
</div>
<div
*ngIf=
"isInstalled && (appsService.currentApp != 'ygopro')"
>
<div
*ngIf=
"isInstalled && (appsService.currentApp
.id
!= 'ygopro')"
>
<button
(click)=
"startApp(appsService.currentApp)"
type=
"button"
class=
"btn btn-primary"
>
运行
</button>
<button
(click)=
"startApp(appsService.currentApp)"
type=
"button"
class=
"btn btn-primary"
>
运行
</button>
<button
type=
"button"
data-toggle=
"modal"
data-target=
"#settings-modal"
class=
"btn btn-secondary"
>
设置
</button>
<button
type=
"button"
data-toggle=
"modal"
data-target=
"#settings-modal"
class=
"btn btn-secondary"
>
设置
</button>
<!--<button (click)="appsService.browse(appsService.currentApp)" type="button" class="btn btn-secondary">游览本地文件</button>-->
<!--<button (click)="appsService.browse(appsService.currentApp)" type="button" class="btn btn-secondary">游览本地文件</button>-->
<button
type=
"button"
class=
"btn btn-secondary"
>
联机
</button>
<button
type=
"button"
class=
"btn btn-secondary"
>
联机
</button>
</div>
</div>
<ygopro
*ngIf=
"isInstalled && (appsService.currentApp == 'ygopro')"
></ygopro>
<ygopro
*ngIf=
"isInstalled && (appsService.currentApp
.id
== 'ygopro')"
></ygopro>
<br>
<br>
...
...
app/app-detail.component.ts
View file @
c1251714
...
@@ -129,19 +129,19 @@ export class AppDetailComponent implements OnInit {
...
@@ -129,19 +129,19 @@ export class AppDetailComponent implements OnInit {
return
dir
[
0
];
return
dir
[
0
];
}
}
startApp
(
id
)
{
startApp
(
app
)
{
let
execute
=
this
.
path
.
join
(
this
.
appsService
.
searchApp
(
id
).
local
.
path
,
this
.
appsService
.
searchApp
(
id
)
.
actions
[
process
.
platform
][
"
main
"
].
execute
);
let
execute
=
this
.
path
.
join
(
app
.
local
.
path
,
app
.
actions
[
process
.
platform
][
"
main
"
].
execute
);
let
args
=
this
.
appsService
.
searchApp
(
id
)
.
actions
[
process
.
platform
][
"
main
"
].
args
;
let
args
=
app
.
actions
[
process
.
platform
][
"
main
"
].
args
;
let
env
=
this
.
appsService
.
searchApp
(
id
)
.
actions
[
process
.
platform
][
"
main
"
].
env
;
let
env
=
app
.
actions
[
process
.
platform
][
"
main
"
].
env
;
let
opt
=
{
let
opt
=
{
cwd
:
this
.
appsService
.
searchApp
(
id
)
.
local
.
path
,
cwd
:
app
.
local
.
path
,
env
:
env
env
:
env
};
};
let
open
=
''
;
let
open
=
''
;
let
openId
=
this
.
appsService
.
searchApp
(
id
)
.
actions
[
process
.
platform
][
"
main
"
].
open
;
let
openId
=
app
.
actions
[
process
.
platform
][
"
main
"
].
open
;
if
(
openId
)
{
if
(
openId
)
{
this
.
appsService
.
searchApp
(
openId
).
actions
[
process
.
platform
][
"
main
"
].
execute
;
//
this.appsService.searchApp(openId).actions[process.platform]["main"].execute;
if
(
this
.
checkInstall
(
openId
))
{
if
(
this
.
checkInstall
(
openId
))
{
open
=
this
.
path
.
join
(
this
.
appsService
.
searchApp
(
openId
).
local
.
path
,
this
.
appsService
.
searchApp
(
openId
).
actions
[
process
.
platform
][
"
main
"
].
execute
);
open
=
this
.
path
.
join
(
this
.
appsService
.
searchApp
(
openId
).
local
.
path
,
this
.
appsService
.
searchApp
(
openId
).
actions
[
process
.
platform
][
"
main
"
].
execute
);
args
.
push
(
execute
);
args
.
push
(
execute
);
...
...
app/apps.component.html
View file @
c1251714
<span
*ngIf=
"grouped_apps.installed
.length
"
>
已安装
</span>
<span
*ngIf=
"grouped_apps.installed"
>
已安装
</span>
<ul
*ngIf=
"grouped_apps.installed"
class=
"nav nav-sidebar"
>
<ul
*ngIf=
"grouped_apps.installed"
class=
"nav nav-sidebar"
>
<li
*ngFor=
"let app of grouped_apps.installed"
[class.active]=
"app===appsService.currentApp"
>
<li
*ngFor=
"let app of grouped_apps.installed"
[class.active]=
"app===appsService.currentApp"
>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
</li>
</li>
</ul>
</ul>
<span
*ngIf=
"grouped_apps.yugioh
.length
"
>
游戏王
</span>
<span
*ngIf=
"grouped_apps.yugioh"
>
游戏王
</span>
<ul
*ngIf=
"grouped_apps.yugioh"
class=
"nav nav-sidebar"
>
<ul
*ngIf=
"grouped_apps.yugioh"
class=
"nav nav-sidebar"
>
<li
*ngFor=
"let app of grouped_apps.yugioh"
[class.active]=
"app===appsService.currentApp"
>
<li
*ngFor=
"let app of grouped_apps.yugioh"
[class.active]=
"app===appsService.currentApp"
>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
</li>
</li>
</ul>
</ul>
<span
*ngIf=
"grouped_apps.touhou
.length
"
>
东方 Project
</span>
<span
*ngIf=
"grouped_apps.touhou"
>
东方 Project
</span>
<ul
*ngIf=
"grouped_apps.touhou"
class=
"nav nav-sidebar"
>
<ul
*ngIf=
"grouped_apps.touhou"
class=
"nav nav-sidebar"
>
<li
*ngFor=
"let app of grouped_apps.touhou"
[class.active]=
"app===appsService.currentApp"
>
<li
*ngFor=
"let app of grouped_apps.touhou"
[class.active]=
"app===appsService.currentApp"
>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
</li>
</li>
</ul>
</ul>
<span
*ngIf=
"grouped_apps.touhou_pc98
.length
"
>
东方旧作
</span>
<span
*ngIf=
"grouped_apps.touhou_pc98"
>
东方旧作
</span>
<ul
*ngIf=
"grouped_apps.touhou_pc98"
class=
"nav nav-sidebar"
>
<ul
*ngIf=
"grouped_apps.touhou_pc98"
class=
"nav nav-sidebar"
>
<li
*ngFor=
"let app of grouped_apps.touhou_pc98"
[class.active]=
"app===appsService.currentApp"
>
<li
*ngFor=
"let app of grouped_apps.touhou_pc98"
[class.active]=
"app===appsService.currentApp"
>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
...
...
app/apps.component.ts
View file @
c1251714
...
@@ -23,17 +23,19 @@ export class AppsComponent implements OnInit {
...
@@ -23,17 +23,19 @@ export class AppsComponent implements OnInit {
get
grouped_apps
()
{
get
grouped_apps
()
{
let
contains
=
[
"
game
"
,
"
music
"
,
"
book
"
];
let
contains
=
[
"
game
"
,
"
music
"
,
"
book
"
];
let
apps
=
Array
.
from
(
this
.
appsService
.
allApps
.
values
());
let
apps
=
Array
.
from
(
this
.
appsService
.
allApps
.
values
());
let
result
=
{
'
installed
'
:
[]
};
let
result
=
{};
for
(
let
app
of
apps
)
{
for
(
let
app
of
apps
)
{
if
(
contains
.
includes
(
app
.
category
))
{
if
(
contains
.
includes
(
app
.
category
))
{
let
tag
;
if
(
app
.
local
)
{
if
(
app
.
local
)
{
result
.
installed
.
push
(
app
)
tag
=
'
installed
'
;
}
else
{
}
else
{
if
(
!
result
[
app
.
tags
[
0
]])
{
tag
=
app
.
tags
[
0
];
result
[
app
.
tags
[
0
]]
=
[]
}
result
[
app
.
tags
[
0
]].
push
(
app
)
}
}
if
(
!
result
[
tag
])
{
result
[
tag
]
=
[]
}
result
[
tag
].
push
(
app
)
}
}
}
}
//console.log(result)
//console.log(result)
...
...
app/mycard.component.html
View file @
c1251714
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
</a>
</a>
<a
href=
"#forum"
class=
"require-login profile item"
id=
"username"
></a>
<a
href=
"#forum"
class=
"require-login profile item"
id=
"username"
></a>
<a
(click)=
"loginService.logout()"
href=
"#ygopro"
id=
"logout"
class=
"require-login item"
>
切换账号
</a>
<a
(click)=
"loginService.logout()"
href=
"#ygopro"
id=
"logout"
class=
"require-login item"
>
切换账号
</a>
<
a
(click)=
"refresh()"
href=
"#ygopro"
id=
"refresh"
class=
"item"
>
刷新
</a
>
<
!--<a (click)="refresh()" href="#ygopro" id="refresh" class="item">刷新</a>--
>
</div>
</div>
<div
id=
"window-buttons"
[hidden]=
"platform == 'darwin'"
>
<div
id=
"window-buttons"
[hidden]=
"platform == 'darwin'"
>
<i
id=
"minimize"
class=
"fa fa-minus"
aria-hidden=
"true"
></i>
<i
id=
"minimize"
class=
"fa fa-minus"
aria-hidden=
"true"
></i>
...
...
app/ygopro.component.ts
View file @
c1251714
...
@@ -13,7 +13,6 @@ const fs = System._nodeRequire('fs');
...
@@ -13,7 +13,6 @@ const fs = System._nodeRequire('fs');
const
path
=
System
.
_nodeRequire
(
'
path
'
);
const
path
=
System
.
_nodeRequire
(
'
path
'
);
const
crypto
=
System
.
_nodeRequire
(
'
crypto
'
);
const
crypto
=
System
.
_nodeRequire
(
'
crypto
'
);
const
child_process
=
System
.
_nodeRequire
(
'
child_process
'
);
const
child_process
=
System
.
_nodeRequire
(
'
child_process
'
);
//const Promise = System._nodeRequire('bluebird');
const
ini
=
System
.
_nodeRequire
(
'
ini
'
);
const
ini
=
System
.
_nodeRequire
(
'
ini
'
);
const
electron
=
System
.
_nodeRequire
(
'
electron
'
);
const
electron
=
System
.
_nodeRequire
(
'
electron
'
);
...
@@ -111,7 +110,7 @@ export class YGOProComponent implements OnInit {
...
@@ -111,7 +110,7 @@ export class YGOProComponent implements OnInit {
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
fs
.
readdir
(
path
.
join
(
this
.
app
.
local
.
path
,
'
deck
'
),
(
error
,
files
)
=>
{
fs
.
readdir
(
path
.
join
(
this
.
app
.
local
.
path
,
'
deck
'
),
(
error
,
files
)
=>
{
if
(
error
)
{
if
(
error
)
{
re
ject
(
error
)
re
solve
([]
)
}
else
{
}
else
{
resolve
(
files
.
filter
(
file
=>
path
.
extname
(
file
)
==
"
.ydk
"
).
map
(
file
=>
path
.
basename
(
file
,
'
.ydk
'
)));
resolve
(
files
.
filter
(
file
=>
path
.
extname
(
file
)
==
"
.ydk
"
).
map
(
file
=>
path
.
basename
(
file
,
'
.ydk
'
)));
}
}
...
...
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