Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
moecube
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
JoyJ
moecube
Commits
e0a6502e
Commit
e0a6502e
authored
Nov 24, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
th123
parent
54220677
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
53 deletions
+30
-53
app/app-detail.component.html
app/app-detail.component.html
+4
-47
app/apps.service.ts
app/apps.service.ts
+21
-5
apps.json
apps.json
+5
-1
No files found.
app/app-detail.component.html
View file @
e0a6502e
...
@@ -13,8 +13,9 @@
...
@@ -13,8 +13,9 @@
value=
"{{currentApp.status.progress}}"
max=
"{{currentApp.status.total}}"
></progress>
value=
"{{currentApp.status.progress}}"
max=
"{{currentApp.status.total}}"
></progress>
<div
*ngIf=
"currentApp.status.status==='ready' && (currentApp.id != 'ygopro')"
>
<div
*ngIf=
"currentApp.status.status==='ready' && (currentApp.id != 'ygopro')"
>
<button
(click)=
"runApp(currentApp)"
type=
"button"
class=
"btn btn-primary"
>
运行
</button>
<button
(click)=
"runApp(currentApp)"
type=
"button"
class=
"btn btn-primary"
>
运行
</button>
<button
*ngIf=
"currentApp.actions.get('custom')"
(click)=
"custom(currentApp)"
type=
"button"
class=
"btn btn-secondary"
>
设置
</button>
<button
*ngIf=
"currentApp.actions.get('custom')"
(click)=
"custom(currentApp)"
type=
"button"
<!--<button (click)="appsService.browse(currentApp)" type="button" class="btn btn-secondary">游览本地文件</button>-->
class=
"btn btn-secondary"
>
设置
</button>
<div
id=
"network"
*ngIf=
"currentApp.network && currentApp.network.protocol == 'maotama'"
>
<div
id=
"network"
*ngIf=
"currentApp.network && currentApp.network.protocol == 'maotama'"
>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
...
@@ -114,56 +115,12 @@
...
@@ -114,56 +115,12 @@
<div
*ngIf=
"currentApp.isInstalled()"
>
<div
*ngIf=
"currentApp.isInstalled()"
>
<h2>
本地文件
</h2>
<h2>
本地文件
</h2>
<button
(click)=
"appsService.browse(currentApp)"
type=
"button"
class=
"btn btn-secondary"
>
浏览本地文件
</button>
<button
(click)=
"appsService.browse(currentApp)"
type=
"button"
class=
"btn btn-secondary"
>
浏览本地文件
</button>
<button
type=
"button"
class=
"btn btn-secondary"
>
校验完整性
</button>
<button
(click)=
"uninstall(currentApp)"
type=
"button"
class=
"btn btn-secondary"
>
<button
(click)=
"uninstall(currentApp)"
type=
"button"
class=
"btn btn-secondary"
>
{{'uninstall'|translate}}
{{'uninstall'|translate}}
</button>
</button>
</div>
</div>
<!--<div class="modal fade" id="settings-modal" tabindex="-1">-->
<!--<div class="modal-dialog" role="document">-->
<!--<div class="modal-content">-->
<!--<div class="modal-header">-->
<!--<button type="button" class="close" data-dismiss="modal" aria-label="Close">-->
<!--<span aria-hidden="true">×</span>-->
<!--</button>-->
<!--<h4 class="modal-title">{{'settings'|translate}}</h4>-->
<!--<ul class="nav nav-tabs">-->
<!--<li class="nav-item">-->
<!--<a class="nav-link active" data-toggle="tab" href="#general"> {{'general'|translate}} </a>-->
<!--</li>-->
<!--<li class="nav-item">-->
<!--<a class="nav-link" data-toggle="tab" href="#updates"> {{'updates'|translate}} </a>-->
<!--</li>-->
<!--<li class="nav-item">-->
<!--<a class="nav-link" data-toggle="tab" href="#local-files"> {{'local files'|translate}} </a>-->
<!--</li>-->
<!--</ul>-->
<!--</div>-->
<!--<div class="modal-body">-->
<!--<div class="tab-content">-->
<!--<div id="general" role="tabpanel" class="tab-pane fade active">-->
<!--</div>-->
<!--<div id="updates" role="tabpanel" class="tab-pane fade">-->
<!--</div>-->
<!--<div id="local-files" role="tabpanel" class="tab-pane fade">-->
<!--<div class="list-inline">-->
<!--<button type="button" [disabled]="!currentApp.isInstalled()" (click)="uninstall()">-->
<!--{{'uninstall'|translate}}-->
<!--</button>-->
<!--<i *ngIf="uninstalling" class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i>-->
<!--<span class="sr-only">Loading...</span>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div><!– Modal –>-->
<div
class=
"modal fade"
id=
"install-modal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
<div
class=
"modal fade"
id=
"install-modal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
*ngIf=
"installConfig"
>
*ngIf=
"installConfig"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-dialog"
role=
"document"
>
...
...
app/apps.service.ts
View file @
e0a6502e
...
@@ -122,7 +122,7 @@ export class AppsService {
...
@@ -122,7 +122,7 @@ export class AppsService {
return
children
;
return
children
;
}
}
async
runApp
(
app
:
App
,
action_name
=
'
main
'
)
{
async
runApp
(
app
:
App
,
action_name
=
'
main
'
)
{
let
children
=
this
.
findChildren
(
app
);
let
children
=
this
.
findChildren
(
app
);
let
cwd
=
(
<
AppLocal
>
app
.
local
).
path
;
let
cwd
=
(
<
AppLocal
>
app
.
local
).
path
;
let
action
:
Action
=
<
Action
>
app
.
actions
.
get
(
action_name
);
let
action
:
Action
=
<
Action
>
app
.
actions
.
get
(
action_name
);
...
@@ -137,10 +137,26 @@ export class AppsService {
...
@@ -137,10 +137,26 @@ export class AppsService {
}
}
}
}
let
execute
=
path
.
join
(
cwd
,
action
.
execute
);
let
execute
=
path
.
join
(
cwd
,
action
.
execute
);
if
(
app
.
id
==
'
th123
'
)
{
if
(
app
.
id
==
'
th123
'
)
{
let
th105
=
<
App
>
app
.
references
.
get
(
'
th105
'
);
let
th105
=
<
App
>
app
.
references
.
get
(
'
th105
'
);
if
(
th105
.
isInstalled
()){
if
(
th105
.
isInstalled
())
{
const
config_file
=
path
.
join
((
<
AppLocal
>
app
.
local
).
path
,
'
np21nt.ini
'
);
const
config_file
=
path
.
join
((
<
AppLocal
>
app
.
local
).
path
,
'
configex123.ini
'
);
let
config
=
await
new
Promise
((
resolve
,
reject
)
=>
{
fs
.
readFile
(
config_file
,
{
encoding
:
'
utf-8
'
},
(
error
,
data
)
=>
{
if
(
error
)
return
reject
(
error
);
resolve
(
ini
.
parse
(
data
));
});
});
config
[
'
th105path
'
]
=
{
path
:
(
<
AppLocal
>
th105
.
local
).
path
};
await
new
Promise
((
resolve
,
reject
)
=>
{
fs
.
writeFile
(
config_file
,
ini
.
stringify
(
config
),
(
error
)
=>
{
if
(
error
)
{
reject
(
error
)
}
else
{
resolve
()
}
})
});
}
}
}
}
...
@@ -166,7 +182,7 @@ export class AppsService {
...
@@ -166,7 +182,7 @@ export class AppsService {
windtype
:
'
0
'
windtype
:
'
0
'
};
};
config
[
'
NekoProject21
'
]
=
Object
.
assign
({},
default_config
,
config
[
'
NekoProject21
'
]);
config
[
'
NekoProject21
'
]
=
Object
.
assign
({},
default_config
,
config
[
'
NekoProject21
'
]);
config
[
'
NekoProject21
'
][
'
HDD1FILE
'
]
=
path
.
win32
.
join
(
(
process
.
platform
==
'
win32
'
?
''
:
'
Z:
'
)
,
(
<
AppLocal
>
app
.
local
).
path
,
action
.
execute
);
config
[
'
NekoProject21
'
][
'
HDD1FILE
'
]
=
path
.
win32
.
join
(
process
.
platform
==
'
win32
'
?
''
:
'
Z:
'
,
(
<
AppLocal
>
app
.
local
).
path
,
action
.
execute
);
await
new
Promise
((
resolve
,
reject
)
=>
{
await
new
Promise
((
resolve
,
reject
)
=>
{
fs
.
writeFile
(
config_file
,
ini
.
stringify
(
config
),
(
error
)
=>
{
fs
.
writeFile
(
config_file
,
ini
.
stringify
(
config
),
(
error
)
=>
{
if
(
error
)
{
if
(
error
)
{
...
...
apps.json
View file @
e0a6502e
...
@@ -1416,9 +1416,11 @@
...
@@ -1416,9 +1416,11 @@
},
},
"references"
:
{
"references"
:
{
"win32"
:
[
"win32"
:
[
"th105"
,
"th123-lang-zh-CN"
"th123-lang-zh-CN"
],
],
"darwin"
:
[
"darwin"
:
[
"th105"
,
"th123-lang-zh-CN"
"th123-lang-zh-CN"
]
]
},
},
...
@@ -2318,7 +2320,9 @@
...
@@ -2318,7 +2320,9 @@
"main"
:
{
"main"
:
{
"execute"
:
"bin/wine.bin"
,
"execute"
:
"bin/wine.bin"
,
"args"
:
[],
"args"
:
[],
"env"
:
{}
"env"
:
{
"WINEDEBUG"
:
"-all"
}
}
}
}
}
}
}
...
...
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