Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
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
syntax_j
mycard
Commits
b884a9ec
Commit
b884a9ec
authored
Oct 29, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reformat code
parent
ba81af1e
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
199 additions
and
173 deletions
+199
-173
app/app-detail.component.css
app/app-detail.component.css
+3
-4
app/apps.component.html
app/apps.component.html
+3
-6
app/community.component.ts
app/community.component.ts
+3
-2
app/lobby.component.html
app/lobby.component.html
+1
-3
app/login.component.css
app/login.component.css
+1
-0
app/login.service.ts
app/login.service.ts
+0
-1
app/main.ts
app/main.ts
+2
-3
app/mycard.component.html
app/mycard.component.html
+4
-8
app/roster.component.ts
app/roster.component.ts
+3
-2
app/store.component.ts
app/store.component.ts
+3
-2
app/ygopro.component.css
app/ygopro.component.css
+11
-2
app/ygopro.component.html
app/ygopro.component.html
+13
-29
app/ygopro.component.ts
app/ygopro.component.ts
+117
-76
sort_apps.js
sort_apps.js
+35
-35
No files found.
app/app-detail.component.css
View file @
b884a9ec
...
@@ -5,12 +5,10 @@
...
@@ -5,12 +5,10 @@
padding
:
1rem
;
padding
:
1rem
;
}
}
.list-group
{
.list-group
{
width
:
20rem
;
width
:
20rem
;
}
}
.news-block
{
.news-block
{
padding
:
0
;
padding
:
0
;
}
}
...
@@ -27,6 +25,7 @@ progress {
...
@@ -27,6 +25,7 @@ progress {
#news
h3
{
#news
h3
{
font-size
:
1.5rem
;
font-size
:
1.5rem
;
}
}
#news
p
{
#news
p
{
margin-bottom
:
0
;
margin-bottom
:
0
;
}
}
...
@@ -42,12 +41,12 @@ progress {
...
@@ -42,12 +41,12 @@ progress {
width
:
300px
;
width
:
300px
;
}
}
#network
.input-group-btn
>
.btn
:not
(
:last-child
)
:not
(
.dropdown-toggle
)
{
#network
.input-group-btn
>
.btn
:not
(
:last-child
)
:not
(
.dropdown-toggle
)
{
border-bottom-right-radius
:
0
;
border-bottom-right-radius
:
0
;
border-top-right-radius
:
0
;
border-top-right-radius
:
0
;
}
}
#network
.input-group-btn
>
.dropdown-toggle
{
#network
.input-group-btn
>
.dropdown-toggle
{
border-bottom-left-radius
:
0
;
border-bottom-left-radius
:
0
;
border-top-left-radius
:
0
;
border-top-left-radius
:
0
;
}
}
\ No newline at end of file
app/apps.component.html
View file @
b884a9ec
...
@@ -3,20 +3,17 @@
...
@@ -3,20 +3,17 @@
<li
*ngFor=
"let app of grouped_apps.installed"
[class.active]=
"app===appsService.currentApp"
>
<li
*ngFor=
"let app of grouped_apps.installed"
[class.active]=
"app===appsService.currentApp"
>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
</li>
</li>
</ul>
</ul><span
*ngIf=
"grouped_apps.yugioh"
>
游戏王
</span>
<span
*ngIf=
"grouped_apps.yugioh"
>
游戏王
</span>
<ul
*ngIf=
"grouped_apps.yugioh"
class=
"nav nav-sidebar"
>
<ul
*ngIf=
"grouped_apps.yugioh"
class=
"nav nav-sidebar"
>
<li
*ngFor=
"let app of grouped_apps.yugioh"
[class.active]=
"app===appsService.currentApp"
>
<li
*ngFor=
"let app of grouped_apps.yugioh"
[class.active]=
"app===appsService.currentApp"
>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
</li>
</li>
</ul>
</ul><span
*ngIf=
"grouped_apps.touhou"
>
东方 Project
</span>
<span
*ngIf=
"grouped_apps.touhou"
>
东方 Project
</span>
<ul
*ngIf=
"grouped_apps.touhou"
class=
"nav nav-sidebar"
>
<ul
*ngIf=
"grouped_apps.touhou"
class=
"nav nav-sidebar"
>
<li
*ngFor=
"let app of grouped_apps.touhou"
[class.active]=
"app===appsService.currentApp"
>
<li
*ngFor=
"let app of grouped_apps.touhou"
[class.active]=
"app===appsService.currentApp"
>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
</li>
</li>
</ul>
</ul><span
*ngIf=
"grouped_apps.touhou_pc98"
>
东方旧作
</span>
<span
*ngIf=
"grouped_apps.touhou_pc98"
>
东方旧作
</span>
<ul
*ngIf=
"grouped_apps.touhou_pc98"
class=
"nav nav-sidebar"
>
<ul
*ngIf=
"grouped_apps.touhou_pc98"
class=
"nav nav-sidebar"
>
<li
*ngFor=
"let app of grouped_apps.touhou_pc98"
[class.active]=
"app===appsService.currentApp"
>
<li
*ngFor=
"let app of grouped_apps.touhou_pc98"
[class.active]=
"app===appsService.currentApp"
>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
<a
(click)=
"chooseApp(app)"
href=
"#"
>
{{app.name}}
</a>
...
...
app/community.component.ts
View file @
b884a9ec
...
@@ -2,10 +2,11 @@
...
@@ -2,10 +2,11 @@
* Created by zh99998 on 16/9/2.
* Created by zh99998 on 16/9/2.
*/
*/
import
{
Component
}
from
'
@angular/core
'
;
import
{
Component
}
from
"
@angular/core
"
;
@
Component
({
@
Component
({
selector
:
'
community
'
,
selector
:
'
community
'
,
templateUrl
:
'
app/community.component.html
'
,
templateUrl
:
'
app/community.component.html
'
,
styleUrls
:
[
'
app/community.component.css
'
],
styleUrls
:
[
'
app/community.component.css
'
],
})
})
export
class
CommunityComponent
{
}
export
class
CommunityComponent
{
}
app/lobby.component.html
View file @
b884a9ec
...
@@ -4,6 +4,4 @@
...
@@ -4,6 +4,4 @@
<app-detail
*ngIf=
"appsService._currentApp"
></app-detail>
<app-detail
*ngIf=
"appsService._currentApp"
></app-detail>
<roster></roster>
<roster></roster>
</div>
</div>
<webview
id=
"candy"
<webview
id=
"candy"
[src]=
"candy_url"
nodeintegration
></webview>
[src]=
"candy_url"
\ No newline at end of file
nodeintegration
></webview>
\ No newline at end of file
app/login.component.css
View file @
b884a9ec
:host
{
:host
{
display
:
flex
;
display
:
flex
;
}
}
webview
{
webview
{
flex-grow
:
1
;
flex-grow
:
1
;
}
}
\ No newline at end of file
app/login.service.ts
View file @
b884a9ec
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
Http
}
from
"
@angular/http
"
;
import
{
Http
}
from
"
@angular/http
"
;
interface
User
{
interface
User
{
admin
:
boolean
;
admin
:
boolean
;
avatar_url
:
string
;
avatar_url
:
string
;
...
...
app/main.ts
View file @
b884a9ec
import
{
platformBrowserDynamic
}
from
'
@angular/platform-browser-dynamic
'
;
import
{
platformBrowserDynamic
}
from
"
@angular/platform-browser-dynamic
"
;
import
{
MyCard
}
from
'
./mycard.module
'
;
import
{
MyCard
}
from
"
./mycard.module
"
;
import
{
enableProdMode
}
from
'
@angular/core
'
;
//enableProdMode();
//enableProdMode();
platformBrowserDynamic
().
bootstrapModule
(
MyCard
);
platformBrowserDynamic
().
bootstrapModule
(
MyCard
);
app/mycard.component.html
View file @
b884a9ec
...
@@ -18,11 +18,9 @@
...
@@ -18,11 +18,9 @@
</ul>
</ul>
<div
class=
"navbar-right"
>
<div
class=
"navbar-right"
>
<div
id=
"user"
*ngIf=
"loginService.user"
>
<div
id=
"user"
*ngIf=
"loginService.user"
>
<a
href=
"#forum"
class=
"require-login profile"
>
<a
class=
"require-login profile"
><img
id=
"avatar"
[src]=
"loginService.user.avatar_url"
alt=
"image"
></a>
<img
id=
"avatar"
[src]=
"loginService.user.avatar_url"
alt=
"image"
>
<a
class=
"require-login profile item"
id=
"username"
></a>
</a>
<a
(click)=
"loginService.logout()"
id=
"logout"
class=
"require-login item"
>
切换账号
</a>
<a
href=
"#forum"
class=
"require-login profile item"
id=
"username"
></a>
<a
(click)=
"loginService.logout()"
href=
"#ygopro"
id=
"logout"
class=
"require-login item"
>
切换账号
</a>
<!--<a (click)="refresh()" href="#ygopro" id="refresh" class="item">刷新</a>-->
<!--<a (click)="refresh()" href="#ygopro" id="refresh" class="item">刷新</a>-->
</div>
</div>
<div
id=
"window-buttons"
[hidden]=
"platform == 'darwin'"
>
<div
id=
"window-buttons"
[hidden]=
"platform == 'darwin'"
>
...
@@ -33,9 +31,7 @@
...
@@ -33,9 +31,7 @@
</div>
</div>
</div>
</div>
</nav>
</nav>
<login
class=
"page"
*ngIf=
"!loginService.user"
></login>
<login
class=
"page"
*ngIf=
"!loginService.user"
></login>
<store
class=
"page"
*ngIf=
"loginService.user"
[hidden]=
"currentPage != 'store'"
></store>
<store
class=
"page"
*ngIf=
"loginService.user"
[hidden]=
"currentPage != 'store'"
></store>
<lobby
class=
"page"
*ngIf=
"loginService.user"
[hidden]=
"currentPage != 'lobby'"
></lobby>
<lobby
class=
"page"
*ngIf=
"loginService.user"
[hidden]=
"currentPage != 'lobby'"
></lobby>
<webview
id=
"community"
class=
"page"
*ngIf=
"loginService.user"
[hidden]=
"currentPage != 'community'"
<webview
id=
"community"
class=
"page"
*ngIf=
"loginService.user"
[hidden]=
"currentPage != 'community'"
src=
"https://ygobbs.com"
></webview>
src=
"https://ygobbs.com"
></webview>
\ No newline at end of file
\ No newline at end of file
app/roster.component.ts
View file @
b884a9ec
/**
/**
* Created by zh99998 on 16/9/2.
* Created by zh99998 on 16/9/2.
*/
*/
import
{
Component
}
from
'
@angular/core
'
;
import
{
Component
}
from
"
@angular/core
"
;
@
Component
({
@
Component
({
selector
:
'
roster
'
,
selector
:
'
roster
'
,
templateUrl
:
'
app/roster.component.html
'
,
templateUrl
:
'
app/roster.component.html
'
,
styleUrls
:
[
'
app/roster.component.css
'
],
styleUrls
:
[
'
app/roster.component.css
'
],
})
})
export
class
RosterComponent
{
}
export
class
RosterComponent
{
}
app/store.component.ts
View file @
b884a9ec
/**
/**
* Created by zh99998 on 16/9/2.
* Created by zh99998 on 16/9/2.
*/
*/
import
{
Component
}
from
'
@angular/core
'
;
import
{
Component
}
from
"
@angular/core
"
;
@
Component
({
@
Component
({
selector
:
'
store
'
,
selector
:
'
store
'
,
templateUrl
:
'
app/store.component.html
'
,
templateUrl
:
'
app/store.component.html
'
,
styleUrls
:
[
'
app/store.component.css
'
],
styleUrls
:
[
'
app/store.component.css
'
],
})
})
export
class
StoreComponent
{
}
export
class
StoreComponent
{
}
app/ygopro.component.css
View file @
b884a9ec
...
@@ -3,10 +3,12 @@
...
@@ -3,10 +3,12 @@
overflow-y
:
auto
;
overflow-y
:
auto
;
height
:
21.5rem
;
height
:
21.5rem
;
}
}
#game-list-modal
thead
{
#game-list-modal
thead
{
position
:
relative
;
position
:
relative
;
display
:
block
;
display
:
block
;
}
}
#game-list-modal
tr
{
#game-list-modal
tr
{
width
:
100%
;
width
:
100%
;
display
:
table
;
display
:
table
;
...
@@ -15,6 +17,7 @@
...
@@ -15,6 +17,7 @@
#game-list-modal
.table
{
#game-list-modal
.table
{
margin-bottom
:
0
;
margin-bottom
:
0
;
}
}
#game-list-modal
.avatar
{
#game-list-modal
.avatar
{
width
:
25px
;
width
:
25px
;
height
:
25px
;
height
:
25px
;
...
@@ -31,10 +34,12 @@
...
@@ -31,10 +34,12 @@
top
:
15px
;
top
:
15px
;
right
:
15px
;
right
:
15px
;
}
}
#game-list-modal
.modal-header
{
#game-list-modal
.modal-header
{
padding-left
:
0
;
padding-left
:
0
;
padding-right
:
0
;
padding-right
:
0
;
}
}
#game-list-modal
.modal-header
th
{
#game-list-modal
.modal-header
th
{
line-height
:
36px
;
line-height
:
36px
;
padding-top
:
0
;
padding-top
:
0
;
...
@@ -42,16 +47,17 @@
...
@@ -42,16 +47,17 @@
border
:
none
;
border
:
none
;
}
}
#game-list-modal
.modal-body
{
#game-list-modal
.modal-body
{
padding
:
0
;
padding
:
0
;
height
:
21.4rem
;
height
:
21.4rem
;
}
}
#game-list-modal
.modal-body
tr
:first-child
td
{
#game-list-modal
.modal-body
tr
:first-child
td
{
border-top
:
none
;
border-top
:
none
;
}
}
#game-list-modal
.modal-body
tr
:last-child
td
{
#game-list-modal
.modal-body
tr
:last-child
td
{
border-bottom
:
none
;
border-bottom
:
none
;
}
}
...
@@ -59,12 +65,15 @@
...
@@ -59,12 +65,15 @@
#game-list-modal
.title
{
#game-list-modal
.title
{
width
:
25%
;
width
:
25%
;
}
}
#game-list-modal
.users
{
#game-list-modal
.users
{
width
:
20%
;
width
:
20%
;
}
}
#game-list-modal
.mode
{
#game-list-modal
.mode
{
width
:
20%
;
width
:
20%
;
}
}
#game-list-modal
.extra
{
#game-list-modal
.extra
{
width
:
35%
;
width
:
35%
;
}
}
...
...
app/ygopro.component.html
View file @
b884a9ec
...
@@ -18,8 +18,7 @@
...
@@ -18,8 +18,7 @@
<button
type=
"button"
class=
"btn btn-secondary"
data-toggle=
"modal"
data-target=
"#game-create-windbot"
>
单人模式
</button>
<button
type=
"button"
class=
"btn btn-secondary"
data-toggle=
"modal"
data-target=
"#game-create-windbot"
>
单人模式
</button>
</div>
</div>
<div
class=
"modal fade"
id=
"game-create-windbot"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
<div
class=
"modal fade"
id=
"game-create-windbot"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
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"
>
...
@@ -31,8 +30,7 @@
...
@@ -31,8 +30,7 @@
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<label>
选择对手
</label>
<label>
选择对手
</label>
<div
id=
"windbot"
class=
"list-group"
>
<div
id=
"windbot"
class=
"list-group"
>
<a
*ngFor=
"let name of windbot"
href=
"#"
class=
"list-group-item"
<a
*ngFor=
"let name of windbot"
href=
"#"
class=
"list-group-item"
(click)=
"join_windbot(name)"
>
{{name}}
</a>
(click)=
"join_windbot(name)"
>
{{name}}
</a>
</div>
</div>
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
...
@@ -42,8 +40,7 @@
...
@@ -42,8 +40,7 @@
</div>
</div>
</div>
</div>
<div
class=
"modal fade"
id=
"game-create-modal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
<div
class=
"modal fade"
id=
"game-create-modal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
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"
>
...
@@ -57,8 +54,7 @@
...
@@ -57,8 +54,7 @@
<div
class=
"form-group row"
>
<div
class=
"form-group row"
>
<label
for=
"game-create-title"
class=
"col-sm-2 form-control-label"
>
游戏标题
</label>
<label
for=
"game-create-title"
class=
"col-sm-2 form-control-label"
>
游戏标题
</label>
<div
class=
"col-sm-10"
>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"form-control"
id=
"game-create-title"
name=
"title"
<input
type=
"text"
class=
"form-control"
id=
"game-create-title"
name=
"title"
[(ngModel)]=
"room.title"
>
[(ngModel)]=
"room.title"
>
</div>
</div>
</div>
</div>
<div
class=
"form-group row"
>
<div
class=
"form-group row"
>
...
@@ -88,25 +84,19 @@
...
@@ -88,25 +84,19 @@
<div
class=
"row"
>
<div
class=
"row"
>
<label
for=
"game-create-start-lp"
class=
"col-sm-6 form-control-label"
>
初始 LP
</label>
<label
for=
"game-create-start-lp"
class=
"col-sm-6 form-control-label"
>
初始 LP
</label>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-6"
>
<input
name=
"start_lp"
type=
"number"
value=
"8000"
min=
"1"
max=
"65536"
<input
name=
"start_lp"
type=
"number"
value=
"8000"
min=
"1"
max=
"65536"
class=
"form-control form-control-sm game-create-extra"
id=
"game-create-start-lp"
[(ngModel)]=
"room.start_lp"
>
class=
"form-control form-control-sm game-create-extra"
id=
"game-create-start-lp"
[(ngModel)]=
"room.start_lp"
>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<label
for=
"game-create-start-hand"
class=
"col-sm-6 form-control-label"
>
初始手牌数
</label>
<label
for=
"game-create-start-hand"
class=
"col-sm-6 form-control-label"
>
初始手牌数
</label>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-6"
>
<input
name=
"start_hand"
type=
"number"
value=
"5"
min=
"0"
max=
"16"
<input
name=
"start_hand"
type=
"number"
value=
"5"
min=
"0"
max=
"16"
class=
"form-control form-control-sm game-create-extra"
id=
"game-create-start-hand"
[(ngModel)]=
"room.start_hand"
>
class=
"form-control form-control-sm game-create-extra"
id=
"game-create-start-hand"
[(ngModel)]=
"room.start_hand"
>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<label
for=
"game-create-draw-count"
class=
"col-sm-6 form-control-label"
>
每回合抽卡
</label>
<label
for=
"game-create-draw-count"
class=
"col-sm-6 form-control-label"
>
每回合抽卡
</label>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-6"
>
<input
name=
"draw_count"
type=
"number"
value=
"1"
min=
"0"
max=
"16"
<input
name=
"draw_count"
type=
"number"
value=
"1"
min=
"0"
max=
"16"
class=
"form-control form-control-sm game-create-extra"
id=
"game-create-draw-count"
[(ngModel)]=
"room.draw_count"
>
class=
"form-control form-control-sm game-create-extra"
id=
"game-create-draw-count"
[(ngModel)]=
"room.draw_count"
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -117,8 +107,7 @@
...
@@ -117,8 +107,7 @@
</label>
</label>
</div>
</div>
<div
class=
"checkbox"
>
<div
class=
"checkbox"
>
<label>
<label>
<input
name=
"no_check_deck"
type=
"checkbox"
[(ngModel)]=
"room.no_check_deck"
>
不检查卡组
<input
name=
"no_check_deck"
type=
"checkbox"
[(ngModel)]=
"room.no_check_deck"
>
不检查卡组
</label>
</label>
</div>
</div>
<div
class=
"checkbox"
>
<div
class=
"checkbox"
>
...
@@ -140,8 +129,7 @@
...
@@ -140,8 +129,7 @@
</div>-->
</div>-->
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary float-left"
data-dismiss=
"modal"
data-toggle=
"modal"
<button
type=
"button"
class=
"btn btn-secondary float-left"
data-dismiss=
"modal"
data-toggle=
"modal"
data-target=
"#game-list-modal"
>
查看房间
data-target=
"#game-list-modal"
>
查看房间
</button>
</button>
<button
type=
"button"
class=
"btn btn-secondary"
data-dismiss=
"modal"
>
取消
</button>
<button
type=
"button"
class=
"btn btn-secondary"
data-dismiss=
"modal"
>
取消
</button>
<button
type=
"submit"
class=
"btn btn-primary"
>
创建
</button>
<button
type=
"submit"
class=
"btn btn-primary"
>
创建
</button>
...
@@ -149,10 +137,8 @@
...
@@ -149,10 +137,8 @@
</form>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<!-- Modal -->
<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"
role=
"document"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<table
class=
"table table-striped table-hover"
>
<table
class=
"table table-striped table-hover"
>
...
@@ -169,8 +155,7 @@
...
@@ -169,8 +155,7 @@
<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"
<img
*ngFor=
"let user of room.users"
class=
"avatar"
[src]=
"'https://ygobbs.com/user_avatar/ygobbs.com/' + user.username + '/25/1.png'"
>
[src]=
"'https://ygobbs.com/user_avatar/ygobbs.com/' + user.username + '/25/1.png'"
>
</td>
</td>
<td
class=
"mode"
>
{{{'0': '单局模式', '1': '比赛模式', '2': 'TAG'}[room.mode]}}
</td>
<td
class=
"mode"
>
{{{'0': '单局模式', '1': '比赛模式', '2': 'TAG'}[room.mode]}}
</td>
<td
class=
"extra"
>
<td
class=
"extra"
>
...
@@ -188,8 +173,7 @@
...
@@ -188,8 +173,7 @@
<span
aria-hidden=
"true"
>
×
</span>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</button>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary float-left"
data-dismiss=
"modal"
data-toggle=
"modal"
<button
type=
"button"
class=
"btn btn-secondary float-left"
data-dismiss=
"modal"
data-toggle=
"modal"
data-target=
"#game-create-modal"
>
创建房间
data-target=
"#game-create-modal"
>
创建房间
</button>
</button>
<button
type=
"button"
class=
"btn btn-secondary"
data-dismiss=
"modal"
>
取消
</button>
<button
type=
"button"
class=
"btn btn-secondary"
data-dismiss=
"modal"
>
取消
</button>
</div>
</div>
...
...
app/ygopro.component.ts
View file @
b884a9ec
This diff is collapsed.
Click to expand it.
sort_apps.js
View file @
b884a9ec
let
apps
=
require
(
'
./apps.json
'
)
let
apps
=
require
(
'
./apps.json
'
)
;
let
result
=
apps
.
map
((
app
)
=>
{
let
result
=
apps
.
map
((
app
)
=>
{
console
.
error
(
app
.
id
)
console
.
error
(
app
.
id
);
let
result
=
{}
let
result
=
{};
result
.
id
=
app
.
id
result
.
id
=
app
.
id
;
result
.
name
=
app
.
name
result
.
name
=
app
.
name
;
result
.
description
=
app
.
description
result
.
description
=
app
.
description
;
let
parent
=
apps
.
find
(
a
=>
app
.
id
.
startsWith
(
a
.
id
+
'
-
'
));
let
parent
=
apps
.
find
(
a
=>
app
.
id
.
startsWith
(
a
.
id
+
'
-
'
));
if
(
parent
){
if
(
parent
)
{
result
.
category
=
"
module
"
result
.
category
=
"
module
"
;
result
.
parent
=
parent
.
id
result
.
parent
=
parent
.
id
;
result
.
tags
=
[
"
language
"
]
result
.
tags
=
[
"
language
"
]
}
else
{
}
else
{
result
.
category
=
"
game
"
result
.
category
=
"
game
"
;
result
.
tags
=
app
.
tags
result
.
tags
=
app
.
tags
}
result
.
dependency
=
{
"
win32
"
:
[],
"
darwin
"
:
[
'
wine
'
]
}
}
let
references
=
apps
.
filter
(
a
=>
a
.
id
.
startsWith
(
app
.
id
+
'
-
'
)).
map
(
a
=>
a
.
id
)
result
.
dependency
=
{
"
win32
"
:
[],
"
darwin
"
:
[
'
wine
'
]
};
let
references
=
apps
.
filter
(
a
=>
a
.
id
.
startsWith
(
app
.
id
+
'
-
'
)).
map
(
a
=>
a
.
id
);
result
.
references
=
{
result
.
references
=
{
"
win32
"
:
references
,
"
win32
"
:
references
,
"
darwin
"
:
references
"
darwin
"
:
references
}
}
;
result
.
author
=
app
.
author
result
.
author
=
app
.
author
;
result
.
homepage
=
app
.
homepage
result
.
homepage
=
app
.
homepage
;
result
.
locales
=
app
.
locales
result
.
locales
=
app
.
locales
;
result
.
actions
=
app
.
actions
result
.
actions
=
app
.
actions
;
result
.
version
=
app
.
version
result
.
version
=
app
.
version
;
result
.
download
=
app
.
download
result
.
download
=
app
.
download
;
result
.
news
=
app
.
news
result
.
news
=
app
.
news
;
return
result
return
result
})
})
.
sort
((
a
,
b
)
=>
a
.
id
<
b
.
id
?
-
1
:
1
)
.
sort
((
a
,
b
)
=>
a
.
id
<
b
.
id
?
-
1
:
1
);
for
(
let
app
of
result
){
for
(
let
app
of
result
)
{
console
.
error
(
app
.
id
)
console
.
error
(
app
.
id
)
}
}
console
.
log
(
JSON
.
stringify
(
result
))
console
.
log
(
JSON
.
stringify
(
result
));
\ No newline at end of file
\ No newline at end of file
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