Commit ad92f856 authored by JoyJ's avatar JoyJ

add duel_chronicle

parent 8736dfa4
<div *ngIf="!matching" id="action"> <div *ngIf="!matching" id="action">
<button [disabled]="!appsService.allReady(app)" (click)="request_match('athletic')" type="button" class="btn btn-primary btn-sm"> <button [disabled]="!appsService.allReady(app)" (click)="request_match('athletic')" type="button"
class="btn btn-primary btn-sm">
<i class="fa fa-play" aria-hidden="true"></i> <span i18n>竞技匹配</span></button> <i class="fa fa-play" aria-hidden="true"></i> <span i18n>竞技匹配</span></button>
<button i18n [disabled]="!appsService.allReady(app)" (click)="request_match('entertain')" type="button" class="btn btn-secondary btn-sm">娱乐匹配</button> <button i18n [disabled]="!appsService.allReady(app)" (click)="request_match('entertain')" type="button"
<button i18n [disabled]="!appsService.allReady(app)" type="button" class="btn btn-secondary btn-sm" data-toggle="modal" data-target="#game-list-modal">自定义游戏</button> class="btn btn-secondary btn-sm">娱乐匹配</button>
<button i18n [disabled]="!appsService.allReady(app)" type="button" class="btn btn-secondary btn-sm" data-toggle="modal" data-target="#game-create-windbot">单人模式</button> <button i18n [disabled]="!appsService.allReady(app)" (click)="duel_chronicle('')" type="button"
<button i18n [disabled]="!appsService.allReady(app)" type="button" class="btn btn-secondary btn-sm" data-toggle="modal" data-target="#game-replay-modal">观战录像</button> class="btn btn-secondary btn-sm">决斗编年史</button>
<button i18n [disabled]="!appsService.allReady(app)" type="button" class="btn btn-secondary btn-sm"
data-toggle="modal" data-target="#game-list-modal">自定义游戏</button>
<button i18n [disabled]="!appsService.allReady(app)" type="button" class="btn btn-secondary btn-sm"
data-toggle="modal" data-target="#game-create-windbot">单人模式</button>
<button i18n [disabled]="!appsService.allReady(app)" type="button" class="btn btn-secondary btn-sm"
data-toggle="modal" data-target="#game-replay-modal">观战录像</button>
</div> </div>
<!-- 匹配中 --> <!-- 匹配中 -->
<div *ngIf="matching" id="match-time" class="input-group input-group-sm"> <div *ngIf="matching" id="match-time" class="input-group input-group-sm">
<span class="input-group-addon"> <span class="input-group-addon">
<i class="fa fa-futbol-o fa-spin" aria-hidden="true"></i> <i class="fa fa-futbol-o fa-spin" aria-hidden="true"></i>
<span i18n *ngIf="matching_arena == 'athletic'">竞技匹配</span> <span i18n *ngIf="matching_arena == 'athletic'">竞技匹配</span>
<span i18n *ngIf="matching_arena == 'entertain'">娱乐匹配</span> <span i18n *ngIf="matching_arena == 'entertain'">娱乐匹配</span>
</span> </span>
<span class="input-group-addon"><span i18n>预计时间</span> 03:00</span><span class="input-group-addon"><span i18n>实际时间</span> {{match_time}}</span> <span class="input-group-addon"><span i18n>预计时间</span> 03:00</span><span class="input-group-addon"><span
<span class="input-group-btn"><button i18n class="btn btn-secondary" type="button" [disabled]="!match_cancelable" (click)="cancel_match()">取消</button></span> i18n>实际时间</span> {{match_time}}</span>
<span class="input-group-btn"><button i18n class="btn btn-secondary" type="button" [disabled]="!match_cancelable"
(click)="cancel_match()">取消</button></span>
</div> </div>
<div class="input-group input-group-sm"> <div class="input-group input-group-sm">
...@@ -22,11 +31,13 @@ ...@@ -22,11 +31,13 @@
<select class="form-control form-control-sm" id="exampleSelect1" name="deck" [(ngModel)]="current_deck"> <select class="form-control form-control-sm" id="exampleSelect1" name="deck" [(ngModel)]="current_deck">
<option *ngFor="let deck of decks" [ngValue]="deck">{{deck}}</option> <option *ngFor="let deck of decks" [ngValue]="deck">{{deck}}</option>
</select> <span class="input-group-btn"> </select> <span class="input-group-btn">
<button id="edit_deck_button" i18n [disabled]="!appsService.allReady(app)" class="btn btn-secondary btn-sm" (click)="edit_deck(current_deck)">编辑</button> <button id="edit_deck_button" i18n [disabled]="!appsService.allReady(app)" class="btn btn-secondary btn-sm"
</span> (click)="edit_deck(current_deck)">编辑</button>
</span>
</div> </div>
<div class="modal fade" id="game-create-windbot" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal fade" id="game-create-windbot" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
...@@ -49,7 +60,8 @@ ...@@ -49,7 +60,8 @@
</div> </div>
</div> </div>
<div class="modal fade" id="game-list-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal fade" id="game-list-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg" role="document"> <div class="modal-dialog modal-lg" role="document">
<div class="modal-content flex-row"> <div class="modal-content flex-row">
...@@ -58,41 +70,47 @@ ...@@ -58,41 +70,47 @@
<div i18n class="p-2" *ngIf="!rooms_loading && this.rooms.length === 0">现在没有等待中的游戏,可以自行创建一个房间或者去匹配</div> <div i18n class="p-2" *ngIf="!rooms_loading && this.rooms.length === 0">现在没有等待中的游戏,可以自行创建一个房间或者去匹配</div>
<table *ngIf="!this.rooms_loading && this.rooms.length > 0" class="table table-striped table-hover"> <table *ngIf="!this.rooms_loading && this.rooms.length > 0" class="table table-striped table-hover">
<thead> <thead>
<tr> <tr>
<th i18n class="title">游戏标题</th> <th i18n class="title">游戏标题</th>
<th i18n class="users">玩家</th> <th i18n class="users">玩家</th>
<th i18n class="mode">决斗模式</th> <th i18n class="mode">决斗模式</th>
<th i18n class="extra">额外选项</th> <th i18n class="extra">额外选项</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let room of rooms" class="room" (click)="join_room(room)"> <tr *ngFor="let room of rooms" class="room" (click)="join_room(room)">
<td class="title">{{room.title}}</td> <td class="title">{{room.title}}</td>
<td class="users"> <td class="users">
<img *ngFor="let user of room.users" class="avatar rounded" [src]="'https://ygobbs.com/user_avatar/ygobbs.com/' + user.username + '/25/1.png'" data-toggle="tooltip" data-placement="bottom" [title]="user.username"> <img *ngFor="let user of room.users" class="avatar rounded"
</td> [src]="'https://ygobbs.com/user_avatar/ygobbs.com/' + user.username + '/25/1.png'"
<td class="mode"> data-toggle="tooltip" data-placement="bottom" [title]="user.username">
<span i18n *ngIf="room.options.mode === 0">单局模式</span> </td>
<span i18n *ngIf="room.options.mode === 1">比赛模式</span> <td class="mode">
<span i18n *ngIf="room.options.mode === 2">TAG</span> <span i18n *ngIf="room.options.mode === 0">单局模式</span>
</td> <span i18n *ngIf="room.options.mode === 1">比赛模式</span>
<td class="extra"> <span i18n *ngIf="room.options.mode === 2">TAG</span>
<span *ngIf="room.options.rule != default_options.rule">{{{'0': 'OCG', '1': 'TCG', '2': 'O/T', '3': '专有卡禁止'}[room.options.rule]}}</span> </td>
<span i18n *ngIf="room.options.start_lp != default_options.start_lp">{{room.options.start_lp}} LP</span> <td class="extra">
<span i18n *ngIf="room.options.start_hand != default_options.start_hand">{{room.options.start_hand}} 初始</span> <span
<span i18n *ngIf="room.options.draw_count != default_options.draw_count">{{room.options.draw_count}} 抽卡</span> *ngIf="room.options.rule != default_options.rule">{{{'0': 'OCG', '1': 'TCG', '2': 'O/T', '3': '专有卡禁止'}[room.options.rule]}}</span>
<span i18n *ngIf="room.options.enable_priority != default_options.enable_priority">旧规则</span> <span i18n *ngIf="room.options.start_lp != default_options.start_lp">{{room.options.start_lp}} LP</span>
<span i18n *ngIf="room.options.no_check_deck != default_options.no_check_deck">不检查</span> <span i18n *ngIf="room.options.start_hand != default_options.start_hand">{{room.options.start_hand}}
<span i18n *ngIf="room.options.no_shuffle_deck != default_options.no_shuffle_deck">不洗卡</span> 初始</span>
</td> <span i18n *ngIf="room.options.draw_count != default_options.draw_count">{{room.options.draw_count}}
</tr> 抽卡</span>
<span i18n *ngIf="room.options.enable_priority != default_options.enable_priority">旧规则</span>
<span i18n *ngIf="room.options.no_check_deck != default_options.no_check_deck">不检查</span>
<span i18n *ngIf="room.options.no_shuffle_deck != default_options.no_shuffle_deck">不洗卡</span>
</td>
</tr>
</tbody> </tbody>
</table> </table>
<div id="join-private" class="input-group input-group-sm"> <div id="join-private" class="input-group input-group-sm">
<i class="fa fa-key input-group-addon" aria-hidden="true"></i> <i class="fa fa-key input-group-addon" aria-hidden="true"></i>
<input [(ngModel)]="join_password" type="text" class="form-control" placeholder="在这输入你朋友的私密房间密码就可以进去了哦!"> <input [(ngModel)]="join_password" type="text" class="form-control" placeholder="在这输入你朋友的私密房间密码就可以进去了哦!">
<span class="input-group-btn"><button class="btn btn-secondary" type="button" (click)="join_private(join_password)">加入私密房间</button></span> <span class="input-group-btn"><button class="btn btn-secondary" type="button"
(click)="join_private(join_password)">加入私密房间</button></span>
</div> </div>
</div> </div>
...@@ -102,17 +120,20 @@ ...@@ -102,17 +120,20 @@
<div class="form-group"> <div class="form-group">
<ng-container *ngIf="!room.private; else private"> <ng-container *ngIf="!room.private; else private">
<label i18n for="game-create-title">游戏标题</label> <label i18n for="game-create-title">游戏标题</label>
<input type="text" maxlength="12" class="form-control form-control-sm" id="game-create-title" name="title" [(ngModel)]="room.title" required [readonly]> <input type="text" maxlength="12" class="form-control form-control-sm" id="game-create-title" name="title"
[(ngModel)]="room.title" required [readonly]>
<small class="form-text text-muted">最多 12 个字</small> <small class="form-text text-muted">最多 12 个字</small>
</ng-container> </ng-container>
<ng-template #private> <ng-template #private>
<label *ngIf="room.private" for="game-create-title"><i class="fa fa-key" aria-hidden="true"></i> <label *ngIf="room.private" for="game-create-title"><i class="fa fa-key" aria-hidden="true"></i>
<span i18n>房间密码</span></label> <span i18n>房间密码</span></label>
<div class="input-group input-group-sm"> <div class="input-group input-group-sm">
<input type="text" maxlength="12" class="form-control" id="game-create-title" name="title" [(ngModel)]="host_password" readonly> <input type="text" maxlength="12" class="form-control" id="game-create-title" name="title"
[(ngModel)]="host_password" readonly>
<span id="copy-wrapper" class="input-group-btn" data-toggle="tooltip" title="房间密码已复制到剪贴板"> <span id="copy-wrapper" class="input-group-btn" data-toggle="tooltip" title="房间密码已复制到剪贴板">
<button class="btn btn-secondary fa fa-clipboard" type="button" title="复制" (click)="copy(host_password, $event)"></button> <button class="btn btn-secondary fa fa-clipboard" type="button" title="复制"
</span> (click)="copy(host_password, $event)"></button>
</span>
</div> </div>
<small class="form-text text-muted">把这个分享给你的朋友</small> <small class="form-text text-muted">把这个分享给你的朋友</small>
</ng-template> </ng-template>
...@@ -120,7 +141,8 @@ ...@@ -120,7 +141,8 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label i18n for="game-create-rule">卡片允许</label> <label i18n for="game-create-rule">卡片允许</label>
<select class="form-control form-control-sm" id="game-create-rule" name="rule" [(ngModel)]="room.options.rule"> <select class="form-control form-control-sm" id="game-create-rule" name="rule"
[(ngModel)]="room.options.rule">
<option i18n value="0">OCG</option> <option i18n value="0">OCG</option>
<option i18n value="1">TCG</option> <option i18n value="1">TCG</option>
<option i18n value="2">OCG & TCG</option> <option i18n value="2">OCG & TCG</option>
...@@ -129,7 +151,8 @@ ...@@ -129,7 +151,8 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label i18n for="game-create-rule">决斗模式</label> <label i18n for="game-create-rule">决斗模式</label>
<select class="form-control form-control-sm" id="game-create-mode" name="mode" (change)="room.options.start_lp = room.options.mode == 2 ? 16000 : 8000" [(ngModel)]="room.options.mode"> <select class="form-control form-control-sm" id="game-create-mode" name="mode"
(change)="room.options.start_lp = room.options.mode == 2 ? 16000 : 8000" [(ngModel)]="room.options.mode">
<option i18n value="0">单局模式</option> <option i18n value="0">单局模式</option>
<option i18n value="1">比赛模式</option> <option i18n value="1">比赛模式</option>
<option i18n value="2">TAG</option> <option i18n value="2">TAG</option>
...@@ -141,19 +164,22 @@ ...@@ -141,19 +164,22 @@
<div class="row"> <div class="row">
<label i18n for="game-create-start-lp" class="col-sm-6 col-form-label">初始 LP</label> <label i18n for="game-create-start-lp" class="col-sm-6 col-form-label">初始 LP</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="number" value="8000" min="1" max="65536" class="form-control form-control-sm" id="game-create-start-lp" name="start_lp" [(ngModel)]="room.options.start_lp"> <input type="number" value="8000" min="1" max="65536" class="form-control form-control-sm"
id="game-create-start-lp" name="start_lp" [(ngModel)]="room.options.start_lp">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label i18n for="game-create-start-hand" class="col-sm-6 col-form-label">初始手牌数</label> <label i18n for="game-create-start-hand" class="col-sm-6 col-form-label">初始手牌数</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="number" value="5" min="0" max="16" class="form-control form-control-sm" id="game-create-start-hand" name="start_hand" [(ngModel)]="room.options.start_hand"> <input type="number" value="5" min="0" max="16" class="form-control form-control-sm"
id="game-create-start-hand" name="start_hand" [(ngModel)]="room.options.start_hand">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label i18n for="game-create-draw-count" class="col-sm-6 col-form-label">每回合抽卡</label> <label i18n for="game-create-draw-count" class="col-sm-6 col-form-label">每回合抽卡</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="number" value="1" min="0" max="16" class="form-control form-control-sm" id="game-create-draw-count" name="draw_count" [(ngModel)]="room.options.draw_count"> <input type="number" value="1" min="0" max="16" class="form-control form-control-sm"
id="game-create-draw-count" name="draw_count" [(ngModel)]="room.options.draw_count">
</div> </div>
</div> </div>
<div> <div>
...@@ -161,7 +187,8 @@ ...@@ -161,7 +187,8 @@
<label i18n for="private">私密房间</label> <label i18n for="private">私密房间</label>
</div> </div>
<div> <div>
<input id="enable_priority" name="enable_priority" [(ngModel)]="room.options.enable_priority" type="checkbox"> <input id="enable_priority" name="enable_priority" [(ngModel)]="room.options.enable_priority"
type="checkbox">
<label i18n for="enable_priority">旧规则</label> <label i18n for="enable_priority">旧规则</label>
</div> </div>
<div> <div>
...@@ -169,7 +196,8 @@ ...@@ -169,7 +196,8 @@
<label i18n for="no_check_deck">不检查卡组</label> <label i18n for="no_check_deck">不检查卡组</label>
</div> </div>
<div> <div>
<input id="no_shuffle_deck" name="no_shuffle_deck" type="checkbox" [(ngModel)]="room.options.no_shuffle_deck"> <input id="no_shuffle_deck" name="no_shuffle_deck" type="checkbox"
[(ngModel)]="room.options.no_shuffle_deck">
<label i18n for="no_shuffle_deck">不洗切卡组</label> <label i18n for="no_shuffle_deck">不洗切卡组</label>
</div> </div>
</fieldset> </fieldset>
...@@ -186,7 +214,8 @@ ...@@ -186,7 +214,8 @@
</div> </div>
<div class="modal fade" id="game-replay-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal fade" id="game-replay-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg" role="document"> <div class="modal-dialog modal-lg" role="document">
<div class="modal-content"> <div class="modal-content">
<!--<div class="modal-header">--> <!--<div class="modal-header">-->
...@@ -213,7 +242,7 @@ ...@@ -213,7 +242,7 @@
<a i18n class="nav-link" data-toggle="tab" href="#game-replay-local" role="tab">本地录像</a> <a i18n class="nav-link" data-toggle="tab" href="#game-replay-local" role="tab">本地录像</a>
</li> </li>
<!--<li *ngIf="settingsService.getLocale().startsWith('zh')" class="nav-item">--> <!--<li *ngIf="settingsService.getLocale().startsWith('zh')" class="nav-item">-->
<!--<a class="nav-link" data-toggle="tab" href="#game-replay-bilibili" role="tab">哔哩哔哩</a>--> <!--<a class="nav-link" data-toggle="tab" href="#game-replay-bilibili" role="tab">哔哩哔哩</a>-->
<!--</li>--> <!--</li>-->
<!--<li class="nav-item">--> <!--<li class="nav-item">-->
<!--<a class="nav-link" data-toggle="tab" href="#game-replay-youtube" role="tab">YouTube</a>--> <!--<a class="nav-link" data-toggle="tab" href="#game-replay-youtube" role="tab">YouTube</a>-->
...@@ -223,89 +252,107 @@ ...@@ -223,89 +252,107 @@
<div class="tab-pane active scroll" id="game-replay-watch" role="tabpanel"> <div class="tab-pane active scroll" id="game-replay-watch" role="tabpanel">
<table class="table table-striped table-hover"> <table class="table table-striped table-hover">
<thead> <thead>
<tr> <tr>
<th class="title"> <th class="title">
<span i18n>游戏模式</span> <span i18n>游戏模式</span>
<div id="watch-filter" class="dropdown"> <div id="watch-filter" class="dropdown">
<button i18n class="btn btn-secondary dropdown-toggle btn-sm" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button i18n class="btn btn-secondary dropdown-toggle btn-sm" type="button"
筛选 id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
</button> 筛选
<div class="dropdown-menu"> </button>
<h6 i18n class="dropdown-header">匹配</h6> <div class="dropdown-menu">
<div class="form-check dropdown-item"> <h6 i18n class="dropdown-header">匹配</h6>
<input id="filter-athletic" type="checkbox" class="form-check-input" [(ngModel)]="replay_rooms_filter.athletic" (change)="refresh_replay_rooms()"> <div class="form-check dropdown-item">
<label i18n for="filter-athletic" class="form-check-label">竞技匹配</label> <input id="filter-athletic" type="checkbox" class="form-check-input"
</div> [(ngModel)]="replay_rooms_filter.athletic" (change)="refresh_replay_rooms()">
<div class="form-check dropdown-item"> <label i18n for="filter-athletic" class="form-check-label">竞技匹配</label>
<input id="filter-entertain" type="checkbox" class="form-check-input" [(ngModel)]="replay_rooms_filter.entertain" (change)="refresh_replay_rooms()"> </div>
<label i18n for="filter-entertain" class="form-check-label">娱乐匹配</label> <div class="form-check dropdown-item">
</div> <input id="filter-entertain" type="checkbox" class="form-check-input"
<h6 i18n class="dropdown-header">自定义游戏</h6> [(ngModel)]="replay_rooms_filter.entertain" (change)="refresh_replay_rooms()">
<div class="form-check dropdown-item"> <label i18n for="filter-entertain" class="form-check-label">娱乐匹配</label>
<input id="filter-single" type="checkbox" class="form-check-input" [(ngModel)]="replay_rooms_filter.single" (change)="refresh_replay_rooms()"> </div>
<label i18n for="filter-single" class="form-check-label">单局模式</label> <h6 i18n class="dropdown-header">自定义游戏</h6>
</div> <div class="form-check dropdown-item">
<div class="form-check dropdown-item"> <input id="filter-single" type="checkbox" class="form-check-input"
<input id="filter-match" type="checkbox" class="form-check-input" [(ngModel)]="replay_rooms_filter.match" (change)="refresh_replay_rooms()"> [(ngModel)]="replay_rooms_filter.single" (change)="refresh_replay_rooms()">
<label i18n for="filter-match" class="form-check-label">比赛模式</label> <label i18n for="filter-single" class="form-check-label">单局模式</label>
</div> </div>
<div class="form-check dropdown-item"> <div class="form-check dropdown-item">
<input id="filter-tag" type="checkbox" class="form-check-input" [(ngModel)]="replay_rooms_filter.tag" (change)="refresh_replay_rooms()"> <input id="filter-match" type="checkbox" class="form-check-input"
<label i18n for="filter-tag" class="form-check-label">TAG</label> [(ngModel)]="replay_rooms_filter.match" (change)="refresh_replay_rooms()">
</div> <label i18n for="filter-match" class="form-check-label">比赛模式</label>
<h6 i18n class="dropdown-header">单人模式</h6> </div>
<div class="form-check dropdown-item"> <div class="form-check dropdown-item">
<input id="filter-windbot" type="checkbox" class="form-check-input" [(ngModel)]="replay_rooms_filter.windbot" (change)="refresh_replay_rooms()"> <input id="filter-tag" type="checkbox" class="form-check-input"
<label i18n for="filter-windbot" class="form-check-label">单人模式</label> [(ngModel)]="replay_rooms_filter.tag" (change)="refresh_replay_rooms()">
<label i18n for="filter-tag" class="form-check-label">TAG</label>
</div>
<h6 i18n class="dropdown-header">单人模式</h6>
<div class="form-check dropdown-item">
<input id="filter-windbot" type="checkbox" class="form-check-input"
[(ngModel)]="replay_rooms_filter.windbot" (change)="refresh_replay_rooms()">
<label i18n for="filter-windbot" class="form-check-label">单人模式</label>
</div>
</div> </div>
</div> </div>
</div> </th>
</th> <th i18n class="users">游戏标题</th>
<th i18n class="users">游戏标题</th> <th i18n class="mode">玩家</th>
<th i18n class="mode">玩家</th> <th i18n class="extra">详情</th>
<th i18n class="extra">详情</th> </tr>
</tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let room of replay_rooms_show" class="room" (click)="join_room(room)"> <tr *ngFor="let room of replay_rooms_show" class="room" (click)="join_room(room)">
<td class="mode"> <td class="mode">
<span i18n *ngIf="room.id.startsWith('AI#')">单人模式</span> <span i18n *ngIf="room.id.startsWith('AI#')">单人模式</span>
<span i18n *ngIf="room.arena === 'athletic'">竞技匹配</span> <span i18n *ngIf="room.arena === 'athletic'">竞技匹配</span>
<span i18n *ngIf="room.arena === 'entertain'">娱乐匹配</span> <span i18n *ngIf="room.arena === 'entertain'">娱乐匹配</span>
<span i18n *ngIf="!(room.arena || room.id.startsWith('AI#')) && room.options.mode === 0">单局模式</span> <span i18n *ngIf="!(room.arena || room.id.startsWith('AI#')) && room.options.mode === 0">单局模式</span>
<span i18n *ngIf="!(room.arena || room.id.startsWith('AI#')) && room.options.mode === 1">比赛模式</span> <span i18n *ngIf="!(room.arena || room.id.startsWith('AI#')) && room.options.mode === 1">比赛模式</span>
<span i18n *ngIf="!(room.arena || room.id.startsWith('AI#')) && room.options.mode === 2">TAG</span> <span i18n *ngIf="!(room.arena || room.id.startsWith('AI#')) && room.options.mode === 2">TAG</span>
</td> </td>
<td class="title"> <td class="title">
<span *ngIf="room.private">{{room.users[0] && room.users[0].username}} 的私密房间</span> <span *ngIf="room.private">{{room.users[0] && room.users[0].username}} 的私密房间</span>
<span i18n *ngIf="room.arena || room.id.startsWith('AI#')">{{room.users[0] && room.users[0].username}} 跟 {{room.users[1] && room.users[1].username}} 的决斗</span> <span i18n
<span *ngIf="!(room.arena || room.id.startsWith('AI#') || room.private)">{{room.title}}</span> *ngIf="room.arena || room.id.startsWith('AI#')">{{room.users[0] && room.users[0].username}} 跟
</td> {{room.users[1] && room.users[1].username}} 的决斗</span>
<td class="users"> <span *ngIf="!(room.arena || room.id.startsWith('AI#') || room.private)">{{room.title}}</span>
<img *ngFor="let user of room.users" class="avatar rounded" [src]="'https://ygobbs.com/user_avatar/ygobbs.com/' + user.username + '/25/1.png'" data-toggle="tooltip" data-placement="bottom" [title]="user.username"> </td>
</td> <td class="users">
<td class="extra"> <img *ngFor="let user of room.users" class="avatar rounded"
<span *ngIf="!(room.arena || room.id.startsWith('AI#'))"> [src]="'https://ygobbs.com/user_avatar/ygobbs.com/' + user.username + '/25/1.png'"
<span *ngIf="room.options.rule != default_options.rule">{{{'0': 'OCG', '1': 'TCG', '2': 'O/T', '3': '专有卡禁止'}[room.options.rule]}}</span> data-toggle="tooltip" data-placement="bottom" [title]="user.username">
<span i18n *ngIf="room.options.start_lp != default_options.start_lp">{{room.options.start_lp}} LP</span> </td>
<span i18n *ngIf="room.options.start_hand != default_options.start_hand">{{room.options.start_hand}} 初始</span> <td class="extra">
<span i18n *ngIf="room.options.draw_count != default_options.draw_count">{{room.options.draw_count}} 抽卡</span> <span *ngIf="!(room.arena || room.id.startsWith('AI#'))">
<span i18n *ngIf="room.options.enable_priority != default_options.enable_priority">旧规则</span> <span
<span i18n *ngIf="room.options.no_check_deck != default_options.no_check_deck">不检查</span> *ngIf="room.options.rule != default_options.rule">{{{'0': 'OCG', '1': 'TCG', '2': 'O/T', '3': '专有卡禁止'}[room.options.rule]}}</span>
<span i18n *ngIf="room.options.no_shuffle_deck != default_options.no_shuffle_deck">不洗卡</span> <span i18n *ngIf="room.options.start_lp != default_options.start_lp">{{room.options.start_lp}}
</span> LP</span>
</td> <span i18n
</tr> *ngIf="room.options.start_hand != default_options.start_hand">{{room.options.start_hand}}
初始</span>
<span i18n
*ngIf="room.options.draw_count != default_options.draw_count">{{room.options.draw_count}}
抽卡</span>
<span i18n *ngIf="room.options.enable_priority != default_options.enable_priority">旧规则</span>
<span i18n *ngIf="room.options.no_check_deck != default_options.no_check_deck">不检查</span>
<span i18n *ngIf="room.options.no_shuffle_deck != default_options.no_shuffle_deck">不洗卡</span>
</span>
</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="tab-pane" id="game-replay-local" role="tabpanel"> <div class="tab-pane" id="game-replay-local" role="tabpanel">
<div class="list-group"> <div class="list-group">
<a *ngFor="let replay of replays" class="list-group-item list-group-item-action" (click)="watch_replay(replay)">{{replay}}</a> <a *ngFor="let replay of replays" class="list-group-item list-group-item-action"
(click)="watch_replay(replay)">{{replay}}</a>
</div> </div>
</div> </div>
<!--<div *ngIf="settingsService.getLocale().startsWith('zh')" class="tab-pane" id="game-replay-bilibili" role="tabpanel">--> <!--<div *ngIf="settingsService.getLocale().startsWith('zh')" class="tab-pane" id="game-replay-bilibili" role="tabpanel">-->
<!--<webview #bilibili src="http://m.bilibili.com/search.html?keyword=YGOPro" (did-finish-load)="bilibili_loaded()" (will-navigate)="bilibili_navigate($event)"></webview>--> <!--<webview #bilibili src="http://m.bilibili.com/search.html?keyword=YGOPro" (did-finish-load)="bilibili_loaded()" (will-navigate)="bilibili_navigate($event)"></webview>-->
<!--</div>--> <!--</div>-->
<!--<div class="tab-pane" id="game-replay-youtube" role="tabpanel">--> <!--<div class="tab-pane" id="game-replay-youtube" role="tabpanel">-->
<!--<webview #youtube src="https://m.youtube.com/results?search_query=YGOPro" (did-finish-load)="youtube_loaded()" (will-navigate)="youtube_navigate($event)"></webview>--> <!--<webview #youtube src="https://m.youtube.com/results?search_query=YGOPro" (did-finish-load)="youtube_loaded()" (will-navigate)="youtube_navigate($event)"></webview>-->
......
...@@ -509,6 +509,10 @@ export class YGOProComponent implements OnInit, OnDestroy { ...@@ -509,6 +509,10 @@ export class YGOProComponent implements OnInit, OnDestroy {
return this.join('AI#' + name, this.servers[0]); return this.join('AI#' + name, this.servers[0]);
} }
duel_chronicle(room: string) {
this.start_game(['-n',this.loginService.user.username,'-h','duelstart.com','-p','2333']);
}
async start_game(args: string[]) { async start_game(args: string[]) {
let data: any; let data: any;
let start_time: string; let start_time: string;
......
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