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
4a358786
Commit
4a358786
authored
Mar 29, 2017
by
HJISTC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renaming
parent
34eed07b
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
80 additions
and
80 deletions
+80
-80
README.md
README.md
+1
-1
app/app-detail.component.html
app/app-detail.component.html
+6
-6
app/app-detail.component.ts
app/app-detail.component.ts
+1
-1
app/app.ts
app/app.ts
+9
-9
app/apps.service.ts
app/apps.service.ts
+17
-17
app/candy.component.ts
app/candy.component.ts
+5
-5
app/lobby.component.html
app/lobby.component.html
+7
-7
app/lobby.component.ts
app/lobby.component.ts
+1
-1
app/login.component.ts
app/login.component.ts
+3
-3
app/main.ts
app/main.ts
+2
-2
app/moecube.component.css
app/moecube.component.css
+0
-0
app/moecube.component.html
app/moecube.component.html
+0
-0
app/moecube.component.ts
app/moecube.component.ts
+4
-4
app/moecube.module.ts
app/moecube.module.ts
+4
-4
app/settings.sevices.ts
app/settings.sevices.ts
+1
-1
app/ygopro.component.ts
app/ygopro.component.ts
+5
-5
index.html
index.html
+6
-6
index.js
index.js
+2
-2
locale/messages.en-US.xlf
locale/messages.en-US.xlf
+2
-2
styles.css
styles.css
+2
-2
tsconfig-aot.json
tsconfig-aot.json
+1
-1
update.html
update.html
+1
-1
No files found.
README.md
View file @
4a358786
# MyCard [![Build Status](https://travis-ci.org/m
ycard/mycard.svg?branch=v3)](https://travis-ci.org/mycard/mycard) [![Build status](https://ci.appveyor.com/api/projects/status/t4jyh0rkwh0nep7w?svg=true)](https://ci.appveyor.com/project/zh99998/mycard) [![NSP Status](https://nodesecurity.io/orgs/mycard/projects/62dd15a6-3927-49c2-8c30-1bc19d4a6e92/badge)](https://nodesecurity.io/orgs/mycard/projects/62dd15a6-3927-49c2-8c30-1bc19d4a6e92
)
# MyCard [![Build Status](https://travis-ci.org/m
oecube/moecube.svg?branch=v3)](https://travis-ci.org/moecube/moecube) [![Build status](https://ci.appveyor.com/api/projects/status/ho6jfrowg37wj1lx?svg=true)](https://ci.appveyor.com/project/zh99998/moecube
)
## Install Dependencies
```
bash
...
...
app/app-detail.component.html
View file @
4a358786
...
...
@@ -103,7 +103,7 @@
</tr>
</tbody>
</table>
<a
i18n
href=
"https://m
ycard.moe
/ygopro/arena/"
target=
"_blank"
class=
"moreinfo"
>
更多资料
</a>
<a
i18n
href=
"https://m
oecube.com
/ygopro/arena/"
target=
"_blank"
class=
"moreinfo"
>
更多资料
</a>
</div>
<div
*ngIf=
"currentApp.description"
class=
"d-flex"
>
...
...
@@ -137,7 +137,7 @@
<p>
{{item.text}}
</p>
<a
i18n
*ngIf=
"item.url"
[href]=
"item.url"
target=
"_blank"
>
了解更多
</a>
</div>
<!--<a href="https://m
ycard.moe
/ygopro/arena/" target="_blank" class="moreinfo">查看所有新闻</a>-->
<!--<a href="https://m
oecube.com
/ygopro/arena/" target="_blank" class="moreinfo">查看所有新闻</a>-->
</div>
...
...
@@ -183,7 +183,7 @@
</div>
<!--<div class="panel panel-default">--><!--<h2 i18n>广告</h2>--><!--<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>--><!--<!– m
ycard
–>--><!--<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>-->
<!--<div class="panel panel-default">--><!--<h2 i18n>广告</h2>--><!--<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>--><!--<!– m
oecube
–>--><!--<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"
>
...
...
@@ -201,7 +201,7 @@
<div
class=
"form-group"
>
<select
class=
"form-control"
name=
"installPath"
(change)=
"selectLibrary()"
[(ngModel)]=
"installOption.installLibrary"
title=
"path"
>
<option
*ngFor=
"let library of libraries"
value=
"{{library}}"
>
{{library}}
</option>
<option
*ngFor=
"let library of availableLibraries"
value=
"create_{{library}}"
>
在 {{library}}\ 盘新建 M
yCard
库
</option>
<option
*ngFor=
"let library of availableLibraries"
value=
"create_{{library}}"
>
在 {{library}}\ 盘新建 M
oeCube
库
</option>
</select></div>
<h4
i18n
>
快捷方式
</h4>
<div
class=
"checkbox"
>
...
...
@@ -250,7 +250,7 @@
<div
class=
"form-group"
>
<select
class=
"form-control"
name=
"installPath"
(change)=
"selectLibrary()"
[(ngModel)]=
"installOption.installLibrary"
title=
"path"
>
<option
*ngFor=
"let library of libraries"
value=
"{{library}}"
>
{{library}}
</option>
<option
*ngFor=
"let library of availableLibraries"
value=
"create_{{library}}"
>
在 {{library}}\ 盘新建 M
yCard
库
</option>
<option
*ngFor=
"let library of availableLibraries"
value=
"create_{{library}}"
>
在 {{library}}\ 盘新建 M
oeCube
库
</option>
</select>
</div>
<!--<h4 i18n>快捷方式</h4>-->
...
...
@@ -346,7 +346,7 @@
<div
class=
"modal-body"
>
订单已经创建,请在新窗口中进行支付,支付成功后页面会自动跳转
若支付成功后没有自动跳转 请联系
thdod@mycard.moe
若支付成功后没有自动跳转 请联系
admin@moecube.com
若支付失败,请返回并选择其他支付方式
</div>
<div
class=
"modal-footer"
>
...
...
app/app-detail.component.ts
View file @
4a358786
...
...
@@ -168,7 +168,7 @@ export class AppDetailComponent implements OnInit, OnChanges {
async
selectLibrary
()
{
if
(
this
.
installOption
.
installLibrary
.
startsWith
(
'
create_
'
))
{
let
volume
=
this
.
installOption
.
installLibrary
.
slice
(
7
);
let
library
=
path
.
join
(
volume
,
'
M
yCard
Library
'
);
let
library
=
path
.
join
(
volume
,
'
M
oeCube
Library
'
);
try
{
await
this
.
appsService
.
createDirectory
(
library
);
this
.
installOption
.
installLibrary
=
library
;
...
...
app/app.ts
View file @
4a358786
...
...
@@ -83,30 +83,30 @@ export class App {
static
downloadUrl
(
app
:
App
,
platform
:
string
,
locale
:
string
):
string
{
if
(
app
.
id
===
'
ygopro
'
)
{
return
`https://
thief.mycard.moe
/metalinks/
${
app
.
id
}
-
${
process
.
platform
}
-
${
locale
}
/
${
app
.
version
}
`
;
return
`https://
api.moecube.com
/metalinks/
${
app
.
id
}
-
${
process
.
platform
}
-
${
locale
}
/
${
app
.
version
}
`
;
}
else
if
(
app
.
id
===
'
desmume
'
)
{
return
`https://
thief.mycard.moe
/metalinks/
${
app
.
id
}
-
${
process
.
platform
}
/
${
app
.
version
}
`
;
return
`https://
api.moecube.com
/metalinks/
${
app
.
id
}
-
${
process
.
platform
}
/
${
app
.
version
}
`
;
}
return
`https://
thief.mycard.moe
/metalinks/
${
app
.
id
}
/
${
app
.
version
}
`
;
return
`https://
api.moecube.com
/metalinks/
${
app
.
id
}
/
${
app
.
version
}
`
;
}
static
checksumUrl
(
app
:
App
,
platform
:
string
,
locale
:
string
):
string
{
if
(
app
.
id
===
'
ygopro
'
)
{
return
`https://
thief.mycard.moe
/checksums/
${
app
.
id
}
-
${
platform
}
-
${
locale
}
/
${
app
.
version
}
`
;
return
`https://
api.moecube.com
/checksums/
${
app
.
id
}
-
${
platform
}
-
${
locale
}
/
${
app
.
version
}
`
;
}
else
if
(
app
.
id
===
'
desmume
'
)
{
return
`https://
thief.mycard.moe
/checksums/
${
app
.
id
}
-
${
platform
}
/
${
app
.
version
}
`
;
return
`https://
api.moecube.com
/checksums/
${
app
.
id
}
-
${
platform
}
/
${
app
.
version
}
`
;
}
return
`https://
thief.mycard.moe
/checksums/
${
app
.
id
}
/
${
app
.
version
}
`
;
return
`https://
api.moecube.com
/checksums/
${
app
.
id
}
/
${
app
.
version
}
`
;
}
static
updateUrl
(
app
:
App
,
platform
:
string
,
locale
:
string
):
string
{
if
(
app
.
id
===
'
ygopro
'
)
{
return
`https://
thief.mycard.moe
/update/
${
app
.
id
}
-
${
platform
}
-
${
locale
}
/
${
app
.
version
}
`
;
return
`https://
api.moecube.com
/update/
${
app
.
id
}
-
${
platform
}
-
${
locale
}
/
${
app
.
version
}
`
;
}
else
if
(
app
.
id
===
'
desmume
'
)
{
return
`https://
thief.mycard.moe
/update/
${
app
.
id
}
-
${
platform
}
/
${
app
.
version
}
`
;
return
`https://
api.moecube.com
/update/
${
app
.
id
}
-
${
platform
}
/
${
app
.
version
}
`
;
}
return
`https://
thief.mycard.moe
/update/
${
app
.
id
}
/
${
app
.
version
}
`
;
return
`https://
api.moecube.com
/update/
${
app
.
id
}
/
${
app
.
version
}
`
;
}
isBought
():
Boolean
{
...
...
app/apps.service.ts
View file @
4a358786
...
...
@@ -80,8 +80,8 @@ export class AppsService {
}
async
loadApps
()
{
let
appsURL
=
'
https://api.m
ycard.moe
/apps.json
'
;
let
keysURL
=
'
https://api.m
ycard.moe
/keys
'
;
let
appsURL
=
'
https://api.m
oecube.com
/apps.json
'
;
let
keysURL
=
'
https://api.m
oecube.com
/keys
'
;
try
{
let
params
=
new
URLSearchParams
();
params
.
set
(
'
user_id
'
,
this
.
loginService
.
user
.
email
);
...
...
@@ -116,7 +116,7 @@ export class AppsService {
async
bundle
()
{
try
{
// const bundle = require(path.join(remote.app.getPath('appData'), 'm
ycard
', 'bundle.json'));
// const bundle = require(path.join(remote.app.getPath('appData'), 'm
oecube
', 'bundle.json'));
// 示例:
// [
// {
...
...
@@ -124,48 +124,48 @@ export class AppsService {
// "createShortcut": false,
// "createDesktopShortcut": false,
// "install": true,
// "installDir": "D:\\M
yCard
Library\\apps\\th105",
// "installLibrary": "D:\\M
yCard
Library"
// "installDir": "D:\\M
oeCube
Library\\apps\\th105",
// "installLibrary": "D:\\M
oeCube
Library"
// },
// {
// "app": "th105-lang-zh-CN",
// "createShortcut": false,
// "createDesktopShortcut": false,
// "install": true,
// "installDir": "D:\\M
yCard
Library\\apps\\th105",
// "installLibrary": "D:\\M
yCard
Library"
// "installDir": "D:\\M
oeCube
Library\\apps\\th105",
// "installLibrary": "D:\\M
oeCube
Library"
// },
// {
// "app": "th123",
// "createShortcut": false,
// "createDesktopShortcut": true,
// "install": true,
// "installDir": "D:\\M
yCard
Library\\apps\\th123",
// "installLibrary": "D:\\M
yCard
Library"
// "installDir": "D:\\M
oeCube
Library\\apps\\th123",
// "installLibrary": "D:\\M
oeCube
Library"
// },
// {
// "app": "th123-lang-zh-CN",
// "createShortcut": false,
// "createDesktopShortcut": false,
// "install": true,
// "installDir": "D:\\M
yCard
Library\\apps\\th123",
// "installLibrary": "D:\\M
yCard
Library"
// "installDir": "D:\\M
oeCube
Library\\apps\\th123",
// "installLibrary": "D:\\M
oeCube
Library"
// },
// {
// "app": "directx",
// "createShortcut": false,
// "createDesktopShortcut": false,
// "install": true,
// "installDir": "D:\\M
yCard
Library\\apps\\directx",
// "installLibrary": "D:\\M
yCard
Library"
// "installDir": "D:\\M
oeCube
Library\\apps\\directx",
// "installLibrary": "D:\\M
oeCube
Library"
// },
// ]
// {
// library: "D:\\M
yCard
Library",
// library: "D:\\M
oeCube
Library",
// apps: ["th105", "th105-lang-zh-CN", "th123", "th123-lang-zh-CN", "directx"]
// }
// 文件在 D:\M
yCardLibrary\cache\th105.tar.xz, D:\MyCard
Library\cache\th105-lang-zh-CN.tar.xz ...
// 文件在 D:\M
oeCubeLibrary\cache\th105.tar.xz, D:\MoeCube
Library\cache\th105-lang-zh-CN.tar.xz ...
// TODO: 安装那些app,不需要下载。安装成功后删除 bundle.json
}
catch
(
error
)
{
...
...
@@ -195,7 +195,7 @@ export class AppsService {
}
if
(
!
library
)
{
try
{
let
_library
=
path
.
join
(
volume
+
'
:
'
,
'
M
yCard
Library
'
);
let
_library
=
path
.
join
(
volume
+
'
:
'
,
'
M
oeCube
Library
'
);
await
this
.
createDirectory
(
_library
);
this
.
settingsService
.
addLibrary
(
_library
,
true
);
library
=
_library
;
...
...
@@ -219,7 +219,7 @@ export class AppsService {
let
libraries
=
this
.
settingsService
.
getLibraries
();
for
(
let
library
of
libraries
)
{
if
(
library
.
path
===
path
.
join
(
remote
.
app
.
getPath
(
'
appData
'
),
'
library
'
))
{
library
.
path
=
path
.
join
(
remote
.
app
.
getPath
(
'
appData
'
),
'
M
yCard
Library
'
);
library
.
path
=
path
.
join
(
remote
.
app
.
getPath
(
'
appData
'
),
'
M
oeCube
Library
'
);
}
}
localStorage
.
setItem
(
SettingsService
.
SETTING_LIBRARY
,
JSON
.
stringify
(
libraries
));
...
...
app/candy.component.ts
View file @
4a358786
...
...
@@ -228,7 +228,7 @@ export class CandyComponent implements OnInit, OnChanges {
ngOnInit
()
{
this
.
jid
=
this
.
loginService
.
user
.
username
+
'
@m
ycard.moe
'
;
this
.
jid
=
this
.
loginService
.
user
.
username
+
'
@m
oecube.com
'
;
this
.
password
=
this
.
loginService
.
user
.
external_id
.
toString
();
this
.
nickname
=
this
.
loginService
.
user
.
username
;
...
...
@@ -262,11 +262,11 @@ export class CandyComponent implements OnInit, OnChanges {
</form>
`
;
Candy
.
init
(
'
wss://chat.m
ycard.moe
:5280/websocket
'
,
{
Candy
.
init
(
'
wss://chat.m
oecube.com
:5280/websocket
'
,
{
core
:
{
debug
:
false
,
autojoin
:
this
.
currentApp
.
conference
&&
[
this
.
currentApp
.
conference
+
'
@conference.m
ycard.moe
'
],
resource
:
'
m
ycard
-
'
+
Math
.
random
().
toString
().
split
(
'
.
'
)[
1
]
autojoin
:
this
.
currentApp
.
conference
&&
[
this
.
currentApp
.
conference
+
'
@conference.m
oecube.com
'
],
resource
:
'
m
oecube
-
'
+
Math
.
random
().
toString
().
split
(
'
.
'
)[
1
]
},
view
:
{
assets
:
'
node_modules/candy/res/
'
,
...
...
@@ -309,7 +309,7 @@ export class CandyComponent implements OnInit, OnChanges {
if
(
!
conference
)
{
return
;
}
conference
+=
'
@conference.m
ycard.moe
'
;
conference
+=
'
@conference.m
oecube.com
'
;
try
{
if
(
Candy
.
View
.
Pane
.
Chat
.
rooms
[
conference
])
{
...
...
app/lobby.component.html
View file @
4a358786
...
...
@@ -9,7 +9,7 @@
<span
i18n
*ngIf=
"grouped_apps.installed"
>
已安装
</span>
<ul
*ngIf=
"grouped_apps.installed"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.installed"
class=
"nav-item"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
class=
"nav-link"
[class.active]=
"app===currentApp"
[href]=
"'https://m
ycard.moe
/' + app.id"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
class=
"nav-link"
[class.active]=
"app===currentApp"
[href]=
"'https://m
oecube.com
/' + app.id"
>
<img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
<i
*ngIf=
"!app.isReady() && !app.status.total"
class=
"spin fa fa-circle-o-notch fa-spin fa-fw"
></i>
<div
*ngIf=
"!app.isReady() && app.status.total"
class=
"progress"
>
...
...
@@ -26,7 +26,7 @@
<span
*ngIf=
"grouped_apps.test"
>
测试
</span>
<ul
*ngIf=
"grouped_apps.test"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.test"
class=
"nav-item"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://m
ycard.moe
/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://m
oecube.com
/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
...
...
@@ -36,7 +36,7 @@
<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://m
ycard.moe
/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://m
oecube.com
/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
...
...
@@ -45,7 +45,7 @@
<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://m
ycard.moe
/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://m
oecube.com
/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
...
...
@@ -54,7 +54,7 @@
<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://m
ycard.moe
/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://m
oecube.com
/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
...
...
@@ -63,7 +63,7 @@
<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://m
ycard.moe
/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://m
oecube.com
/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
...
...
@@ -72,7 +72,7 @@
<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://m
ycard.moe
/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://m
oecube.com
/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
...
...
app/lobby.component.ts
View file @
4a358786
...
...
@@ -59,7 +59,7 @@ export class LobbyComponent implements OnInit {
}
this
.
ref
.
detectChanges
();
let
url
=
new
URL
(
'
wss://api.m
ycard.moe
:3100
'
);
let
url
=
new
URL
(
'
wss://api.m
oecube.com
:3100
'
);
let
params
:
URLSearchParams
=
url
[
'
searchParams
'
];
params
.
set
(
'
user_id
'
,
this
.
loginService
.
user
.
email
);
this
.
messages
=
new
ReconnectingWebSocket
(
url
);
...
...
app/login.component.ts
View file @
4a358786
...
...
@@ -17,7 +17,7 @@ declare const URLSearchParams: any;
})
export
class
LoginComponent
{
url
:
string
;
readonly
return_sso_url
=
'
https://m
ycard.moe
/login_callback
'
;
// 这个url不会真的被使用,可以填写不存在的
readonly
return_sso_url
=
'
https://m
oecube.com
/login_callback
'
;
// 这个url不会真的被使用,可以填写不存在的
constructor
(
private
loginService
:
LoginService
)
{
...
...
@@ -38,13 +38,13 @@ export class LoginComponent {
// params.set('redirect', this.url);
// 暂时 hack 一下登出,因为聊天室现在没办法重新初始化,于是登出后刷新页面。
params
.
set
(
'
redirect
'
,
'
https://m
ycard.moe
/logout_callback
'
);
params
.
set
(
'
redirect
'
,
'
https://m
oecube.com
/logout_callback
'
);
this
.
url
=
url
.
toString
();
}
}
return_sso
(
return_url
:
string
)
{
if
(
return_url
===
'
https://m
ycard.moe
/logout_callback
'
)
{
if
(
return_url
===
'
https://m
oecube.com
/logout_callback
'
)
{
return
location
.
reload
();
}
if
(
!
return_url
.
startsWith
(
this
.
return_sso_url
))
{
...
...
app/main.ts
View file @
4a358786
import
{
platformBrowserDynamic
}
from
'
@angular/platform-browser-dynamic
'
;
import
{
getTranslationProviders
}
from
'
./i18n-providers
'
;
import
{
M
yCard
}
from
'
./mycard
.module
'
;
import
{
M
oeCube
}
from
'
./moecube
.module
'
;
getTranslationProviders
().
then
(
providers
=>
{
const
options
=
{
providers
};
platformBrowserDynamic
().
bootstrapModule
(
M
yCard
,
options
);
platformBrowserDynamic
().
bootstrapModule
(
M
oeCube
,
options
);
});
app/m
ycard
.component.css
→
app/m
oecube
.component.css
View file @
4a358786
File moved
app/m
ycard
.component.html
→
app/m
oecube
.component.html
View file @
4a358786
File moved
app/m
ycard
.component.ts
→
app/m
oecube
.component.ts
View file @
4a358786
...
...
@@ -9,12 +9,12 @@ const autoUpdater: Electron.AutoUpdater = remote.getGlobal('autoUpdater');
@
Component
({
moduleId
:
module
.
id
,
selector
:
'
m
ycard
'
,
templateUrl
:
'
m
ycard
.component.html
'
,
styleUrls
:
[
'
m
ycard
.component.css
'
],
selector
:
'
m
oecube
'
,
templateUrl
:
'
m
oecube
.component.html
'
,
styleUrls
:
[
'
m
oecube
.component.css
'
],
})
export
class
M
yCard
Component
implements
OnInit
{
export
class
M
oeCube
Component
implements
OnInit
{
currentPage
:
string
=
'
lobby
'
;
update_status
:
string
|
undefined
=
remote
.
getGlobal
(
'
update_status
'
);
...
...
app/m
ycard
.module.ts
→
app/m
oecube
.module.ts
View file @
4a358786
...
...
@@ -2,7 +2,7 @@ import {NgModule, NO_ERRORS_SCHEMA, LOCALE_ID} from '@angular/core';
import
{
BrowserModule
}
from
'
@angular/platform-browser
'
;
import
{
FormsModule
,
ReactiveFormsModule
}
from
'
@angular/forms
'
;
import
{
HttpModule
}
from
'
@angular/http
'
;
import
{
M
yCardComponent
}
from
'
./mycard
.component
'
;
import
{
M
oeCubeComponent
}
from
'
./moecube
.component
'
;
import
{
LoginComponent
}
from
'
./login.component
'
;
import
{
StoreComponent
}
from
'
./store.component
'
;
import
{
LobbyComponent
}
from
'
./lobby.component
'
;
...
...
@@ -19,10 +19,10 @@ import {CandyComponent} from './candy.component';
@
NgModule
({
imports
:
[
BrowserModule
,
FormsModule
,
ReactiveFormsModule
,
HttpModule
],
declarations
:
[
M
yCard
Component
,
LoginComponent
,
StoreComponent
,
LobbyComponent
,
M
oeCube
Component
,
LoginComponent
,
StoreComponent
,
LobbyComponent
,
AppDetailComponent
,
RosterComponent
,
YGOProComponent
,
AboutComponent
,
CandyComponent
],
bootstrap
:
[
M
yCard
Component
],
bootstrap
:
[
M
oeCube
Component
],
providers
:
[
AppsService
,
SettingsService
,
LoginService
,
DownloadService
,
{
...
...
@@ -33,5 +33,5 @@ import {CandyComponent} from './candy.component';
],
schemas
:
[
NO_ERRORS_SCHEMA
]
})
export
class
M
yCard
{
export
class
M
oeCube
{
}
app/settings.sevices.ts
View file @
4a358786
...
...
@@ -17,7 +17,7 @@ export class SettingsService {
static
defaultLibraries
=
[
{
'
default
'
:
true
,
path
:
path
.
join
(
remote
.
app
.
getPath
(
'
appData
'
),
'
M
yCard
Library
'
)
path
:
path
.
join
(
remote
.
app
.
getPath
(
'
appData
'
),
'
M
oeCube
Library
'
)
},
];
static
SETTING_LOCALE
=
'
locale
'
;
...
...
app/ygopro.component.ts
View file @
4a358786
...
...
@@ -207,14 +207,14 @@ export class YGOProComponent implements OnInit, OnDestroy {
if
(
this
.
settingsService
.
getLocale
().
startsWith
(
'
zh
'
))
{
this
.
servers
.
push
({
id
:
'
tiramisu
'
,
url
:
'
wss://tiramisu.m
ycard.moe
:7923
'
,
url
:
'
wss://tiramisu.m
oecube.com
:7923
'
,
address
:
'
112.124.105.11
'
,
port
:
7911
,
custom
:
true
,
replay
:
true
},
{
id
:
'
tiramisu-athletic
'
,
url
:
'
wss://tiramisu.m
ycard.moe
:8923
'
,
url
:
'
wss://tiramisu.m
oecube.com
:8923
'
,
address
:
'
112.124.105.11
'
,
port
:
8911
,
custom
:
false
,
...
...
@@ -223,14 +223,14 @@ export class YGOProComponent implements OnInit, OnDestroy {
}
else
{
this
.
servers
.
push
({
id
:
'
mercury-us-1-athletic
'
,
url
:
'
wss://mercury-us-1.m
ycard.moe
:7923
'
,
url
:
'
wss://mercury-us-1.m
oecube.com
:7923
'
,
address
:
'
104.237.154.173
'
,
port
:
7911
,
custom
:
true
,
replay
:
true
},
{
id
:
'
mercury-us-1
'
,
url
:
'
wss://mercury-us-1.m
ycard.moe
:7923
'
,
url
:
'
wss://mercury-us-1.m
oecube.com
:7923
'
,
address
:
'
104.237.154.173
'
,
port
:
8911
,
custom
:
false
,
...
...
@@ -591,7 +591,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
search
.
set
(
'
locale
'
,
this
.
settingsService
.
getLocale
());
match_started_at
=
new
Date
();
this
.
matching_arena
=
matching_arena
=
arena
;
this
.
matching
=
matching
=
this
.
http
.
post
(
'
https://api.m
ycard.moe
/ygopro/match
'
,
null
,
{
this
.
matching
=
matching
=
this
.
http
.
post
(
'
https://api.m
oecube.com
/ygopro/match
'
,
null
,
{
headers
:
headers
,
search
:
search
}).
map
(
response
=>
response
.
json
())
...
...
index.html
View file @
4a358786
<!DOCTYPE html>
<html>
<head>
<title>
M
yCard
</title>
<title>
M
oeCube
</title>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"stylesheet"
href=
"node_modules/bootstrap/dist/css/bootstrap.min.css"
>
...
...
@@ -29,12 +29,12 @@
<body>
<m
ycard
>
<m
oecube
>
<!--<div id="loading">M
yCard
<span id="version"></span> Loading...</div>-->
<!--<div id="loading">M
oeCube
<span id="version"></span> Loading...</div>-->
<div
id=
"loading-bar"
>
<span
class=
"navbar-brand"
>
M
yCard
</span>
<span
class=
"navbar-brand"
>
M
oeCube
</span>
<i
class=
"fa fa-times close"
i18n=
""
i18n-title=
""
title=
"关闭"
onclick=
"window.close()"
></i>
</div>
...
...
@@ -47,9 +47,9 @@
<span>
.
</span>
</p>
</div>
<div
id=
"failed"
hidden
>
发生了错误,请复制以下错误信息并联系
support@mycard.moe
</div>
<div
id=
"failed"
hidden
>
发生了错误,请复制以下错误信息并联系
admin@moecube.com
</div>
<pre
id=
"error"
hidden
></pre>
</m
ycard
>
</m
oecube
>
<script>
document
.
body
.
classList
.
add
(
process
.
platform
);
// document.getElementById('version').innerHTML = require('electron').remote.app.getVersion();
...
...
index.js
View file @
4a358786
...
...
@@ -63,7 +63,7 @@ if (!process.env['NODE_ENV']) {
let
updateWindow
;
global
.
autoUpdater
=
autoUpdater
;
// if (process.env['NODE_ENV'] == 'production' && process.platform == 'darwin') {
// autoUpdater.setFeedURL("https://wudizhanche.m
ycard.moe
/update/darwin/" + app.getVersion());
// autoUpdater.setFeedURL("https://wudizhanche.m
oecube.com
/update/darwin/" + app.getVersion());
// }
// else{
// setTimeout(()=>{
...
...
@@ -193,7 +193,7 @@ function createTray() {
label
:
'
退出
'
,
type
:
'
normal
'
,
click
:
app
.
quit
}
]);
tray
.
setToolTip
(
'
M
yCard
'
);
tray
.
setToolTip
(
'
M
oeCube
'
);
tray
.
setContextMenu
(
contextMenu
);
}
...
...
locale/messages.en-US.xlf
View file @
4a358786
...
...
@@ -567,8 +567,8 @@
</trans-unit>
<trans-unit
datatype=
"html"
id=
"9d9335d175b40b85f2b98610af517a8b7509c089"
>
<source>
M
yCard
设置
</source>
<target>
M
yCard
Settings
</target>
<source>
M
oeCube
设置
</source>
<target>
M
oeCube
Settings
</target>
</trans-unit>
<trans-unit
datatype=
"html"
id=
"b22ce2179c700e2499e1d402fb1d3f4392c7f6af"
>
...
...
styles.css
View file @
4a358786
...
...
@@ -15,7 +15,7 @@ body {
/*padding-right: 0 !important;*/
/*}*/
m
ycard
{
m
oecube
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
...
...
@@ -94,7 +94,7 @@ body.resizing /deep/ * {
-webkit-user-select
:
none
;
}
/*m
ycard
{*/
/*m
oecube
{*/
/*background-color: white;*/
/*}*/
...
...
tsconfig-aot.json
View file @
4a358786
...
...
@@ -17,7 +17,7 @@
"skipLibCheck"
:
true
},
"files"
:
[
"app/m
ycard
.module.ts"
,
"app/m
oecube
.module.ts"
,
"app/main.ts"
],
"angularCompilerOptions"
:
{
...
...
update.html
View file @
4a358786
...
...
@@ -34,7 +34,7 @@
<div
class=
"container"
>
<h1>
{{pageText.updateTitle}}
</h1>
<p
v-for=
"(msg, index) in pageText.updateMsg"
>
{{msg}}
</p>
<p>
{{pageText.updateFailed.p1}}
<a
href=
"https://m
ycard.moe
"
target=
"_blank"
>
{{pageText.updateFailed.p2}}
</a>
{{pageText.updateFailed.p3}}
</p>
<p>
{{pageText.updateFailed.p1}}
<a
href=
"https://m
oecube.com
"
target=
"_blank"
>
{{pageText.updateFailed.p2}}
</a>
{{pageText.updateFailed.p3}}
</p>
<p
id=
"actions"
>
<button
@
click=
"onClose"
type=
"button"
class=
"btn btn-secondary"
>
{{pageText.actions.close}}
</button>
<button
@
click=
"onUpdate"
type=
"button"
class=
"btn btn-primary"
>
{{pageText.actions.update}}
</button>
...
...
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