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
9
Issues
9
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
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
Commits
87819fd2
Commit
87819fd2
authored
Feb 14, 2017
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化聊天室性能,单人模式增加随机
parent
d0483a31
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
552 additions
and
367 deletions
+552
-367
app/app-detail.component.html
app/app-detail.component.html
+29
-1
app/app-detail.component.ts
app/app-detail.component.ts
+14
-2
app/candy.component.css
app/candy.component.css
+5
-0
app/candy.component.ts
app/candy.component.ts
+127
-10
app/lobby.component.html
app/lobby.component.html
+20
-5
app/mycard.component.html
app/mycard.component.html
+4
-0
app/mycard.component.ts
app/mycard.component.ts
+26
-8
app/ygopro.component.html
app/ygopro.component.html
+1
-0
app/ygopro.component.ts
app/ygopro.component.ts
+42
-39
index.html
index.html
+1
-0
locale/messages.en-US.xlf
locale/messages.en-US.xlf
+280
-302
moesound.js
moesound.js
+3
-0
No files found.
app/app-detail.component.html
View file @
87819fd2
...
...
@@ -99,7 +99,21 @@
</div>
<!--<div *ngIf="points" class="row">--><!--<dl class="col-4 row">--><!--<dt i18n class="col-8">竞技排名</dt>--><!--<dd class="col-4">{{points.arena_rank}}</dd>--><!--<dt i18n class="col-8">竞技胜率</dt>--><!--<dd class="col-4">{{points.athletic_wl_ratio}}%</dd>--><!--<dt i18n class="col-8">胜场</dt>--><!--<dd class="col-4">{{points.athletic_win}}</dd>--><!--<dt i18n class="col-8">负场</dt>--><!--<dd class="col-4">{{points.athletic_lose}}</dd>--><!--<dt i18n class="col-8">平局</dt>--><!--<dd class="col-4">{{points.athletic_draw}}</dd>--><!--<dt i18n class="col-8">总场</dt>--><!--<dd class="col-4">{{points.athletic_all}}</dd>--><!--</dl>--><!--<dl class="col-4 row">--><!--<dt i18n class="col-8">娱乐排名</dt>--><!--<dd class="col-4">{{points.exp_rank}}</dd>--><!--<dt i18n class="col-8">经验</dt>--><!--<dd class="col-4">{{points.exp}}</dd>--><!--<dt i18n class="col-8">胜场</dt>--><!--<dd class="col-4">{{points.entertain_win}}</dd>--><!--<dt i18n class="col-8">负场</dt>--><!--<dd class="col-4">{{points.entertain_lose}}</dd>--><!--<dt i18n class="col-8">平局</dt>--><!--<dd class="col-4">{{points.entertain_draw}}</dd>--><!--<dt i18n class="col-8">总场</dt>--><!--<dd class="col-4">{{points.entertain_all}}</dd>--><!--</dl>--><!--</div>-->
<!--<div class="panel panel-default" *ngIf="currentApp.id === 'ygopro'">-->
<!--<h2 i18n>社区</h2>-->
<!--<div class="d-flex">-->
<!--<div class="card">-->
<!--<img src="https://ygobbs.com/uploads/default/original/3X/7/b/7bf0d51bf506678f2660bf427526f4a71d213658.png">-->
<!--<p class="card-text">12月13日 MyCard更新RATE,1033.C程序。手动更新以及载入中/版本不匹配等错误解决方法。</p>-->
<!--</div>-->
<!--<ul>-->
<!--<li>决斗都市——ygocore战队联盟站报名贴</li>-->
<!--<li>七夕情侣YGOPRO联盟 夏日双打大赛</li>-->
<!--<li>蠢鱼的一些关于安装和更新指南</li>-->
<!--<li>MyCard V3 使用说明</li>-->
<!--</ul>-->
<!--</div>-->
<!--</div>-->
<div
class=
"panel panel-default"
*ngIf=
"news && news.length"
>
<h2
i18n
>
新闻
</h2>
...
...
@@ -155,6 +169,20 @@
</div>
<!--<div class="panel panel-default">-->
<!--<h2 i18n>广告</h2>-->
<!--<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>-->
<!--<!– mycard –>-->
<!--<ins class="adsbygoogle"-->
<!--style="display:block"-->
<!--data-ad-client="ca-pub-1173264056684633"-->
<!--data-ad-slot="3903147661"-->
<!--data-ad-format="auto"></ins>-->
<!--<script>-->
<!--(adsbygoogle = window.adsbygoogle || []).push({});-->
<!--</script>-->
<!--</div>-->
<!--安装modal-->
<div
class=
"modal fade"
id=
"install-modal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
*ngIf=
"installOption"
>
<div
class=
"modal-dialog"
role=
"document"
>
...
...
app/app-detail.component.ts
View file @
87819fd2
...
...
@@ -9,9 +9,16 @@ import * as path from 'path';
import
*
as
fs
from
'
fs
'
;
import
*
as
$
from
'
jquery
'
;
import
{
Points
}
from
'
./ygopro.component
'
;
import
{
Http
}
from
'
@angular/http
'
;
declare
const
Notification
:
any
;
// declare interface Window {
// adsbygoogle: any[];
// }
//
// declare var adsbygoogle: any[];
@
Component
({
moduleId
:
module
.
id
,
selector
:
'
app-detail
'
,
...
...
@@ -34,16 +41,21 @@ export class AppDetailComponent implements OnInit, OnChanges {
points
:
Points
;
constructor
(
private
appsService
:
AppsService
,
private
settingsService
:
SettingsService
,
private
downloadService
:
DownloadService
,
private
ref
:
ChangeDetectorRef
,
private
el
:
ElementRef
)
{
private
downloadService
:
DownloadService
,
private
ref
:
ChangeDetectorRef
,
private
el
:
ElementRef
,
private
http
:
Http
)
{
}
ngOnChanges
(
changes
:
SimpleChanges
):
void
{
async
ngOnChanges
(
changes
:
SimpleChanges
)
{
if
(
changes
[
'
currentApp
'
])
{
if
(
this
.
currentApp
.
background
)
{
this
.
el
.
nativeElement
.
style
.
background
=
`url("
${
this
.
currentApp
.
background
}
") rgba(255,255,255,.8)`
;
}
else
{
this
.
el
.
nativeElement
.
style
.
background
=
'
white
'
;
}
// let top = await this.http.get('https://ygobbs.com/top.json').map(response => response.json()).toPromise();
// console.log(top.topic_list.topics);
// (adsbygoogle = window['adsbygoogle'] || []).push({});
}
}
...
...
app/candy.component.css
View file @
87819fd2
...
...
@@ -159,4 +159,9 @@
/*}*/
.message-pane
{
-webkit-user-select
:
auto
;
}
.roster-pane
.user
{
display
:
inherit
;
opacity
:
inherit
;
}
\ No newline at end of file
app/candy.component.ts
View file @
87819fd2
...
...
@@ -28,7 +28,7 @@ import {LoginService} from './login.service';
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
App
}
from
'
./app
'
;
import
'
node_modules/candy/libs.min.js
'
;
import
'
node_modules/candy/candy.
bundle
.js
'
;
import
'
node_modules/candy/candy.
min
.js
'
;
import
'
node_modules/candy-shop/notifyme/candy.js
'
;
import
'
node_modules/candy-shop/namecomplete/candy.js
'
;
import
'
node_modules/candy-shop/modify-role/candy.js
'
;
...
...
@@ -57,10 +57,12 @@ Candy.Util.getPosTopAccordingToWindowBounds = new Proxy(Candy.Util.getPosTopAcco
return
target
.
apply
(
thisArg
,
argumentsList
);
}
});
Candy
.
View
.
Pane
.
Roster
.
joinAnimation
=
function
(
elementId
:
string
)
{
$
(
"
#
"
+
elementId
).
show
().
css
({
opacity
:
'
initial
'
});
// 性能优化:禁用加入动画
Candy
.
View
.
Pane
.
Roster
.
joinAnimation
=
function
()
{
};
// 性能优化:禁用用户排序
declare
const
Mustache
:
any
;
Candy
.
View
.
Pane
.
Roster
.
_insertUser
=
function
(
roomJid
:
string
,
roomId
:
string
,
user
:
any
,
userId
:
string
,
currentUser
:
any
)
{
let
contact
=
user
.
getContact
();
...
...
@@ -70,19 +72,134 @@ Candy.View.Pane.Roster._insertUser = function (roomJid: string, roomId: string,
userJid
:
user
.
getJid
(),
realJid
:
user
.
getRealJid
(),
status
:
user
.
getStatus
(),
contact_status
:
contact
?
contact
.
getStatus
()
:
"
unavailable
"
,
contact_status
:
contact
?
contact
.
getStatus
()
:
'
unavailable
'
,
nick
:
user
.
getNick
(),
displayNick
:
Candy
.
Util
.
crop
(
user
.
getNick
(),
Candy
.
View
.
getOptions
().
crop
.
roster
.
nickname
),
role
:
user
.
getRole
(),
affiliation
:
user
.
getAffiliation
(),
me
:
currentUser
!==
undefined
&&
user
.
getNick
()
===
currentUser
.
getNick
(),
tooltipRole
:
$
.
i18n
.
_
(
"
tooltipRole
"
),
tooltipIgnored
:
$
.
i18n
.
_
(
"
tooltipIgnored
"
)
tooltipRole
:
$
.
i18n
.
_
(
'
tooltipRole
'
),
tooltipIgnored
:
$
.
i18n
.
_
(
'
tooltipIgnored
'
)
});
let
rosterPane
=
Candy
.
View
.
Pane
.
Room
.
getPane
(
roomJid
,
"
.roster-pane
"
);
let
rosterPane
=
Candy
.
View
.
Pane
.
Room
.
getPane
(
roomJid
,
'
.roster-pane
'
);
rosterPane
.
append
(
html
);
};
// 性能优化:将未读消息计数的的 jQuery show() 改为直接置 style
Candy
.
View
.
Pane
.
Chat
.
increaseUnreadMessages
=
function
(
roomJid
:
string
)
{
let
unreadElem
=
this
.
getTab
(
roomJid
).
find
(
'
.unread
'
);
unreadElem
.
text
(
unreadElem
.
text
()
!==
''
?
parseInt
(
unreadElem
.
text
(),
10
)
+
1
:
1
);
unreadElem
[
0
].
style
.
display
=
'
inherit
'
;
// only increase window unread messages in private chats
if
(
Candy
.
View
.
Pane
.
Chat
.
rooms
[
roomJid
].
type
===
'
chat
'
||
Candy
.
View
.
getOptions
().
updateWindowOnAllMessages
===
true
)
{
Candy
.
View
.
Pane
.
Window
.
increaseUnreadMessages
();
}
};
// 性能优化:将收到消息时的滚动放进requestIdleCallback
declare
const
requestIdleCallback
:
Function
;
Candy
.
View
.
Pane
.
Message
.
show
=
function
(
roomJid
:
any
,
name
:
any
,
message
:
any
,
xhtmlMessage
:
any
,
timestamp
:
any
,
from
:
any
,
carbon
:
any
,
stanza
:
any
)
{
message
=
Candy
.
Util
.
Parser
.
all
(
message
.
substring
(
0
,
Candy
.
View
.
getOptions
().
crop
.
message
.
body
));
if
(
Candy
.
View
.
getOptions
().
enableXHTML
===
true
&&
xhtmlMessage
)
{
xhtmlMessage
=
Candy
.
Util
.
parseAndCropXhtml
(
xhtmlMessage
,
Candy
.
View
.
getOptions
().
crop
.
message
.
body
);
}
timestamp
=
timestamp
||
new
Date
();
// Assume we have an ISO-8601 date string and convert it to a Date object
if
(
!
timestamp
.
toDateString
)
{
timestamp
=
Candy
.
Util
.
iso8601toDate
(
timestamp
);
}
// Before we add the new message, check to see if we should be automatically scrolling or not.
let
messagePane
=
Candy
.
View
.
Pane
.
Room
.
getPane
(
roomJid
,
'
.message-pane
'
);
let
enableScroll
;
if
(
stanza
.
children
(
'
delay
'
).
length
>
0
)
{
enableScroll
=
true
;
}
else
{
enableScroll
=
messagePane
.
scrollTop
()
+
messagePane
.
outerHeight
()
===
messagePane
.
prop
(
'
scrollHeight
'
)
||
!
$
(
messagePane
).
is
(
'
:visible
'
);
}
Candy
.
View
.
Pane
.
Chat
.
rooms
[
roomJid
].
enableScroll
=
enableScroll
;
let
evtData
:
any
=
{
roomJid
:
roomJid
,
name
:
name
,
message
:
message
,
xhtmlMessage
:
xhtmlMessage
,
from
:
from
,
stanza
:
stanza
};
if
(
$
(
Candy
).
triggerHandler
(
'
candy:view.message.before-show
'
,
evtData
)
===
false
)
{
return
;
}
message
=
evtData
.
message
;
xhtmlMessage
=
evtData
.
xhtmlMessage
;
if
(
xhtmlMessage
!==
undefined
&&
xhtmlMessage
.
length
>
0
)
{
message
=
xhtmlMessage
;
}
if
(
!
message
)
{
return
;
}
let
renderEvtData
=
{
template
:
Candy
.
View
.
Template
.
Message
.
item
,
templateData
:
{
name
:
name
,
displayName
:
Candy
.
Util
.
crop
(
name
,
Candy
.
View
.
getOptions
().
crop
.
message
.
nickname
),
message
:
message
,
time
:
Candy
.
Util
.
localizedTime
(
timestamp
),
timestamp
:
timestamp
.
toISOString
(),
roomjid
:
roomJid
,
from
:
from
},
stanza
:
stanza
};
$
(
Candy
).
triggerHandler
(
'
candy:view.message.before-render
'
,
renderEvtData
);
let
html
=
Mustache
.
to_html
(
renderEvtData
.
template
,
renderEvtData
.
templateData
);
Candy
.
View
.
Pane
.
Room
.
appendToMessagePane
(
roomJid
,
html
);
let
elem
=
Candy
.
View
.
Pane
.
Room
.
getPane
(
roomJid
,
'
.message-pane
'
).
children
().
last
();
// click on username opens private chat
elem
.
find
(
'
a.label
'
).
click
(
function
(
event
:
any
)
{
event
.
preventDefault
();
// Check if user is online and not myCandy.View.Pane
let
room
=
Candy
.
Core
.
getRoom
(
roomJid
);
if
(
room
&&
name
!==
Candy
.
View
.
Pane
.
Room
.
getUser
(
Candy
.
View
.
getCurrent
().
roomJid
).
getNick
()
&&
room
.
getRoster
().
get
(
roomJid
+
'
/
'
+
name
))
{
if
(
Candy
.
View
.
Pane
.
PrivateRoom
.
open
(
roomJid
+
'
/
'
+
name
,
name
,
true
)
===
false
)
{
return
false
;
}
}
});
if
(
!
carbon
)
{
let
notifyEvtData
=
{
name
:
name
,
displayName
:
Candy
.
Util
.
crop
(
name
,
Candy
.
View
.
getOptions
().
crop
.
message
.
nickname
),
roomJid
:
roomJid
,
message
:
message
,
time
:
Candy
.
Util
.
localizedTime
(
timestamp
),
timestamp
:
timestamp
.
toISOString
()
};
$
(
Candy
).
triggerHandler
(
'
candy:view.message.notify
'
,
notifyEvtData
);
// Check to see if in-core notifications are disabled
if
(
!
Candy
.
Core
.
getOptions
().
disableCoreNotifications
)
{
if
(
Candy
.
View
.
getCurrent
().
roomJid
!==
roomJid
||
!
Candy
.
View
.
Pane
.
Window
.
hasFocus
())
{
Candy
.
View
.
Pane
.
Chat
.
increaseUnreadMessages
(
roomJid
);
if
(
!
Candy
.
View
.
Pane
.
Window
.
hasFocus
())
{
// Notify the user about a new private message OR on all messages if configured
if
(
Candy
.
View
.
Pane
.
Chat
.
rooms
[
roomJid
].
type
===
'
chat
'
||
Candy
.
View
.
getOptions
().
updateWindowOnAllMessages
===
true
)
{
Candy
.
View
.
Pane
.
Chat
.
Toolbar
.
playSound
();
}
}
}
}
if
(
Candy
.
View
.
getCurrent
().
roomJid
===
roomJid
)
{
requestIdleCallback
(
function
()
{
Candy
.
View
.
Pane
.
Room
.
scrollToBottom
(
roomJid
);
});
}
}
evtData
.
element
=
elem
;
$
(
Candy
).
triggerHandler
(
'
candy:view.message.after-show
'
,
evtData
);
};
document
[
'
__defineGetter__
'
](
'
cookie
'
,
()
=>
'
candy-nostatusmessages
'
);
document
[
'
__defineSetter__
'
](
'
cookie
'
,
()
=>
true
);
...
...
@@ -100,10 +217,10 @@ export class CandyComponent implements OnInit, OnChanges {
password
:
string
;
nickname
:
string
;
constructor
(
private
loginService
:
LoginService
,
private
settingsService
:
SettingsService
,
private
element
:
ElementRef
)
{
constructor
(
private
loginService
:
LoginService
,
private
settingsService
:
SettingsService
,
private
element
:
ElementRef
)
{
}
ngOnInit
()
{
ngOnInit
()
{
this
.
jid
=
this
.
loginService
.
user
.
username
+
'
@mycard.moe
'
;
this
.
password
=
this
.
loginService
.
user
.
external_id
.
toString
();
...
...
@@ -161,7 +278,7 @@ export class CandyComponent implements OnInit, OnChanges {
Candy
.
Core
.
connect
(
this
.
jid
,
this
.
password
,
this
.
nickname
);
}
ngOnChanges
(
changes
:
SimpleChanges
):
void
{
ngOnChanges
(
changes
:
SimpleChanges
):
void
{
if
(
!
Candy
.
Core
.
getConnection
())
{
return
;
}
...
...
app/lobby.component.html
View file @
87819fd2
...
...
@@ -26,31 +26,46 @@
<span
i18n
*ngIf=
"grouped_apps.recommend"
>
推荐
</span>
<ul
*ngIf=
"grouped_apps.recommend"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.recommend"
class=
"nav-item"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
><img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
</li>
</ul>
<span
i18n
*ngIf=
"grouped_apps.mysterious"
>
迷之物体
</span>
<ul
*ngIf=
"grouped_apps.mysterious"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.mysterious"
class=
"nav-item"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
><img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
</li>
</ul>
<span
i18n
*ngIf=
"grouped_apps.touhou"
>
东方 Project
</span>
<ul
*ngIf=
"grouped_apps.touhou"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.touhou"
class=
"nav-item"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
><img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
</li>
</ul>
<span
i18n
*ngIf=
"grouped_apps.touhou_pc98"
>
东方旧作
</span>
<ul
*ngIf=
"grouped_apps.touhou_pc98"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.touhou_pc98"
class=
"nav-item"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
><img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
</li>
</ul>
<span
i18n
*ngIf=
"grouped_apps.runtime_installed"
>
已安装的运行库
</span>
<ul
*ngIf=
"grouped_apps.runtime_installed"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.runtime_installed"
class=
"nav-item"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
><img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
</li>
</ul>
</nav>
...
...
app/mycard.component.html
View file @
87819fd2
...
...
@@ -15,6 +15,9 @@
<li
*ngIf=
"loginService.logged_in"
[ngClass]=
"{active: currentPage === 'community'}"
class=
"nav-item"
>
<a
i18n
(click)=
"currentPage='community'"
class=
"nav-link"
href=
"#"
>
社区
</a>
</li>
<!--<li *ngIf="loginService.logged_in" [ngClass]="{active: currentPage === 'moesound'}" class="nav-item">-->
<!--<a i18n (click)="currentPage='moesound'" class="nav-link" href="#">萌音</a>-->
<!--</li>-->
<!--<li *ngIf="loginService.logged_in" [ngClass]="{active: currentPage === 'about'}" class="nav-item">-->
<!--<a i18n (click)="currentPage='about'" class="nav-link" href="#">关于</a>-->
<!--</li>-->
...
...
@@ -45,6 +48,7 @@
<store
class=
"page"
*ngIf=
"loginService.logged_in"
[hidden]=
"currentPage != 'store'"
></store>
<lobby
class=
"page"
*ngIf=
"loginService.logged_in"
[hidden]=
"currentPage != 'lobby'"
></lobby>
<webview
class=
"page"
*ngIf=
"loginService.logged_in"
[hidden]=
"currentPage != 'community'"
src=
"https://ygobbs.com"
(new-window)=
"openExternal($event.url)"
></webview>
<!--<webview #moesound preload="./moesound.js" class="page" *ngIf="loginService.logged_in" [hidden]="currentPage != 'moesound'" src="http://moesound.com/" (new-window)="moesound_newwindow($event.url)" (did-finish-load)="moesound_loaded()"></webview>-->
<about
class=
"page"
*ngIf=
"loginService.logged_in"
[hidden]=
"currentPage != 'about'"
></about>
<!-- Modal -->
...
...
app/mycard.component.ts
View file @
87819fd2
...
...
@@ -36,7 +36,10 @@ export class MyCardComponent implements OnInit {
resizing
:
HTMLElement
|
null
;
ngOnInit
()
{
@
ViewChild
(
'
moesound
'
)
moesound
:
ElementRef
;
ngOnInit
()
{
this
.
update_elements
=
new
Map
(
Object
.
entries
({
'
error
'
:
this
.
error
,
'
checking-for-update
'
:
this
.
checking_for_update
,
...
...
@@ -50,8 +53,8 @@ export class MyCardComponent implements OnInit {
// });
}
constructor
(
private
renderer
:
Renderer
,
private
loginService
:
LoginService
,
private
ref
:
ChangeDetectorRef
,
private
settingsService
:
SettingsService
)
{
constructor
(
private
renderer
:
Renderer
,
private
loginService
:
LoginService
,
private
ref
:
ChangeDetectorRef
,
private
settingsService
:
SettingsService
)
{
// renderer.listenGlobal('window', 'message', (event) => {
// console.log(event);
// // Do something with 'event'
...
...
@@ -80,15 +83,15 @@ export class MyCardComponent implements OnInit {
}
update_retry
()
{
update_retry
()
{
autoUpdater
.
checkForUpdates
();
}
update_install
()
{
update_install
()
{
autoUpdater
.
quitAndInstall
();
}
set_update_status
(
status
:
string
)
{
set_update_status
(
status
:
string
)
{
console
.
log
(
'
autoUpdater
'
,
status
);
if
(
this
.
update_status
)
{
let
element
=
this
.
update_elements
.
get
(
this
.
update_status
);
...
...
@@ -105,15 +108,30 @@ export class MyCardComponent implements OnInit {
}
}
openExternal
(
url
:
string
)
{
openExternal
(
url
:
string
)
{
shell
.
openExternal
(
url
);
}
submit
()
{
submit
()
{
if
(
this
.
locale
!==
this
.
settingsService
.
getLocale
())
{
localStorage
.
setItem
(
SettingsService
.
SETTING_LOCALE
,
this
.
locale
);
remote
.
app
.
relaunch
();
remote
.
app
.
quit
();
}
}
//
// moesound_loaded() {
// this.moesound.nativeElement.insertCSS(`
// body > section > header, #bjax-target > div.row.m-t-lg.m-b-lg, #bjax-target > section {
// display: none;
// }
// body > section > section {
// top: 0!important;
// }
// `);
// }
//
// moesound_newwindow(url: string) {
// console.log(url);
// }
}
app/ygopro.component.html
View file @
87819fd2
...
...
@@ -39,6 +39,7 @@
<div
class=
"modal-body"
>
<label
i18n
>
选择对手
</label>
<div
id=
"windbot"
class=
"list-group"
>
<a
i18n
href=
"#"
class=
"list-group-item"
(click)=
"join_windbot()"
>
随机
</a>
<a
*ngFor=
"let name of windbot"
href=
"#"
class=
"list-group-item"
(click)=
"join_windbot(name)"
>
{{name}}
</a>
</div>
</div>
...
...
app/ygopro.component.ts
View file @
87819fd2
...
...
@@ -69,7 +69,7 @@ interface Room {
id
?:
string
;
title
?:
string
;
server
?:
Server
;
private
?:
boolean
;
'
private
'
?:
boolean
;
options
:
Options
;
arena
?:
string
;
users
?:
{
username
:
string
,
position
:
number
}[];
...
...
@@ -168,8 +168,8 @@ export class YGOProComponent implements OnInit, OnDestroy {
match_cancelable
:
boolean
;
match_interval
:
Timer
|
undefined
;
constructor
(
private
http
:
Http
,
private
appsService
:
AppsService
,
private
loginService
:
LoginService
,
public
settingsService
:
SettingsService
,
private
ref
:
ChangeDetectorRef
)
{
constructor
(
private
http
:
Http
,
private
appsService
:
AppsService
,
private
loginService
:
LoginService
,
public
settingsService
:
SettingsService
,
private
ref
:
ChangeDetectorRef
)
{
switch
(
process
.
platform
)
{
case
'
darwin
'
:
this
.
numfont
=
[
'
/System/Library/Fonts/SFNSTextCondensed-Bold.otf
'
];
...
...
@@ -190,8 +190,8 @@ export class YGOProComponent implements OnInit, OnDestroy {
this
.
matching_arena
=
matching_arena
;
this
.
refresh_match
();
this
.
match_interval
=
setInterval
(()
=>
{
this
.
refresh_match
()
},
1000
)
this
.
refresh_match
()
;
},
1000
)
;
}
if
(
this
.
settingsService
.
getLocale
().
startsWith
(
'
zh
'
))
{
...
...
@@ -229,7 +229,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
}
}
async
ngOnInit
()
{
async
ngOnInit
()
{
let
locale
:
string
;
if
(
this
.
settingsService
.
getLocale
().
startsWith
(
'
zh
'
))
{
...
...
@@ -304,11 +304,11 @@ export class YGOProComponent implements OnInit, OnDestroy {
case
'
create
'
:
this
.
replay_rooms
.
push
(
Object
.
assign
({
server
:
server
},
message
.
data
));
break
;
// case 'update':
// Object.assign(this.replay_rooms.find(room => room.server === server && room.id === message.data.id), message.data);
// break;
case
'
delete
'
:
this
.
replay_rooms
.
splice
(
this
.
replay_rooms
.
findIndex
(
room
=>
room
.
server
===
server
&&
room
.
id
===
message
.
data
),
1
);
this
.
replay_rooms
.
splice
(
this
.
replay_rooms
.
findIndex
(
room
=>
room
.
server
===
server
&&
room
.
id
===
message
.
data
),
1
);
}
this
.
ref
.
detectChanges
();
};
...
...
@@ -324,7 +324,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
});
}
async
refresh
()
{
async
refresh
()
{
this
.
decks
=
await
this
.
get_decks
();
let
system_conf
=
await
this
.
load_system_conf
();
...
...
@@ -349,7 +349,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
}
};
get_decks
():
Promise
<
string
[]
>
{
get_decks
():
Promise
<
string
[]
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
fs
.
readdir
(
path
.
join
(
this
.
app
.
local
!
.
path
,
'
deck
'
),
(
error
,
files
)
=>
{
if
(
error
)
{
...
...
@@ -361,7 +361,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
});
}
get_replays
():
Promise
<
string
[]
>
{
get_replays
():
Promise
<
string
[]
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
fs
.
readdir
(
path
.
join
(
this
.
app
.
local
!
.
path
,
'
replay
'
),
(
error
,
files
)
=>
{
if
(
error
)
{
...
...
@@ -373,7 +373,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
});
}
async
get_font
(
files
:
string
[]):
Promise
<
string
|
undefined
>
{
async
get_font
(
files
:
string
[]):
Promise
<
string
|
undefined
>
{
for
(
let
file
of
files
)
{
let
found
=
await
new
Promise
((
resolve
)
=>
fs
.
access
(
file
,
fs
.
constants
.
R_OK
,
error
=>
resolve
(
!
error
)));
if
(
found
)
{
...
...
@@ -382,14 +382,14 @@ export class YGOProComponent implements OnInit, OnDestroy {
}
}
async
delete_deck
(
deck
:
string
)
{
async
delete_deck
(
deck
:
string
)
{
if
(
confirm
(
'
确认删除?
'
))
{
await
new
Promise
(
resolve
=>
fs
.
unlink
(
path
.
join
(
this
.
app
.
local
!
.
path
,
'
deck
'
,
deck
+
'
.ydk
'
),
resolve
));
return
this
.
refresh
();
}
}
async
fix_fonts
(
data
:
SystemConf
)
{
async
fix_fonts
(
data
:
SystemConf
)
{
if
(
!
await
this
.
get_font
([
data
.
numfont
]))
{
let
font
=
await
this
.
get_font
(
this
.
numfont
);
if
(
font
)
{
...
...
@@ -405,7 +405,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
}
};
load_system_conf
():
Promise
<
SystemConf
>
{
load_system_conf
():
Promise
<
SystemConf
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
fs
.
readFile
(
this
.
system_conf
,
{
encoding
:
'
utf-8
'
},
(
error
,
data
)
=>
{
if
(
error
)
{
...
...
@@ -416,7 +416,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
});
};
save_system_conf
(
data
:
SystemConf
)
{
save_system_conf
(
data
:
SystemConf
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
fs
.
writeFile
(
this
.
system_conf
,
ini
.
unsafe
(
ini
.
stringify
(
data
,
<
EncodeOptions
>
{
whitespace
:
true
})),
(
error
)
=>
{
if
(
error
)
{
...
...
@@ -427,7 +427,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
});
};
async
join
(
name
:
string
,
server
:
Server
)
{
async
join
(
name
:
string
,
server
:
Server
)
{
let
system_conf
=
await
this
.
load_system_conf
();
await
this
.
fix_fonts
(
system_conf
);
system_conf
.
lastdeck
=
this
.
current_deck
;
...
...
@@ -440,7 +440,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
return
this
.
start_game
([
'
-j
'
]);
};
async
edit_deck
(
deck
:
string
)
{
async
edit_deck
(
deck
:
string
)
{
let
system_conf
=
await
this
.
load_system_conf
();
await
this
.
fix_fonts
(
system_conf
);
system_conf
.
lastdeck
=
deck
;
...
...
@@ -448,18 +448,21 @@ export class YGOProComponent implements OnInit, OnDestroy {
return
this
.
start_game
([
'
-d
'
,
deck
]);
}
async
watch_replay
(
replay
:
string
)
{
async
watch_replay
(
replay
:
string
)
{
let
system_conf
=
await
this
.
load_system_conf
();
await
this
.
fix_fonts
(
system_conf
);
await
this
.
save_system_conf
(
system_conf
);
return
this
.
start_game
([
'
-r
'
,
path
.
join
(
'
replay
'
,
replay
+
'
.yrp
'
)]);
}
join_windbot
(
name
:
string
)
{
join_windbot
(
name
?:
string
)
{
if
(
!
name
)
{
name
=
this
.
windbot
[
Math
.
floor
(
Math
.
random
()
*
this
.
windbot
.
length
)];
}
return
this
.
join
(
'
AI#
'
+
name
,
this
.
servers
[
0
]);
}
async
start_game
(
args
:
string
[])
{
async
start_game
(
args
:
string
[])
{
let
win
=
remote
.
getCurrentWindow
();
win
.
minimize
();
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -471,7 +474,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
reject
(
error
);
win
.
restore
();
});
child
.
on
(
'
exit
'
,
async
(
code
,
signal
)
=>
{
child
.
on
(
'
exit
'
,
async
(
code
,
signal
)
=>
{
// error 触发之后还可能会触发exit,但是Promise只承认首次状态转移,因此这里无需重复判断是否已经error过。
await
this
.
refresh
();
resolve
();
...
...
@@ -480,7 +483,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
});
};
create_room
(
room
:
Room
)
{
create_room
(
room
:
Room
)
{
let
options_buffer
=
new
Buffer
(
6
);
// 建主密码 https://docs.google.com/document/d/1rvrCGIONua2KeRaYNjKBLqyG9uybs9ZI-AmzZKNftOI/edit
options_buffer
.
writeUInt8
((
room
.
private
?
2
:
1
)
<<
4
,
1
);
...
...
@@ -511,7 +514,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
this
.
join
(
password
,
this
.
servers
[
0
]);
}
join_room
(
room
:
Room
)
{
join_room
(
room
:
Room
)
{
let
options_buffer
=
new
Buffer
(
6
);
options_buffer
.
writeUInt8
(
3
<<
4
,
1
);
let
checksum
=
0
;
...
...
@@ -531,7 +534,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
this
.
join
(
password
,
room
.
server
!
);
}
request_match
(
arena
=
'
entertain
'
)
{
request_match
(
arena
=
'
entertain
'
)
{
let
headers
=
new
Headers
();
headers
.
append
(
'
Authorization
'
,
'
Basic
'
+
Buffer
.
from
(
this
.
loginService
.
user
.
username
+
'
:
'
+
this
.
loginService
.
user
.
external_id
).
toString
(
'
base64
'
));
...
...
@@ -553,48 +556,48 @@ export class YGOProComponent implements OnInit, OnDestroy {
this
.
matching_arena
=
matching_arena
=
undefined
;
if
(
this
.
match_interval
)
{
clearInterval
(
this
.
match_interval
);
this
.
match_interval
=
undefined
this
.
match_interval
=
undefined
;
}
});
this
.
refresh_match
();
this
.
match_interval
=
setInterval
(()
=>
{
this
.
refresh_match
()
},
1000
)
this
.
refresh_match
()
;
},
1000
)
;
}
cancel_match
()
{
cancel_match
()
{
this
.
matching
!
.
unsubscribe
();
this
.
matching
=
matching
=
undefined
;
this
.
matching_arena
=
matching_arena
=
undefined
;
if
(
this
.
match_interval
)
{
clearInterval
(
this
.
match_interval
);
this
.
match_interval
=
undefined
this
.
match_interval
=
undefined
;
}
}
ngOnDestroy
()
{
ngOnDestroy
()
{
if
(
this
.
match_interval
)
{
clearInterval
(
this
.
match_interval
);
this
.
match_interval
=
undefined
this
.
match_interval
=
undefined
;
}
}
refresh_match
()
{
refresh_match
()
{
let
match_time
=
Math
.
floor
((
new
Date
().
getTime
()
-
match_started_at
.
getTime
())
/
1000
);
let
minute
=
Math
.
floor
(
match_time
/
60
).
toString
();
if
(
minute
.
length
==
1
)
{
if
(
minute
.
length
==
=
1
)
{
minute
=
'
0
'
+
minute
;
}
let
second
=
(
match_time
%
60
).
toString
();
if
(
second
.
length
==
1
)
{
if
(
second
.
length
==
=
1
)
{
second
=
'
0
'
+
second
;
}
this
.
match_time
=
`
${
minute
}
:
${
second
}
`
;
this
.
match_cancelable
=
match_time
<=
5
||
match_time
>=
180
;
}
bilibili_loaded
()
{
bilibili_loaded
()
{
this
.
bilibili
.
nativeElement
.
insertCSS
(
`
#b_app_link {
visibility: hidden;
...
...
@@ -612,7 +615,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
`
);
}
bilibili_navigate
(
event
:
WillNavigateEvent
)
{
bilibili_navigate
(
event
:
WillNavigateEvent
)
{
// event.preventDefault();
// https://github.com/electron/electron/issues/1378
this
.
bilibili
.
nativeElement
.
src
=
'
http://m.bilibili.com/search.html?keyword=YGOPro
'
;
...
...
index.html
View file @
87819fd2
...
...
@@ -46,5 +46,6 @@
document
.
body
.
classList
.
add
(
process
.
platform
);
document
.
getElementById
(
'
version
'
).
innerHTML
=
require
(
'
electron
'
).
remote
.
app
.
getVersion
();
</script>
<!--<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>-->
</body>
</html>
locale/messages.en-US.xlf
View file @
87819fd2
<?xml version="1.0" ?>
<xliff
version=
"1.2"
xmlns=
"urn:oasis:names:tc:xliff:document:1.2"
>
<file
datatype=
"plaintext"
original=
"ng2.template"
source-language=
"zh-CN"
target-language=
"en-US"
>
<body>
<trans-unit
datatype=
"html"
id=
"86738bd5d32223ffbb690a7c71360ddf8e7b1b2e"
>
<source>
竞技匹配
</source>
<target>
Ranked Match
</target>
<trans-unit
datatype=
"html"
id=
"86738bd5d32223ffbb690a7c71360ddf8e7b1b2e"
>
<source>
竞技匹配
</source>
<target>
Ranked Match
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"0bf938a69dc640aba46428d1cbbd2fef34c88daa"
>
<source>
娱乐匹配
</source>
<target>
Unranked Match
</target>
<trans-unit
datatype=
"html"
id=
"0bf938a69dc640aba46428d1cbbd2fef34c88daa"
>
<source>
娱乐匹配
</source>
<target>
Unranked Match
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"5026868223e028297430142f8cafdf6dd6fcf004"
>
<source>
自定义游戏
</source>
<target>
Custom Game
</target>
<trans-unit
datatype=
"html"
id=
"5026868223e028297430142f8cafdf6dd6fcf004"
>
<source>
自定义游戏
</source>
<target>
Custom Game
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"3768b60a7e2625bb1fc2db37eb8c6b8e4bd99101"
>
<source>
单人模式
</source>
<target>
Single Mode
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"4115bf4e35def25bcfa6d4e649f5e006225c691a"
>
<source>
观战和录像
</source>
<target>
Watch Replay
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"157bc28ebe7ecf3f455852f64687ea580dfe23dc"
>
<source>
预计时间
</source>
<target>
Estimated Wait
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"6968a638448b1f36c52a3b306541214acbf9d567"
>
<source>
实际时间
</source>
<target>
Actual Wait
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"def237147323023c1f5ce0579345da19d4707fdb"
>
<source>
卡组
</source>
<target>
Deck
</target>
<trans-unit
datatype=
"html"
id=
"3768b60a7e2625bb1fc2db37eb8c6b8e4bd99101"
>
<source>
单人模式
</source>
<target>
Single Mode
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"a842d4536fdee499a55c753c50810254347ced32
"
>
<source>
编辑
</source>
<target>
Edit
</target>
<trans-unit
datatype=
"html"
id=
"4115bf4e35def25bcfa6d4e649f5e006225c691a
"
>
<source>
观战和录像
</source>
<target>
Watch Replay
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"1e64bb9c96dfc2b9cb03179dd0c9f992e0645e5f"
>
<source>
选择对手
</source>
<target>
Select Opponent
</target>
<trans-unit
datatype=
"html"
id=
"157bc28ebe7ecf3f455852f64687ea580dfe23dc"
>
<source>
预计时间
</source>
<target>
Estimated Wait
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"6968a638448b1f36c52a3b306541214acbf9d567"
>
<source>
实际时间
</source>
<target>
Actual Wait
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"f6f3be110e7043e3cfe71a7bd75b8b3be79bff5d"
>
...
...
@@ -56,176 +41,169 @@
<target>
Cancel
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"e35d1bf7c735e8df55a62046cd2d9f820bf5bffd"
>
<source>
游戏标题
</source>
<target>
Title
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"3872a823a98042e4730861ab6f9344239d9deeb6"
>
<source>
玩家
</source>
<target>
Player
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"d62a2717a0381d996785271c61177711777ba63c"
>
<source>
决斗模式
</source>
<target>
Duel mode
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"d4038dd5d0e9d5139d425fc7bea40e40d965cc5b"
>
<source>
额外选项
</source>
<target>
Additional Options
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"e436a4a0da03320dc61ba35bfab390ab85a23d0c"
>
<source>
单局模式
</source>
<target>
Single Duel
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"2cf71acc936cf244cc5862b28efe461e91cb137d"
>
<source>
比赛模式
</source>
<target>
Match
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"c2ed31e132c305b995382adce0f95ccdabadaa21"
>
<source>
TAG
</source>
<target>
TAG
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"8514a93609dc67a44e5b198b53e42fe468f8a81a"
>
<source>
<x
id=
"INTERPOLATION"
/>
LP
</source>
<target>
<x
id=
"INTERPOLATION"
/>
LP
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"4a6f5fb56c2367667232cc46608dc46a282e2e56"
>
<source>
<x
id=
"INTERPOLATION"
/>
初始
</source>
<target>
<x
id=
"INTERPOLATION"
/>
Starting
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"cae091ce48a80dbc22d5fde2eea1cbd34e7038c7"
>
<source>
<x
id=
"INTERPOLATION"
/>
抽卡
</source>
<target>
<x
id=
"INTERPOLATION"
/>
Draw
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"785cc65c8db99887484b3b1067c45b32810c7c2a"
>
<source>
旧规则
</source>
<target>
Old rules
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"b5be173f96718dfa737f1da31d9ffab5b803561e"
>
<source>
不检查
</source>
<target>
Don't check
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"517c8b6e5361bc32d7458a1e8b2bdbf09abb6f01"
>
<source>
不洗卡
</source>
<target>
Don't shuffle
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"19923836b1ae79614782426a7a001d8ccfa27b5c"
>
<source>
创建房间
</source>
<target>
Create
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"4b911deaa4defd0803635012281f3dd1112aabd1"
>
<source>
卡片允许
</source>
<target>
Rule
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"93d3b6bb4f3a66efd8c49f9063f6c8d6a9e959bf"
>
<source>
OCG
</source>
<target>
OCG
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"150cb34526cf737163beb63ab76e4809ac1367dd"
>
<source>
TCG
</source>
<target>
TCG
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"be6d109c359b1d11b261280915e6b1706ca3ed9b"
>
<source>
OCG
&
TCG
</source>
<target>
TCG/OCG
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"2a3f48f9ea5e6aae92e249ac2b279dbc07a6127d"
>
<source>
专有卡禁止
</source>
<target>
Unspecified
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"01cfbee3f1d69f5adae299b7b8c8d75034aef53b"
>
<source>
初始 LP
</source>
<target>
Starting LP
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"0d72e50857f1d2504e08f7886d4c9d35a46e3ed9"
>
<source>
初始手牌数
</source>
<target>
Starting Hand
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"88cc5676c5322fd55c1df94ab487359100e6f9dd"
>
<source>
每回合抽卡
</source>
<target>
Draw / Turn
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"6e7470ddf4c35f6fab39b6ebeadb1780701a5469"
>
<source>
不检查卡组
</source>
<target>
Don't check
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"4f104c680937cb724b069f62ab1ff60651c5bb06"
>
<source>
不洗切卡组
</source>
<target>
Don't shuffle
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"84276d07f694b80bd5ea94d28283b6530248d02e"
>
<source>
观战
</source>
<target>
Live
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"d516b78557483a84288359494abde950d3887518"
>
<source>
本地录像
</source>
<target>
Local
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"7047116f06b2fcb5e7f8e8589d1ef31628aff0fa"
>
<source>
游戏模式
</source>
<target>
Game Mode
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"08afd8197e09842de9d76741588c6c1bcd3e2605"
>
<source>
详情
</source>
<target>
Detail
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"5136f852d874c46bf808987470980a0f2560487e"
>
<source>
<x
id=
"INTERPOLATION"
/>
跟
<x
id=
"INTERPOLATION_1"
/>
的决斗
</source>
<target>
<x
id=
"INTERPOLATION"
/>
Vs.
<x
id=
"INTERPOLATION_1"
/>
</target>
<trans-unit
datatype=
"html"
id=
"def237147323023c1f5ce0579345da19d4707fdb"
>
<source>
卡组
</source>
<target>
Deck
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"a842d4536fdee499a55c753c50810254347ced32"
>
<source>
编辑
</source>
<target>
Edit
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"1e64bb9c96dfc2b9cb03179dd0c9f992e0645e5f"
>
<source>
选择对手
</source>
<target>
Select Opponent
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"a73f70f2c3126bd103eba9b300efb446ff353187"
>
<source>
随机
</source>
<target>
Random
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"e35d1bf7c735e8df55a62046cd2d9f820bf5bffd"
>
<source>
游戏标题
</source>
<target>
Title
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"3872a823a98042e4730861ab6f9344239d9deeb6"
>
<source>
玩家
</source>
<target>
Player
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"d62a2717a0381d996785271c61177711777ba63c"
>
<source>
决斗模式
</source>
<target>
Duel mode
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"d4038dd5d0e9d5139d425fc7bea40e40d965cc5b"
>
<source>
额外选项
</source>
<target>
Additional Options
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"e436a4a0da03320dc61ba35bfab390ab85a23d0c"
>
<source>
单局模式
</source>
<target>
Single Duel
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"2cf71acc936cf244cc5862b28efe461e91cb137d"
>
<source>
比赛模式
</source>
<target>
Match
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"c2ed31e132c305b995382adce0f95ccdabadaa21"
>
<source>
TAG
</source>
<target>
TAG
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"8514a93609dc67a44e5b198b53e42fe468f8a81a"
>
<source><x
id=
"INTERPOLATION"
/>
LP
</source>
<target><x
id=
"INTERPOLATION"
/>
LP
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"4a6f5fb56c2367667232cc46608dc46a282e2e56"
>
<source><x
id=
"INTERPOLATION"
/>
初始
</source>
<target><x
id=
"INTERPOLATION"
/>
Starting
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"cae091ce48a80dbc22d5fde2eea1cbd34e7038c7"
>
<source><x
id=
"INTERPOLATION"
/>
抽卡
</source>
<target><x
id=
"INTERPOLATION"
/>
Draw
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"785cc65c8db99887484b3b1067c45b32810c7c2a"
>
<source>
旧规则
</source>
<target>
Old rules
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"b5be173f96718dfa737f1da31d9ffab5b803561e"
>
<source>
不检查
</source>
<target>
Don't check
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"517c8b6e5361bc32d7458a1e8b2bdbf09abb6f01"
>
<source>
不洗卡
</source>
<target>
Don't shuffle
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"19923836b1ae79614782426a7a001d8ccfa27b5c"
>
<source>
创建房间
</source>
<target>
Create
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"4b911deaa4defd0803635012281f3dd1112aabd1"
>
<source>
卡片允许
</source>
<target>
Rule
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"93d3b6bb4f3a66efd8c49f9063f6c8d6a9e959bf"
>
<source>
OCG
</source>
<target>
OCG
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"150cb34526cf737163beb63ab76e4809ac1367dd"
>
<source>
TCG
</source>
<target>
TCG
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"be6d109c359b1d11b261280915e6b1706ca3ed9b"
>
<source>
OCG
&
TCG
</source>
<target>
TCG/OCG
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"2a3f48f9ea5e6aae92e249ac2b279dbc07a6127d"
>
<source>
专有卡禁止
</source>
<target>
Unspecified
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"01cfbee3f1d69f5adae299b7b8c8d75034aef53b"
>
<source>
初始 LP
</source>
<target>
Starting LP
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"0d72e50857f1d2504e08f7886d4c9d35a46e3ed9"
>
<source>
初始手牌数
</source>
<target>
Starting Hand
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"88cc5676c5322fd55c1df94ab487359100e6f9dd"
>
<source>
每回合抽卡
</source>
<target>
Draw / Turn
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"6e7470ddf4c35f6fab39b6ebeadb1780701a5469"
>
<source>
不检查卡组
</source>
<target>
Don't check
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"4f104c680937cb724b069f62ab1ff60651c5bb06"
>
<source>
不洗切卡组
</source>
<target>
Don't shuffle
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"84276d07f694b80bd5ea94d28283b6530248d02e"
>
<source>
观战
</source>
<target>
Live
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"d516b78557483a84288359494abde950d3887518"
>
<source>
本地录像
</source>
<target>
Local
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"7047116f06b2fcb5e7f8e8589d1ef31628aff0fa"
>
<source>
游戏模式
</source>
<target>
Game Mode
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"08afd8197e09842de9d76741588c6c1bcd3e2605"
>
<source>
详情
</source>
<target>
Detail
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"5136f852d874c46bf808987470980a0f2560487e"
>
<source><x
id=
"INTERPOLATION"
/>
跟
<x
id=
"INTERPOLATION_1"
/>
的决斗
</source>
<target><x
id=
"INTERPOLATION"
/>
Vs.
<x
id=
"INTERPOLATION_1"
/></target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"a8cae935472a05e1c8c9be436bb7b1bdea96a54a"
>
...
...
@@ -266,13 +244,13 @@
<trans-unit
datatype=
"html"
id=
"d3852e0147360b29d0d6076e95dd1ad0098a60db"
>
<source>
运行
</source>
<target>
Start
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"67adbad4f646bb8e1c440522bafea8fe5f7e6bfd"
>
<source>
设置
</source>
<target>
Settings
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"67adbad4f646bb8e1c440522bafea8fe5f7e6bfd"
>
<source>
设置
</source>
<target>
Settings
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"3d6cad40e26f99e39bc6f5925a890ba83b67ce5b"
>
<source>
联机
</source>
<target>
Network
</target>
...
...
@@ -286,58 +264,58 @@
<trans-unit
datatype=
"html"
id=
"95d5e106e679433bec012420b1ab9334c294bc7e"
>
<source>
选择服务器
</source>
<target>
Select Server
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"409ab83692bb4c157cddafe70de9e95531be796e"
>
<source>
排位成绩
</source>
<target>
Rank Result
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"eb22ba5ed7019f8799bc645c508108136ad54096"
>
<source>
竞技排名
</source>
<target>
D.P Rank
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"78da696d0961bc2c3f10d9e6f5998161ba17b75f"
>
<source>
娱乐排名
</source>
<target>
EXP Rank
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"c3e6d747b93851670dd03bc38346f8f7f6fee421"
>
<source>
竞技胜率
</source>
<target>
Win Rate
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"ed1a1a97ab1b37a358ca132a5c87040a9af13693"
>
<source>
经验
</source>
<target>
EXP
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"0ce6333a9b6c85ccd57ecdbee84ef7f6f3f51ef4"
>
<source>
胜场
</source>
<target>
Win
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"a89a5c5567bbe1de398b978749b9a1bf6f1281bf"
>
<source>
负场
</source>
<target>
Lose
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"41a0424d676209939f79f70c8ef8aa8a143d3451"
>
<source>
平局
</source>
<target>
Draw
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"3f4d682cd4fc7579e9ea6bd1bddec84dbc35fd50"
>
<source>
总场
</source>
<target>
Total
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"f5f5d4874301c4b42cdbfab010c953631abbcec9"
>
<source>
更多资料
</source>
<target>
More Info
</target>
</trans-unit>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"409ab83692bb4c157cddafe70de9e95531be796e"
>
<source>
排位成绩
</source>
<target>
Rank Result
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"eb22ba5ed7019f8799bc645c508108136ad54096"
>
<source>
竞技排名
</source>
<target>
D.P Rank
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"78da696d0961bc2c3f10d9e6f5998161ba17b75f"
>
<source>
娱乐排名
</source>
<target>
EXP Rank
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"c3e6d747b93851670dd03bc38346f8f7f6fee421"
>
<source>
竞技胜率
</source>
<target>
Win Rate
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"ed1a1a97ab1b37a358ca132a5c87040a9af13693"
>
<source>
经验
</source>
<target>
EXP
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"0ce6333a9b6c85ccd57ecdbee84ef7f6f3f51ef4"
>
<source>
胜场
</source>
<target>
Win
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"a89a5c5567bbe1de398b978749b9a1bf6f1281bf"
>
<source>
负场
</source>
<target>
Lose
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"41a0424d676209939f79f70c8ef8aa8a143d3451"
>
<source>
平局
</source>
<target>
Draw
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"3f4d682cd4fc7579e9ea6bd1bddec84dbc35fd50"
>
<source>
总场
</source>
<target>
Total
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"f5f5d4874301c4b42cdbfab010c953631abbcec9"
>
<source>
更多资料
</source>
<target>
More Info
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"63346eb53d54138db02c1713ae58f73bb1b8786f"
>
<source>
新闻
</source>
<target>
News
</target>
...
...
@@ -438,64 +416,64 @@
<target>
Import to
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"1761e51e36b01ae1e0012914bd58aa2a741d0401"
>
<source>
已安装
</source>
<target>
Installed
</target>
<trans-unit
datatype=
"html"
id=
"1761e51e36b01ae1e0012914bd58aa2a741d0401"
>
<source>
已安装
</source>
<target>
Installed
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"69f3fab778e92fcec3a8c38d53d771a36e6d5230"
>
<source>
推荐
</source>
<target>
Recommended
</target>
<trans-unit
datatype=
"html"
id=
"69f3fab778e92fcec3a8c38d53d771a36e6d5230"
>
<source>
推荐
</source>
<target>
Recommended
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"fc570ecca13755cb4a92e7513fbd55c2d412f23c"
>
<source>
迷之物体
</source>
<target>
Something
</target>
<trans-unit
datatype=
"html"
id=
"fc570ecca13755cb4a92e7513fbd55c2d412f23c"
>
<source>
迷之物体
</source>
<target>
Something
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"0873cd6df2d1f1016e02526aa9ba32415c1a11d8"
>
<source>
东方 Project
</source>
<target>
Touhou Project
</target>
<trans-unit
datatype=
"html"
id=
"0873cd6df2d1f1016e02526aa9ba32415c1a11d8"
>
<source>
东方 Project
</source>
<target>
Touhou Project
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"785db32107cc0b47564b05381a1d782021d77c67"
>
<source>
东方旧作
</source>
<target>
Touhou old series
</target>
<trans-unit
datatype=
"html"
id=
"785db32107cc0b47564b05381a1d782021d77c67"
>
<source>
东方旧作
</source>
<target>
Touhou old series
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"817376261844eb7eb0c035ed0e3fce744a96b6d9"
>
<source>
已安装的运行库
</source>
<target>
Installed Runtime Library
</target>
<trans-unit
datatype=
"html"
id=
"817376261844eb7eb0c035ed0e3fce744a96b6d9"
>
<source>
已安装的运行库
</source>
<target>
Installed Runtime Library
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"ae5dccdf399fb229fb9f0153a7ec5c28a4579ca1"
>
<source>
登录
</source>
<target>
Sign In
</target>
<trans-unit
datatype=
"html"
id=
"ae5dccdf399fb229fb9f0153a7ec5c28a4579ca1"
>
<source>
登录
</source>
<target>
Sign In
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"fbfb7c4354663a67786aa5aee748d1f38b8fe71c"
>
<source>
游戏
</source>
<target>
Library
</target>
<trans-unit
datatype=
"html"
id=
"fbfb7c4354663a67786aa5aee748d1f38b8fe71c"
>
<source>
游戏
</source>
<target>
Library
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"c4fc2b3584e7581cddb08bb1ebfa41e601195d5b"
>
<source>
社区
</source>
<target>
Community
</target>
<trans-unit
datatype=
"html"
id=
"c4fc2b3584e7581cddb08bb1ebfa41e601195d5b"
>
<source>
社区
</source>
<target>
Community
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"9d9335d175b40b85f2b98610af517a8b7509c089"
>
<source>
MyCard 设置
</source>
<target>
MyCard Settings
</target>
<trans-unit
datatype=
"html"
id=
"9d9335d175b40b85f2b98610af517a8b7509c089"
>
<source>
MyCard 设置
</source>
<target>
MyCard Settings
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"b22ce2179c700e2499e1d402fb1d3f4392c7f6af"
>
<source>
语言
</source>
<target>
Language
</target>
<trans-unit
datatype=
"html"
id=
"b22ce2179c700e2499e1d402fb1d3f4392c7f6af"
>
<source>
语言
</source>
<target>
Language
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"af09a0e18f4200fdb729133ddcd5bb43d52439aa"
>
<source>
确定
</source>
<target>
OK
</target>
<trans-unit
datatype=
"html"
id=
"af09a0e18f4200fdb729133ddcd5bb43d52439aa"
>
<source>
确定
</source>
<target>
OK
</target>
</trans-unit>
</body>
...
...
moesound.js
0 → 100644
View file @
87819fd2
document
.
addEventListener
(
"
DOMContentLoaded
"
,
function
(
event
)
{
$
(
'
#nav,.navbar-header
'
).
removeClass
(
'
nav-xs
'
);
});
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