Commit 56b61486 authored by 神楽坂玲奈's avatar 神楽坂玲奈

ygopro

parent a2adc47c
...@@ -15,12 +15,13 @@ ...@@ -15,12 +15,13 @@
</progress> </progress>
</div> </div>
</div> </div>
<div *ngIf="isInstalled"> <div *ngIf="isInstalled && (routingService.app != 'ygopro')">
<button (click)="startApp(routingService.app)" type="button" class="btn btn-primary">运行</button> <button (click)="startApp(routingService.app)" type="button" class="btn btn-primary">运行</button>
<button type="button" class="btn btn-secondary">设置</button> <button type="button" class="btn btn-secondary">设置</button>
<button (click)="openDir(routingService.app)" type="button" class="btn btn-secondary">游览本地文件</button> <button (click)="appsService.browse(routingService.app)" 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 && (routingService.app == 'ygopro')"></ygopro>
<br> <br>
...@@ -65,12 +66,22 @@ ...@@ -65,12 +66,22 @@
<td>{{'app.' + mod.id + '.name' | translate}}</td> <td>{{'app.' + mod.id + '.name' | translate}}</td>
<td>{{mod.type}}</td> <td>{{mod.type}}</td>
<td *ngIf="checkInstall(mod.id)"> <td *ngIf="checkInstall(mod.id)">
<button type="button" class="btn btn-danger btn-sm">卸载</button></td> <button type="button" class="btn btn-danger btn-sm">卸载</button>
</td>
<td *ngIf="!checkInstall(mod.id)"> <td *ngIf="!checkInstall(mod.id)">
<button *ngIf="!appsService.getDownloadInfo(mod.id)" (click)="install(mod.id)" type="button" class="btn btn-primary btn-sm">安装</button> <button *ngIf="!appsService.getDownloadInfo(mod.id)" (click)="install(mod.id)" type="button"
<progress *ngIf="appsService.getDownloadInfo(mod.id) && appsService.getDownloadInfo(mod.id).status === 'active'" class="progress progress-striped progress-animated" value="{{appsService.getDownloadInfo(mod.id).progress}}" max="100"></progress> class="btn btn-primary btn-sm">安装
<div *ngIf="appsService.getDownloadInfo(mod.id) && appsService.getDownloadInfo(mod.id).status === 'wait'">等待安装...</div> </button>
<div *ngIf="appsService.getDownloadInfo(mod.id) && appsService.getDownloadInfo(mod.id).status === 'install'">正在安装...</div> <progress
*ngIf="appsService.getDownloadInfo(mod.id) && appsService.getDownloadInfo(mod.id).status === 'active'"
class="progress progress-striped progress-animated"
value="{{appsService.getDownloadInfo(mod.id).progress}}" max="100"></progress>
<div *ngIf="appsService.getDownloadInfo(mod.id) && appsService.getDownloadInfo(mod.id).status === 'wait'">
等待安装...
</div>
<div *ngIf="appsService.getDownloadInfo(mod.id) && appsService.getDownloadInfo(mod.id).status === 'install'">
正在安装...
</div>
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -84,7 +95,7 @@ ...@@ -84,7 +95,7 @@
{{appsService.tarQueue | json}} {{appsService.tarQueue | json}}
{{appsService.waitInstallQueue | json}} {{appsService.waitInstallQueue | json}}
</pre> </pre>
<button (click)="appsService.doTar()" >DOTAR</button> <button (click)="appsService.doTar()">DOTAR</button>
<!-- Modal --> <!-- Modal -->
<div class="modal fade" id="install-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" <div class="modal fade" id="install-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
...@@ -103,7 +114,8 @@ ...@@ -103,7 +114,8 @@
<h4>安装位置</h4> <h4>安装位置</h4>
<div class="form-group"> <div class="form-group">
<div class="input-group"> <div class="input-group">
<input type="text" [(ngModel)]="appsService.installConfig.installDir" name="installDir" class="form-control" placeholder="安装位置"> <input type="text" [(ngModel)]="appsService.installConfig.installDir" name="installDir"
class="form-control" placeholder="安装位置">
<span class="input-group-btn"> <span class="input-group-btn">
<button (click)="selectDir()" class="btn btn-secondary" type="button">浏览</button> <button (click)="selectDir()" class="btn btn-secondary" type="button">浏览</button>
</span> </span>
...@@ -112,7 +124,8 @@ ...@@ -112,7 +124,8 @@
<h4>快捷方式</h4> <h4>快捷方式</h4>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" [(ngModel)]="appsService.installConfig.shortcut.application" name="application"> <input type="checkbox" [(ngModel)]="appsService.installConfig.shortcut.application"
name="application">
创建应用程序快捷方式 创建应用程序快捷方式
</label> </label>
</div> </div>
......
...@@ -134,10 +134,6 @@ export class AppDetailComponent { ...@@ -134,10 +134,6 @@ export class AppDetailComponent {
return dir[0]; return dir[0];
} }
openDir(id) {
this.electron.remote.shell.showItemInFolder(this.appsService.searchApp(id).local.path);
}
startApp(id) { startApp(id) {
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(this.appsService.searchApp(id).local.path, this.appsService.searchApp(id).actions[process.platform]["main"].execute);
let args = this.appsService.searchApp(id).actions[process.platform]["main"].args; let args = this.appsService.searchApp(id).actions[process.platform]["main"].args;
......
...@@ -430,4 +430,8 @@ export class AppsService { ...@@ -430,4 +430,8 @@ export class AppsService {
return !1; return !1;
return !0 return !0
} }
browse(id) {
this.electron.remote.shell.showItemInFolder(this.searchApp(id).local.path);
}
} }
...@@ -13,6 +13,8 @@ import {RosterComponent} from './roster.component'; ...@@ -13,6 +13,8 @@ import {RosterComponent} from './roster.component';
import {CandyComponent} from './candy.component'; import {CandyComponent} from './candy.component';
import {CommunityComponent} from './community.component'; import {CommunityComponent} from './community.component';
import {YGOProComponent} from './ygopro.component';
import {RoutingService} from './routing.service'; import {RoutingService} from './routing.service';
import {AppsService} from './apps.service'; import {AppsService} from './apps.service';
...@@ -20,7 +22,7 @@ import {TranslateModule} from 'ng2-translate'; ...@@ -20,7 +22,7 @@ import {TranslateModule} from 'ng2-translate';
@NgModule({ @NgModule({
imports: [BrowserModule, FormsModule, HttpModule, TranslateModule.forRoot()], imports: [BrowserModule, FormsModule, HttpModule, TranslateModule.forRoot()],
declarations: [MyCardComponent, LoginComponent, StoreComponent, LobbyComponent, CommunityComponent, AppsComponent, AppDetailComponent, RosterComponent, CandyComponent], declarations: [MyCardComponent, LoginComponent, StoreComponent, LobbyComponent, CommunityComponent, AppsComponent, AppDetailComponent, RosterComponent, CandyComponent, YGOProComponent],
bootstrap: [MyCardComponent], bootstrap: [MyCardComponent],
providers: [RoutingService, AppsService], providers: [RoutingService, AppsService],
schemas: [NO_ERRORS_SCHEMA] schemas: [NO_ERRORS_SCHEMA]
......
<form class="form-inline">
<div class="form-group">
<label for="exampleSelect1">卡组</label>
<select class="form-control" id="exampleSelect1">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
<button type="submit" class="btn btn-secondary">编辑</button>
<button type="submit" class="btn btn-secondary">删除</button>
</form>
<div>
<button type="button" class="btn btn-primary">竞技匹配</button>
<button type="button" class="btn btn-secondary">娱乐匹配</button>
<!--<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#game-create-modal">创建房间</button>-->
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#game-list-modal">房间列表</button>
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#game-create-windbot">单人模式</button>
<button (click)="appsService.browse(routingService.app)" type="button" class="btn btn-secondary">浏览本地文件</button>
</div>
\ No newline at end of file
/**
* Created by zh99998 on 16/9/2.
*/
import {Component} from '@angular/core';
import {AppsService} from "./apps.service";
import {RoutingService} from "./routing.service";
@Component({
selector: 'ygopro',
templateUrl: 'app/ygopro.component.html',
styleUrls: ['app/ygopro.component.css'],
})
export class YGOProComponent {
constructor(private appsService: AppsService, private routingService: RoutingService) {
}
}
...@@ -2387,36 +2387,43 @@ ...@@ -2387,36 +2387,43 @@
} }
}, },
{ {
"category": "game", "id": "ygopro",
"name": {
"zh-CN": "YGOPro"
},
"description": { "description": {
"zh-CN": "fxt desc" "zh-CN": "A script engine for \"yu-gi-oh!\" and sample gui."
}, },
"category": "game",
"tags": [ "tags": [
"game" "game",
"card"
], ],
"homepage": "http://www.myacg.cc", "locales": [
"author": "ZUN", "zh-CN"
],
"homepage": "https://github.com/Fluorohydride/ygopro",
"author": "Fluorohydride",
"actions": { "actions": {
"win32": { "win32": {
"main": { "main": {
"execute": "th07.exe", "execute": "ygopro_vs.exe",
"args": [], "args": [],
"env": { "env": {}
"LC_ALL": "ja_JP"
}
} }
}, },
"darwin": { "darwin": {
"main": { "main": {
"execute": "th07.exe", "execute": "ygopro.app/Contents/MacOS/ygopro",
"args": [], "args": [],
"open": "wine", "env": {}
"env": {
"LC_ALL": "ja_JP"
}
} }
} }
}, },
"download": {
"win32": "http://thief.mycard.moe/metalinks/ygopro-win32.meta4",
"darwin": "http://thief.mycard.moe/metalinks/ygopro-osx.meta4"
},
"version": { "version": {
"darwin": "1.06" "darwin": "1.06"
}, },
...@@ -2424,10 +2431,6 @@ ...@@ -2424,10 +2431,6 @@
"win32": [], "win32": [],
"darwin": [] "darwin": []
}, },
"download": {
"win32": "http://thief.mycard.moe/metalinks/ygopro-win32.meta4",
"darwin": "http://thief.mycard.moe/metalinks/ygopro-win32.meta4"
},
"news": [ "news": [
{ {
"url": "#", "url": "#",
...@@ -2439,13 +2442,6 @@ ...@@ -2439,13 +2442,6 @@
"image": "http://www.myacg.cc/wp-content/uploads/2000/01/newBanner51.jpg", "image": "http://www.myacg.cc/wp-content/uploads/2000/01/newBanner51.jpg",
"title": "News Title" "title": "News Title"
} }
], ]
"id": "ygopro-win32",
"locales": [
"zh-CN"
],
"name": {
"zh-CN": "YGOPro"
}
} }
] ]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment