Commit d13598cd authored by 神楽坂玲奈's avatar 神楽坂玲奈

merge

parent 6c511ff0
md-icon {
mat-icon {
width: 96px;
height: 96px;
font-size: 96px;
}
md-dialog-content {
mat-dialog-content {
display: flex;
}
md-dialog-actions {
mat-dialog-actions {
justify-content: flex-end
}
ul {
......
<h2 md-dialog-title *ngIf="arena == 'athletic'">竞技匹配</h2>
<h2 md-dialog-title *ngIf="arena == 'entertain'">娱乐匹配</h2>
<h2 mat-dialog-title *ngIf="arena == 'athletic'">竞技匹配</h2>
<h2 mat-dialog-title *ngIf="arena == 'entertain'">娱乐匹配</h2>
<md-dialog-content>
<md-icon *ngIf="arena == 'athletic'" fontSet="fa" fontIcon="fa-futbol-o" class="fa-spin"></md-icon>
<md-icon *ngIf="arena == 'entertain'" class="fa-spin">toys</md-icon>
<mat-dialog-content>
<mat-icon *ngIf="arena == 'athletic'" fontSet="fa" fontIcon="fa-futbol-o" class="fa-spin"></mat-icon>
<mat-icon *ngIf="arena == 'entertain'" class="fa-spin">toys</mat-icon>
<ul>
<dt>预计等待时间</dt>
<dd>{{expect_wait | async | date: 'mm:ss'}}</dd>
<dt>实际等待时间</dt>
<dd>{{actual_wait | async | date: 'mm:ss'}}</dd>
</ul>
</md-dialog-content>
<md-dialog-actions>
<button md-button md-dialog-close>取消</button>
</md-dialog-actions>
</mat-dialog-content>
<mat-dialog-actions>
<button mat-button mat-dialog-close>取消</button>
</mat-dialog-actions>
......@@ -11,7 +11,7 @@ form {
/*margin: 0 10px;*/
/*}*/
md-select {
mat-select {
padding: 1.2734375em 0;
}
......
import { Component, ElementRef, HostBinding, ViewChild } from '@angular/core';
import { MdSnackBar } from '@angular/material';
import { MatSnackBar } from '@angular/material';
import { LoginService } from '../login.service';
import { routerTransition } from '../router.animations';
import { YGOProService } from '../ygopro.service';
......@@ -27,7 +27,7 @@ export class NewRoomComponent {
options: {...this.ygopro.default_options}
};
constructor(public ygopro: YGOProService, private login: LoginService, private snackBar: MdSnackBar) {
constructor(public ygopro: YGOProService, private login: LoginService, private snackBar: MatSnackBar) {
}
copy(host_password: string) {
......
md-list-item /deep/ .mat-list-item-content {
mat-list-item /deep/ .mat-list-item-content {
justify-content: space-between;
height: 28px !important;
padding: 0
}
md-grid-list {
mat-grid-list {
font-size: 14px;
}
md-grid-tile dt, md-grid-tile dd {
mat-grid-tile dt, mat-grid-tile dd {
width: 100%;
}
md-grid-tile {
mat-grid-tile {
text-align: left;
}
md-grid-tile dd {
mat-grid-tile dd {
margin: 0;
text-align: left;
}
......
<h2 md-dialog-title *ngIf="result === 'win'">胜利</h2>
<h2 md-dialog-title *ngIf="result === 'lose'">败北</h2>
<h2 md-dialog-title *ngIf="result === 'draw'">平局</h2>
<md-dialog-content>
<md-list [ngClass]="result" *ngIf="dp || exp || firstWin">
<md-list-item *ngIf="dp">
<h2 mat-dialog-title *ngIf="result === 'win'">胜利</h2>
<h2 mat-dialog-title *ngIf="result === 'lose'">败北</h2>
<h2 mat-dialog-title *ngIf="result === 'draw'">平局</h2>
<mat-dialog-content>
<mat-list [ngClass]="result" *ngIf="dp || exp || firstWin">
<mat-list-item *ngIf="dp">
<dt>D.P</dt>
<dd>{{dp}}</dd>
</md-list-item>
<md-list-item *ngIf="exp">
</mat-list-item>
<mat-list-item *ngIf="exp">
<dt>EXP</dt>
<dd>{{exp}}</dd>
</md-list-item>
<md-list-item *ngIf="firstWin">
</mat-list-item>
<mat-list-item *ngIf="firstWin">
<dt>D.P (首胜)</dt>
<dd>{{firstWin}}</dd>
</md-list-item>
</md-list>
</md-dialog-content>
<md-dialog-actions>
<button md-button md-dialog-close>关闭</button>
</mat-list-item>
</mat-list>
</mat-dialog-content>
<mat-dialog-actions>
<button mat-button mat-dialog-close>关闭</button>
<!-- Can optionally provide a result for the closing dialog. -->
<button md-button (click)="again()">再来一局</button>
</md-dialog-actions>
<button mat-button (click)="again()">再来一局</button>
</mat-dialog-actions>
import { Component, Inject } from '@angular/core';
import { Http } from '@angular/http';
import { MD_DIALOG_DATA, MdDialog, MdDialogRef } from '@angular/material';
import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material';
import { LoginService } from '../login.service';
import { MatchDialogComponent } from '../match/match.component';
......@@ -15,11 +15,11 @@ export class ResultDialogComponent {
exp: string | undefined;
firstWin: string | undefined;
constructor(@Inject(MD_DIALOG_DATA) public last: any,
constructor(@Inject(MAT_DIALOG_DATA) public last: any,
public login: LoginService,
private http: Http,
public dialog: MdDialog,
private dialogRef: MdDialogRef<MatchDialogComponent>) {
public dialog: MatDialog,
private dialogRef: MatDialogRef<MatchDialogComponent>) {
if (this.last.userscorea === this.last.userscoreb) {
this.result = 'draw';
} else if (this.last.winner === this.login.user.username) {
......
......@@ -120,7 +120,7 @@ export class StorageService {
this.working = true;
// console.log('download', local_path, remote_path, index_path, time);
const data: Uint8Array = await this.client.getFileContents(remote_path);
window.ygopro.writeFile(local_path, Buffer.from(data.buffer).toString('base64'));
window.ygopro.writeFile(local_path, Buffer.from(<ArrayBuffer>data.buffer).toString('base64'));
window.ygopro.setFileLastModified(local_path, time);
// console.log(local_path, time);
localStorage.setItem(index_path, time.toString());
......
<md-toolbar color="primary">
<button md-icon-button (click)="history.back()">
<md-icon>&#xe5c4;</md-icon><!--arrow_back--></button>
<mat-toolbar color="primary">
<button mat-icon-button (click)="history.back()">
<mat-icon>&#xe5c4;</mat-icon><!--arrow_back--></button>
<span><ng-content></ng-content></span>
</md-toolbar>
</mat-toolbar>
<app-toolbar>单人模式</app-toolbar>
<md-list>
<h3 md-subheader>选择对手</h3>
<md-list-item (click)="ygopro.join_windbot()">
<md-icon md-list-icon>&#xe195;</md-icon><!-- airplanemode_active -->
<h4 md-line>随机</h4>
</md-list-item>
<md-list-item *ngFor="let windbot of ygopro.windbot" (click)="ygopro.join_windbot(windbot)">
<img md-list-icon [src]="login.avatar(windbot)">
<h4 md-line>{{windbot}}</h4>
</md-list-item>
</md-list>
<mat-list>
<h3 mat-subheader>选择对手</h3>
<mat-list-item (click)="ygopro.join_windbot()">
<mat-icon mat-list-icon>&#xe195;</mat-icon><!-- airplanemode_active -->
<h4 mat-line>随机</h4>
</mat-list-item>
<mat-list-item *ngFor="let windbot of ygopro.windbot" (click)="ygopro.join_windbot(windbot)">
<img mat-list-icon [src]="login.avatar(windbot)">
<h4 mat-line>{{windbot}}</h4>
</mat-list-item>
</mat-list>
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