Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mycard Mobile
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
MyCard
Mycard Mobile
Commits
d13598cd
Commit
d13598cd
authored
Jun 17, 2018
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge
parent
6c511ff0
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
57 additions
and
57 deletions
+57
-57
src/app/match/match.component.css
src/app/match/match.component.css
+3
-3
src/app/match/match.component.html
src/app/match/match.component.html
+9
-9
src/app/new-room/new-room.component.css
src/app/new-room/new-room.component.css
+1
-1
src/app/new-room/new-room.component.ts
src/app/new-room/new-room.component.ts
+2
-2
src/app/result/result.dialog.css
src/app/result/result.dialog.css
+5
-5
src/app/result/result.dialog.html
src/app/result/result.dialog.html
+17
-17
src/app/result/result.dialog.ts
src/app/result/result.dialog.ts
+4
-4
src/app/storage.service.ts
src/app/storage.service.ts
+1
-1
src/app/toolbar/toolbar.component.html
src/app/toolbar/toolbar.component.html
+4
-4
src/app/windbot/windbot.component.html
src/app/windbot/windbot.component.html
+11
-11
No files found.
src/app/match/match.component.css
View file @
d13598cd
m
d
-icon
{
m
at
-icon
{
width
:
96px
;
height
:
96px
;
font-size
:
96px
;
}
m
d
-dialog-content
{
m
at
-dialog-content
{
display
:
flex
;
}
m
d
-dialog-actions
{
m
at
-dialog-actions
{
justify-content
:
flex-end
}
ul
{
...
...
src/app/match/match.component.html
View file @
d13598cd
<h2
m
d
-dialog-title
*ngIf=
"arena == 'athletic'"
>
竞技匹配
</h2>
<h2
m
d
-dialog-title
*ngIf=
"arena == 'entertain'"
>
娱乐匹配
</h2>
<h2
m
at
-dialog-title
*ngIf=
"arena == 'athletic'"
>
竞技匹配
</h2>
<h2
m
at
-dialog-title
*ngIf=
"arena == 'entertain'"
>
娱乐匹配
</h2>
<m
d
-dialog-content>
<m
d-icon
*ngIf=
"arena == 'athletic'"
fontSet=
"fa"
fontIcon=
"fa-futbol-o"
class=
"fa-spin"
></md
-icon>
<m
d-icon
*ngIf=
"arena == 'entertain'"
class=
"fa-spin"
>
toys
</md
-icon>
<m
at
-dialog-content>
<m
at-icon
*ngIf=
"arena == 'athletic'"
fontSet=
"fa"
fontIcon=
"fa-futbol-o"
class=
"fa-spin"
></mat
-icon>
<m
at-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>
</m
d
-dialog-content>
<m
d
-dialog-actions>
<button
m
d-button
md
-dialog-close
>
取消
</button>
</m
d
-dialog-actions>
</m
at
-dialog-content>
<m
at
-dialog-actions>
<button
m
at-button
mat
-dialog-close
>
取消
</button>
</m
at
-dialog-actions>
src/app/new-room/new-room.component.css
View file @
d13598cd
...
...
@@ -11,7 +11,7 @@ form {
/*margin: 0 10px;*/
/*}*/
m
d
-select
{
m
at
-select
{
padding
:
1.2734375em
0
;
}
...
...
src/app/new-room/new-room.component.ts
View file @
d13598cd
import
{
Component
,
ElementRef
,
HostBinding
,
ViewChild
}
from
'
@angular/core
'
;
import
{
M
d
SnackBar
}
from
'
@angular/material
'
;
import
{
M
at
SnackBar
}
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
:
M
d
SnackBar
)
{
constructor
(
public
ygopro
:
YGOProService
,
private
login
:
LoginService
,
private
snackBar
:
M
at
SnackBar
)
{
}
copy
(
host_password
:
string
)
{
...
...
src/app/result/result.dialog.css
View file @
d13598cd
m
d
-list-item
/
deep
/
.mat-list-item-content
{
m
at
-list-item
/
deep
/
.mat-list-item-content
{
justify-content
:
space-between
;
height
:
28px
!important
;
padding
:
0
}
m
d
-grid-list
{
m
at
-grid-list
{
font-size
:
14px
;
}
m
d-grid-tile
dt
,
md
-grid-tile
dd
{
m
at-grid-tile
dt
,
mat
-grid-tile
dd
{
width
:
100%
;
}
m
d
-grid-tile
{
m
at
-grid-tile
{
text-align
:
left
;
}
m
d
-grid-tile
dd
{
m
at
-grid-tile
dd
{
margin
:
0
;
text-align
:
left
;
}
...
...
src/app/result/result.dialog.html
View file @
d13598cd
<h2
m
d
-dialog-title
*ngIf=
"result === 'win'"
>
胜利
</h2>
<h2
m
d
-dialog-title
*ngIf=
"result === 'lose'"
>
败北
</h2>
<h2
m
d
-dialog-title
*ngIf=
"result === 'draw'"
>
平局
</h2>
<m
d
-dialog-content>
<m
d
-list
[ngClass]=
"result"
*ngIf=
"dp || exp || firstWin"
>
<m
d
-list-item
*ngIf=
"dp"
>
<h2
m
at
-dialog-title
*ngIf=
"result === 'win'"
>
胜利
</h2>
<h2
m
at
-dialog-title
*ngIf=
"result === 'lose'"
>
败北
</h2>
<h2
m
at
-dialog-title
*ngIf=
"result === 'draw'"
>
平局
</h2>
<m
at
-dialog-content>
<m
at
-list
[ngClass]=
"result"
*ngIf=
"dp || exp || firstWin"
>
<m
at
-list-item
*ngIf=
"dp"
>
<dt>
D.P
</dt>
<dd>
{{dp}}
</dd>
</m
d
-list-item>
<m
d
-list-item
*ngIf=
"exp"
>
</m
at
-list-item>
<m
at
-list-item
*ngIf=
"exp"
>
<dt>
EXP
</dt>
<dd>
{{exp}}
</dd>
</m
d
-list-item>
<m
d
-list-item
*ngIf=
"firstWin"
>
</m
at
-list-item>
<m
at
-list-item
*ngIf=
"firstWin"
>
<dt>
D.P (首胜)
</dt>
<dd>
{{firstWin}}
</dd>
</m
d
-list-item>
</m
d
-list>
</m
d
-dialog-content>
<m
d
-dialog-actions>
<button
m
d-button
md
-dialog-close
>
关闭
</button>
</m
at
-list-item>
</m
at
-list>
</m
at
-dialog-content>
<m
at
-dialog-actions>
<button
m
at-button
mat
-dialog-close
>
关闭
</button>
<!-- Can optionally provide a result for the closing dialog. -->
<button
m
d
-button
(click)=
"again()"
>
再来一局
</button>
</m
d
-dialog-actions>
<button
m
at
-button
(click)=
"again()"
>
再来一局
</button>
</m
at
-dialog-actions>
src/app/result/result.dialog.ts
View file @
d13598cd
import
{
Component
,
Inject
}
from
'
@angular/core
'
;
import
{
Http
}
from
'
@angular/http
'
;
import
{
M
D_DIALOG_DATA
,
MdDialog
,
Md
DialogRef
}
from
'
@angular/material
'
;
import
{
M
AT_DIALOG_DATA
,
MatDialog
,
Mat
DialogRef
}
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
(
M
D
_DIALOG_DATA
)
public
last
:
any
,
constructor
(@
Inject
(
M
AT
_DIALOG_DATA
)
public
last
:
any
,
public
login
:
LoginService
,
private
http
:
Http
,
public
dialog
:
M
d
Dialog
,
private
dialogRef
:
M
d
DialogRef
<
MatchDialogComponent
>
)
{
public
dialog
:
M
at
Dialog
,
private
dialogRef
:
M
at
DialogRef
<
MatchDialogComponent
>
)
{
if
(
this
.
last
.
userscorea
===
this
.
last
.
userscoreb
)
{
this
.
result
=
'
draw
'
;
}
else
if
(
this
.
last
.
winner
===
this
.
login
.
user
.
username
)
{
...
...
src/app/storage.service.ts
View file @
d13598cd
...
...
@@ -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
());
...
...
src/app/toolbar/toolbar.component.html
View file @
d13598cd
<m
d
-toolbar
color=
"primary"
>
<button
m
d
-icon-button
(click)=
"history.back()"
>
<m
d-icon>

</md
-icon>
<!--arrow_back-->
</button>
<m
at
-toolbar
color=
"primary"
>
<button
m
at
-icon-button
(click)=
"history.back()"
>
<m
at-icon>

</mat
-icon>
<!--arrow_back-->
</button>
<span><ng-content></ng-content></span>
</m
d
-toolbar>
</m
at
-toolbar>
src/app/windbot/windbot.component.html
View file @
d13598cd
<app-toolbar>
单人模式
</app-toolbar>
<m
d
-list>
<h3
m
d
-subheader
>
选择对手
</h3>
<m
d
-list-item
(click)=
"ygopro.join_windbot()"
>
<m
d-icon
md-list-icon
>

</md
-icon>
<!-- airplanemode_active -->
<h4
m
d
-line
>
随机
</h4>
</m
d
-list-item>
<m
d
-list-item
*ngFor=
"let windbot of ygopro.windbot"
(click)=
"ygopro.join_windbot(windbot)"
>
<img
m
d
-list-icon
[src]=
"login.avatar(windbot)"
>
<h4
m
d
-line
>
{{windbot}}
</h4>
</m
d
-list-item>
</m
d
-list>
<m
at
-list>
<h3
m
at
-subheader
>
选择对手
</h3>
<m
at
-list-item
(click)=
"ygopro.join_windbot()"
>
<m
at-icon
mat-list-icon
>

</mat
-icon>
<!-- airplanemode_active -->
<h4
m
at
-line
>
随机
</h4>
</m
at
-list-item>
<m
at
-list-item
*ngFor=
"let windbot of ygopro.windbot"
(click)=
"ygopro.join_windbot(windbot)"
>
<img
m
at
-list-icon
[src]=
"login.avatar(windbot)"
>
<h4
m
at
-line
>
{{windbot}}
</h4>
</m
at
-list-item>
</m
at
-list>
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