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

merge

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