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
3572684b
Commit
3572684b
authored
Jul 23, 2017
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
android 4.4 fix
parent
9b48080f
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
29 deletions
+24
-29
src/app/lobby/lobby.component.css
src/app/lobby/lobby.component.css
+1
-0
src/app/lobby/lobby.component.html
src/app/lobby/lobby.component.html
+6
-4
src/app/new-room/new-room.component.html
src/app/new-room/new-room.component.html
+2
-2
src/app/toolbar/toolbar.component.html
src/app/toolbar/toolbar.component.html
+2
-1
src/app/windbot/windbot.component.html
src/app/windbot/windbot.component.html
+1
-1
src/app/ygopro.service.ts
src/app/ygopro.service.ts
+11
-20
tsconfig.json
tsconfig.json
+1
-1
No files found.
src/app/lobby/lobby.component.css
View file @
3572684b
...
@@ -74,6 +74,7 @@ md-card-content {
...
@@ -74,6 +74,7 @@ md-card-content {
.icon
{
.icon
{
font-size
:
20px
;
font-size
:
20px
;
line-height
:
24px
;
}
}
#avatar
/
deep
/
.mat-button-wrapper
{
#avatar
/
deep
/
.mat-button-wrapper
{
...
...
src/app/lobby/lobby.component.html
View file @
3572684b
<!--https://github.com/google/material-design-icons/blob/master/iconfont/codepoints-->
<md-toolbar
color=
"primary"
>
<md-toolbar
color=
"primary"
>
<button
id=
"menu"
md-icon-button
(click)=
"ygopro.openDrawer()"
>
<button
id=
"menu"
md-icon-button
(click)=
"ygopro.openDrawer()"
>
<md-icon>
menu
</md-icon>
<md-icon>
menu
</md-icon>
...
@@ -44,13 +46,13 @@
...
@@ -44,13 +46,13 @@
<md-icon>
games
</md-icon>
<md-icon>
games
</md-icon>
<br>
房间列表
</a></md-grid-tile>
<br>
房间列表
</a></md-grid-tile>
<md-grid-tile><a
md-raised-button
color=
"primary"
routerLink=
"/ygopro/rooms/new"
>
<md-grid-tile><a
md-raised-button
color=
"primary"
routerLink=
"/ygopro/rooms/new"
>
<md-icon>
add_box
</md-icon
>
<md-icon>

</md-icon>
<!--add_box--
>
<br>
创建房间
</a></md-grid-tile>
<br>
创建房间
</a></md-grid-tile>
<md-grid-tile><a
md-raised-button
routerLink=
"/ygopro/windbot"
>
<md-grid-tile><a
md-raised-button
routerLink=
"/ygopro/windbot"
>
<md-icon>
airplanemode_active
</md-icon
>
<md-icon>

</md-icon>
<!-- airplanemode_active --
>
<br>
单人模式
</a></md-grid-tile>
<br>
单人模式
</a></md-grid-tile>
<md-grid-tile><a
md-raised-button
routerLink=
"/ygopro/watch"
>
<md-grid-tile><a
md-raised-button
routerLink=
"/ygopro/watch"
>
<md-icon>
remove_red_eye
</md-icon
>
<md-icon>

</md-icon>
<!--remove_red_eye--
>
<br>
观战
</a></md-grid-tile>
<br>
观战
</a></md-grid-tile>
<!--<md-grid-tile>-->
<!--<md-grid-tile>-->
<!--<button md-raised-button (click)="ygopro.watch_replay()">-->
<!--<button md-raised-button (click)="ygopro.watch_replay()">-->
...
...
src/app/new-room/new-room.component.html
View file @
3572684b
...
@@ -7,12 +7,12 @@
...
@@ -7,12 +7,12 @@
</md-input-container>
</md-input-container>
<md-input-container
*ngIf=
"room.private"
class=
"full-width"
>
<md-input-container
*ngIf=
"room.private"
class=
"full-width"
>
<md-placeholder>
<md-placeholder>
<md-icon>
vpn_key
</md-icon
>
<md-icon>

</md-icon>
<!-- vpn_key --
>
<span>
房间密码
</span>
<span>
房间密码
</span>
</md-placeholder>
</md-placeholder>
<input
#hostPasswordInput
mdInput
name=
"title"
[(ngModel)]=
"host_password"
readonly
>
<input
#hostPasswordInput
mdInput
name=
"title"
[(ngModel)]=
"host_password"
readonly
>
<button
type=
"button"
md-icon-button
mdSuffix
(click)=
"copy(host_password)"
>
<button
type=
"button"
md-icon-button
mdSuffix
(click)=
"copy(host_password)"
>
<md-icon>
content_copy
</md-icon
>
<md-icon>

</md-icon>
<!-- content_copy --
>
</button>
</button>
<button
type=
"button"
md-icon-button
mdSuffix
(click)=
"share(host_password)"
>
<button
type=
"button"
md-icon-button
mdSuffix
(click)=
"share(host_password)"
>
<md-icon>
share
</md-icon>
<md-icon>
share
</md-icon>
...
...
src/app/toolbar/toolbar.component.html
View file @
3572684b
<md-toolbar
color=
"primary"
>
<md-toolbar
color=
"primary"
>
<button
md-icon-button
(click)=
"history.back()"
><md-icon>
arrow_back
</md-icon></button>
<button
md-icon-button
(click)=
"history.back()"
>
<md-icon>

</md-icon>
<!--arrow_back-->
</button>
<span><ng-content></ng-content></span>
<span><ng-content></ng-content></span>
</md-toolbar>
</md-toolbar>
src/app/windbot/windbot.component.html
View file @
3572684b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<md-list>
<md-list>
<h3
md-subheader
>
选择对手
</h3>
<h3
md-subheader
>
选择对手
</h3>
<md-list-item
(click)=
"ygopro.join_windbot()"
>
<md-list-item
(click)=
"ygopro.join_windbot()"
>
<md-icon
md-list-icon
>
airplanemode_active
</md-icon
>
<md-icon
md-list-icon
>

</md-icon>
<!-- airplanemode_active --
>
<h4
md-line
>
随机
</h4>
<h4
md-line
>
随机
</h4>
</md-list-item>
</md-list-item>
<md-list-item
*ngFor=
"let windbot of ygopro.windbot"
(click)=
"ygopro.join_windbot(windbot)"
>
<md-list-item
*ngFor=
"let windbot of ygopro.windbot"
(click)=
"ygopro.join_windbot(windbot)"
>
...
...
src/app/ygopro.service.ts
View file @
3572684b
...
@@ -207,28 +207,19 @@ export class YGOProService {
...
@@ -207,28 +207,19 @@ export class YGOProService {
// 那些兼容性的垃圾事儿
// 那些兼容性的垃圾事儿
// https://www.html5rocks.com/en/tutorials/pagevisibility/intro/
// https://www.html5rocks.com/en/tutorials/pagevisibility/intro/
function
getHiddenProp
()
{
const
prefixes
=
[
'
webkit
'
,
'
moz
'
,
'
ms
'
,
'
o
'
];
// if 'hidden' is natively supported just return it
const
hidden
=
[
'
hidden
'
,
'
webkitHidden
'
,
'
mozHidden
'
,
'
msHidden
'
,
'
oHidden
'
].
find
((
prop
)
=>
prop
in
document
);
if
(
'
hidden
'
in
document
)
return
'
hidden
'
;
if
(
hidden
)
{
const
evtname
=
hidden
.
replace
(
/
[
H|h
]
idden/
,
''
)
+
'
visibilitychange
'
;
// otherwise loop over all the known prefixes until we find one
Observable
.
fromEvent
(
document
,
evtname
).
subscribe
(()
=>
{
for
(
let
i
=
0
;
i
<
prefixes
.
length
;
i
++
)
{
if
(
!
document
[
hidden
])
{
if
((
prefixes
[
i
]
+
'
Hidden
'
)
in
document
)
this
.
load_result
();
return
prefixes
[
i
]
+
'
Hidden
'
;
}
// otherwise it's not supported
return
null
;
}
}
});
const
visProp
=
getHiddenProp
();
if
(
visProp
)
{
const
evtname
=
visProp
.
replace
(
/
[
H|h
]
idden/
,
''
)
+
'
visibilitychange
'
;
Observable
.
fromEvent
(
document
,
evtname
).
subscribe
(
async
()
=>
!
document
[
visProp
]
&&
this
.
load_result
());
}
else
{
}
else
{
alert
(
'
调试信息1,看到的话请联系zh99998@gmail.com
'
);
Observable
.
fromEvent
(
window
,
'
focus
'
).
subscribe
(()
=>
{
this
.
load_result
();
});
}
}
}
}
...
...
tsconfig.json
View file @
3572684b
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
"node_modules/@types"
"node_modules/@types"
],
],
"lib"
:
[
"lib"
:
[
"es201
6
"
,
"es201
7
"
,
"dom.iterable"
"dom.iterable"
]
]
}
}
...
...
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