Commit 68daa4c2 authored by 神楽坂玲奈's avatar 神楽坂玲奈

Merge remote-tracking branch 'origin/master'

parents 77ec963c 2b8a3ad2
# MyCard [![Build Status](https://travis-ci.org/mycard/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)
# MoeCube [![Build Status](https://travis-ci.org/moecube/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
......
<!--<h2>MyCard 招募公告</h2>-->
<!--<h2>MoeCube 招募公告</h2>-->
<!--<p>MyCard 伴随大家已经有 6 年了,在这 6 年间 MyCard 作为一个同人平台很感谢得到大家的支持,现在 MyCard 为了给支持的大家带来更好的体验,正在努力进行全新的改版的开发工作,希望可以得到大家的支持和帮助。</p>--><!--<p>职位:(前端)开发工程师</p>--><!--<p>负责平台客户端的开发,及网站和论坛相关的改版工作。</p>--><!--<p>职位描述:对 ACG 领域有一定的了解,会js等编程领域的专业技能,对软件开发具有一定的热情和自主能动性,认真严谨和团队意识。</p>--><!--<p>联系邮箱:hr@mycard.moe</p>--><!--<p>工作地点:上海市长宁区(工资面议)</p>-->
<!--<p>MoeCube 伴随大家已经有 6 年了,在这 6 年间 MoeCube 作为一个同人平台很感谢得到大家的支持,现在 MoeCube 为了给支持的大家带来更好的体验,正在努力进行全新的改版的开发工作,希望可以得到大家的支持和帮助。</p>--><!--<p>职位:(前端)开发工程师</p>--><!--<p>负责平台客户端的开发,及网站和论坛相关的改版工作。</p>--><!--<p>职位描述:对 ACG 领域有一定的了解,会js等编程领域的专业技能,对软件开发具有一定的热情和自主能动性,认真严谨和团队意识。</p>--><!--<p>联系邮箱:admin@moecube.com</p>--><!--<p>工作地点:上海市长宁区(工资面议)</p>-->
<!--<h2>联系我们</h2>--><!--<dl>--><!--<dt>应聘</dt>--><!--<dd>hr@mycard.com</dd>--><!--<dt>投稿、合作、侵权投诉</dt>--><!--<dd>business@mycard.com</dd>--><!--<dt>问题反馈</dt>--><!--<dd>support@mycard.moe</dd>--><!--</dl>-->
<!--<h2>联系我们</h2>--><!--<dl>--><!--<dt>应聘</dt>--><!--<dd>admin@moecube.com</dd>--><!--<dt>投稿、合作、侵权投诉</dt>--><!--<dd>admin@moecube.com</dd>--><!--<dt>问题反馈</dt>--><!--<dd>admin@moecube.com</dd>--><!--</dl>-->
......@@ -103,7 +103,7 @@
</tr>
</tbody>
</table>
<a i18n href="https://mycard.moe/ygopro/arena/" target="_blank" class="moreinfo">更多资料</a>
<a i18n href="https://moecube.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://mycard.moe/ygopro/arena/" target="_blank" class="moreinfo">查看所有新闻</a>-->
<!--<a href="https://moecube.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>--><!--&lt;!&ndash; mycard &ndash;&gt;--><!--<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>--><!--&lt;!&ndash; moecube &ndash;&gt;--><!--<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}}\ 盘新建 MyCard</option>
<option *ngFor="let library of availableLibraries" value="create_{{library}}">在 {{library}}\ 盘新建 MoeCube</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}}\ 盘新建 MyCard</option>
<option *ngFor="let library of availableLibraries" value="create_{{library}}">在 {{library}}\ 盘新建 MoeCube</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">
......
......@@ -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, 'MyCardLibrary');
let library = path.join(volume, 'MoeCubeLibrary');
try {
await this.appsService.createDirectory(library);
this.installOption.installLibrary = library;
......@@ -278,7 +278,7 @@ export class AppDetailComponent implements OnInit, OnChanges {
data.set('currency', 'cny');
data.set('payment', this.payment);
try {
let {url} = await this.http.post('https://api.mycard.moe/orders', data).map(response => response.json()).toPromise();
let {url} = await this.http.post('https://api.moecube.com/orders', data).map(response => response.json()).toPromise();
open(url);
$('#purchase-modal').modal('hide');
$('#purchase-modal-alipay').modal('show');
......
......@@ -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 {
......
......@@ -80,8 +80,8 @@ export class AppsService {
}
async loadApps() {
let appsURL = 'https://api.mycard.moe/apps.json';
let keysURL = 'https://api.mycard.moe/keys';
let appsURL = 'https://api.moecube.com/apps.json';
let keysURL = 'https://api.moecube.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'), 'mycard', 'bundle.json'));
// const bundle = require(path.join(remote.app.getPath('appData'), 'moecube', 'bundle.json'));
// 示例:
// [
// {
......@@ -124,48 +124,48 @@ export class AppsService {
// "createShortcut": false,
// "createDesktopShortcut": false,
// "install": true,
// "installDir": "D:\\MyCardLibrary\\apps\\th105",
// "installLibrary": "D:\\MyCardLibrary"
// "installDir": "D:\\MoeCubeLibrary\\apps\\th105",
// "installLibrary": "D:\\MoeCubeLibrary"
// },
// {
// "app": "th105-lang-zh-CN",
// "createShortcut": false,
// "createDesktopShortcut": false,
// "install": true,
// "installDir": "D:\\MyCardLibrary\\apps\\th105",
// "installLibrary": "D:\\MyCardLibrary"
// "installDir": "D:\\MoeCubeLibrary\\apps\\th105",
// "installLibrary": "D:\\MoeCubeLibrary"
// },
// {
// "app": "th123",
// "createShortcut": false,
// "createDesktopShortcut": true,
// "install": true,
// "installDir": "D:\\MyCardLibrary\\apps\\th123",
// "installLibrary": "D:\\MyCardLibrary"
// "installDir": "D:\\MoeCubeLibrary\\apps\\th123",
// "installLibrary": "D:\\MoeCubeLibrary"
// },
// {
// "app": "th123-lang-zh-CN",
// "createShortcut": false,
// "createDesktopShortcut": false,
// "install": true,
// "installDir": "D:\\MyCardLibrary\\apps\\th123",
// "installLibrary": "D:\\MyCardLibrary"
// "installDir": "D:\\MoeCubeLibrary\\apps\\th123",
// "installLibrary": "D:\\MoeCubeLibrary"
// },
// {
// "app": "directx",
// "createShortcut": false,
// "createDesktopShortcut": false,
// "install": true,
// "installDir": "D:\\MyCardLibrary\\apps\\directx",
// "installLibrary": "D:\\MyCardLibrary"
// "installDir": "D:\\MoeCubeLibrary\\apps\\directx",
// "installLibrary": "D:\\MoeCubeLibrary"
// },
// ]
// {
// library: "D:\\MyCardLibrary",
// library: "D:\\MoeCubeLibrary",
// apps: ["th105", "th105-lang-zh-CN", "th123", "th123-lang-zh-CN", "directx"]
// }
// 文件在 D:\MyCardLibrary\cache\th105.tar.xz, D:\MyCardLibrary\cache\th105-lang-zh-CN.tar.xz ...
// 文件在 D:\MoeCubeLibrary\cache\th105.tar.xz, D:\MoeCubeLibrary\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 + ':', 'MyCardLibrary');
let _library = path.join(volume + ':', 'MoeCubeLibrary');
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'), 'MyCardLibrary');
library.path = path.join(remote.app.getPath('appData'), 'MoeCubeLibrary');
}
}
localStorage.setItem(SettingsService.SETTING_LIBRARY, JSON.stringify(libraries));
......
......@@ -228,7 +228,7 @@ export class CandyComponent implements OnInit, OnChanges {
ngOnInit() {
this.jid = this.loginService.user.username + '@mycard.moe';
this.jid = this.loginService.user.username + '@moecube.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.mycard.moe:5280/websocket', {
Candy.init('wss://chat.moecube.com:5280/websocket', {
core: {
debug: false,
autojoin: this.currentApp.conference && [this.currentApp.conference + '@conference.mycard.moe'],
resource: 'mycard-' + Math.random().toString().split('.')[1]
autojoin: this.currentApp.conference && [this.currentApp.conference + '@conference.moecube.com'],
resource: 'moecube-' + 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.mycard.moe';
conference += '@conference.moecube.com';
try {
if (Candy.View.Pane.Chat.rooms[conference]) {
......
......@@ -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://mycard.moe/' + app.id">
<a (click)="$event.preventDefault(); chooseApp(app)" class="nav-link" [class.active]="app===currentApp" [href]="'https://moecube.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://mycard.moe/' + app.id" class="nav-link" [class.active]="app===currentApp">
<a (click)="$event.preventDefault(); chooseApp(app)" [href]="'https://moecube.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://mycard.moe/' + app.id" class="nav-link" [class.active]="app===currentApp">
<a (click)="$event.preventDefault(); chooseApp(app)" [href]="'https://moecube.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://mycard.moe/' + app.id" class="nav-link" [class.active]="app===currentApp">
<a (click)="$event.preventDefault(); chooseApp(app)" [href]="'https://moecube.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://mycard.moe/' + app.id" class="nav-link" [class.active]="app===currentApp">
<a (click)="$event.preventDefault(); chooseApp(app)" [href]="'https://moecube.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://mycard.moe/' + app.id" class="nav-link" [class.active]="app===currentApp">
<a (click)="$event.preventDefault(); chooseApp(app)" [href]="'https://moecube.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://mycard.moe/' + app.id" class="nav-link" [class.active]="app===currentApp">
<a (click)="$event.preventDefault(); chooseApp(app)" [href]="'https://moecube.com/' + app.id" class="nav-link" [class.active]="app===currentApp">
<img *ngIf="app.icon" class="icon" [src]="app.icon">
{{app.name}}
</a>
......
......@@ -59,7 +59,7 @@ export class LobbyComponent implements OnInit {
}
this.ref.detectChanges();
let url = new URL('wss://api.mycard.moe:3100');
let url = new URL('wss://api.moecube.com:3100');
let params: URLSearchParams = url['searchParams'];
params.set('user_id', this.loginService.user.email);
this.messages = new ReconnectingWebSocket(url);
......
......@@ -17,7 +17,7 @@ declare const URLSearchParams: any;
})
export class LoginComponent {
url: string;
readonly return_sso_url = 'https://mycard.moe/login_callback'; // 这个url不会真的被使用,可以填写不存在的
readonly return_sso_url = 'https://moecube.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://mycard.moe/logout_callback');
params.set('redirect', 'https://moecube.com/logout_callback');
this.url = url.toString();
}
}
return_sso(return_url: string) {
if (return_url === 'https://mycard.moe/logout_callback') {
if (return_url === 'https://moecube.com/logout_callback') {
return location.reload();
}
if (!return_url.startsWith(this.return_sso_url)) {
......
// import {MyCardNgFactory} from '../aot/app/mycard.module.ngfactory';
// import {MoeCubeNgFactory} from '../aot/app/moecube.module.ngfactory';
// import {getTranslationProviders} from './i18n-providers';
// import {enableProdMode} from '@angular/core';
// import {platformBrowser} from '@angular/platform-browser';
......@@ -6,5 +6,5 @@
//
// getTranslationProviders().then(providers => {
// const options = {providers};
// platformBrowser().bootstrapModuleFactory(MyCardNgFactory);
// platformBrowser().bootstrapModuleFactory(MoeCubeNgFactory);
// });
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {getTranslationProviders} from './i18n-providers';
import {MyCard} from './mycard.module';
import {MoeCube} from './moecube.module';
getTranslationProviders().then(providers => {
const options = {providers};
platformBrowserDynamic().bootstrapModule(MyCard, options);
platformBrowserDynamic().bootstrapModule(MoeCube, options);
});
<nav id="navbar" class="navbar navbar-toggleable-md navbar-light">
<a id="navbar-brand" class="navbar-brand" href="#">MyCard</a>
<a id="navbar-brand" class="navbar-brand" href="#">MoeCube</a>
<ul class="navbar-nav mr-auto">
<li *ngIf="!loginService.logged_in" class="nav-item active">
<a i18n class="nav-link" href="#">登录</a>
......@@ -56,7 +56,7 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 i18n class="modal-title" id="myModalLabel">MyCard 设置</h5>
<h5 i18n class="modal-title" id="myModalLabel">MoeCube 设置</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
......
......@@ -9,12 +9,12 @@ const autoUpdater: Electron.AutoUpdater = remote.getGlobal('autoUpdater');
@Component({
moduleId: module.id,
selector: 'mycard',
templateUrl: 'mycard.component.html',
styleUrls: ['mycard.component.css'],
selector: 'moecube',
templateUrl: 'moecube.component.html',
styleUrls: ['moecube.component.css'],
})
export class MyCardComponent implements OnInit {
export class MoeCubeComponent implements OnInit {
currentPage: string = 'lobby';
update_status: string | undefined = remote.getGlobal('update_status');
......
......@@ -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 {MyCardComponent} from './mycard.component';
import {MoeCubeComponent} 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: [
MyCardComponent, LoginComponent, StoreComponent, LobbyComponent,
MoeCubeComponent, LoginComponent, StoreComponent, LobbyComponent,
AppDetailComponent, RosterComponent, YGOProComponent, AboutComponent, CandyComponent
],
bootstrap: [MyCardComponent],
bootstrap: [MoeCubeComponent],
providers: [
AppsService, SettingsService, LoginService, DownloadService
, {
......@@ -33,5 +33,5 @@ import {CandyComponent} from './candy.component';
],
schemas: [NO_ERRORS_SCHEMA]
})
export class MyCard {
export class MoeCube {
}
......@@ -17,7 +17,7 @@ export class SettingsService {
static defaultLibraries = [
{
'default': true,
path: path.join(remote.app.getPath('appData'), 'MyCardLibrary')
path: path.join(remote.app.getPath('appData'), 'MoeCubeLibrary')
},
];
static SETTING_LOCALE = 'locale';
......
......@@ -207,14 +207,14 @@ export class YGOProComponent implements OnInit, OnDestroy {
if (this.settingsService.getLocale().startsWith('zh')) {
this.servers.push({
id: 'tiramisu',
url: 'wss://tiramisu.mycard.moe:7923',
url: 'wss://tiramisu.moecube.com:7923',
address: '112.124.105.11',
port: 7911,
custom: true,
replay: true
}, {
id: 'tiramisu-athletic',
url: 'wss://tiramisu.mycard.moe:8923',
url: 'wss://tiramisu.moecube.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.mycard.moe:7923',
url: 'wss://mercury-us-1.moecube.com:7923',
address: '104.237.154.173',
port: 7911,
custom: true,
replay: true
}, {
id: 'mercury-us-1',
url: 'wss://mercury-us-1.mycard.moe:7923',
url: 'wss://mercury-us-1.moecube.com:7923',
address: '104.237.154.173',
port: 8911,
custom: false,
......@@ -384,11 +384,11 @@ export class YGOProComponent implements OnInit, OnDestroy {
this.replays = await this.get_replays();
// https://mycard.moe/ygopro/api/user?username=ozxdno
// https://moecube.com/ygopro/api/user?username=ozxdno
let params = new URLSearchParams();
params.set('username', this.loginService.user.username);
try {
let points = await this.http.get('https://mycard.moe/ygopro/api/user', {search: params})
let points = await this.http.get('https://moecube.com/ygopro/api/user', {search: params})
.map((response) => response.json())
.toPromise();
this.points.emit(points);
......@@ -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.mycard.moe/ygopro/match', null, {
this.matching = matching = this.http.post('https://api.moecube.com/ygopro/match', null, {
headers: headers,
search: search
}).map(response => response.json())
......
<!DOCTYPE html>
<html>
<head>
<title>MyCard</title>
<title>MoeCube</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>
<mycard>
<moecube>
<!--<div id="loading">MyCard <span id="version"></span> Loading...</div>-->
<!--<div id="loading">MoeCube <span id="version"></span> Loading...</div>-->
<div id="loading-bar">
<span class="navbar-brand">MyCard</span>
<span class="navbar-brand">MoeCube</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>
</mycard>
</moecube>
<script>
document.body.classList.add(process.platform);
// document.getElementById('version').innerHTML = require('electron').remote.app.getVersion();
......
......@@ -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.mycard.moe/update/darwin/" + app.getVersion());
// autoUpdater.setFeedURL("https://wudizhanche.moecube.com/update/darwin/" + app.getVersion());
// }
// else{
// setTimeout(()=>{
......@@ -193,7 +193,7 @@ function createTray() {
label: '退出', type: 'normal', click: app.quit
}
]);
tray.setToolTip('MyCard');
tray.setToolTip('MoeCube');
tray.setContextMenu(contextMenu);
}
......
......@@ -2,15 +2,15 @@ module.exports = {
"update": {
"zh-CN": {
"pageTitle":"更新消息",
"updateTitle":"MyCard 更新下载完毕",
"updateTitle":"MoeCube 更新下载完毕",
"updateMsg":[
"点击【现在安装更新】,会立即关闭 MyCard 平台及正在运行中的游戏,并安装更新。",
"点击【下次启动时安装更新】,会在 MyCard 平台退出之后进行更新。",
"点击【现在安装更新】,会立即关闭 MoeCube 平台及正在运行中的游戏,并安装更新。",
"点击【下次启动时安装更新】,会在 MoeCube 平台退出之后进行更新。",
"你也可以随时点击平台上的更新按钮安装哦!"
],
"updateFailed":{
"p1":"如果自动更新失败,请至",
"p2":"https://mycard.moe",
"p2":"https://moecube.com",
"p3":"手动下载最新版本"
},
"actions":{
......@@ -22,8 +22,8 @@ module.exports = {
"pageTitle":"Update",
"updateTitle":"Update downloaded",
"updateMsg":[
"If you install now, MyCard will go offline and update immediately, your gaming progress may be affected.",
"If you install later, then the update will be automatically installed when you start-up MyCard next time.",
"If you install now, MoeCube will go offline and update immediately, your gaming progress may be affected.",
"If you install later, then the update will be automatically installed when you start-up MoeCube next time.",
"You may also click the Update button to install the update anytime."
],
"updateFailed":{
......
......@@ -567,8 +567,8 @@
</trans-unit>
<trans-unit datatype="html" id="9d9335d175b40b85f2b98610af517a8b7509c089">
<source>MyCard 设置</source>
<target>MyCard Settings</target>
<source>MoeCube 设置</source>
<target>MoeCube Settings</target>
</trans-unit>
<trans-unit datatype="html" id="b22ce2179c700e2499e1d402fb1d3f4392c7f6af">
......
{
"name": "mycard",
"name": "moecube",
"version": "3.1.0",
"description": "mycard",
"description": "moecube",
"keywords": [],
"author": "zh99998 <zh99998@gmail.com>",
"homepage": "https://mycard.moe",
"homepage": "https://MoeCube.com",
"license": "UNLICENSED",
"repository": "github:mycard/mycard",
"repository": "github:moecube/moecube",
"scripts": {
"start": "tsc && electron .",
"lint": "tslint ./app/*.ts -t verbose",
......@@ -15,9 +15,9 @@
"build:aot": "ngc -p tsconfig-aot.json && rollup -c rollup-config.js",
"tsc": "tsc",
"i18n": "ng-xi18n && sed -i.bak 's/source-language=\"en\"/source-language=\"zh-CN\"/' messages.xlf",
"i18n:upload": "npm run i18n && curl --location --user ${TRANSIFEX_USERNAME}:${TRANSIFEX_PASSWORD} --request PUT --header 'Content-type: multipart/form-data' --form content=@messages.xlf https://www.transifex.com/api/2/project/mycard/resource/messages/content/",
"i18n:translate": "open https://www.transifex.com/mycard/mycard/translate/#en_US/messages/108367258?translated=no",
"i18n:download": "curl --output locale/messages.en-US.xlf --retry 5 --location --user ${TRANSIFEX_USERNAME}:zh112998 https://www.transifex.com/api/2/project/mycard/resource/messages/translation/en_US/?file && sed -i.bak 's/\\&amp;/\\&/g; s/\\&lt;/</g; s/\\&gt;/>/g; s/\\&quot;/\"/g;' locale/messages.en-US.xlf"
"i18n:upload": "npm run i18n && curl --location --user ${TRANSIFEX_USERNAME}:${TRANSIFEX_PASSWORD} --request PUT --header 'Content-type: multipart/form-data' --form content=@messages.xlf https://www.transifex.com/api/2/project/moecube/resource/messages/content/",
"i18n:translate": "open https://www.transifex.com/moecube/moecube/translate/#en_US/messages/108367258?translated=no",
"i18n:download": "curl --output locale/messages.en-US.xlf --retry 5 --location --user ${TRANSIFEX_USERNAME}:${TRANSIFEX_PASSWORD} https://www.transifex.com/api/2/project/moecube/resource/messages/translation/en_US/?file && sed -i.bak 's/\\&amp;/\\&/g; s/\\&lt;/</g; s/\\&gt;/>/g; s/\\&quot;/\"/g;' locale/messages.en-US.xlf"
},
"dependencies": {
"@angular/common": "latest",
......@@ -31,12 +31,12 @@
"angular-in-memory-web-api": "latest",
"aria2": "latest",
"bootstrap": "next",
"candy": "https://github.com/mycard/candy/releases/download/v2.2.0/candy.tar.gz",
"candy": "https://github.com/moecube/candy/releases/download/v2.2.0/candy.tar.gz",
"candy-shop": "zh99998/candy-plugins#patch-5",
"core-js": "latest",
"electron-auto-updater": "latest",
"electron-is-dev": "latest",
"electron-sudo": "mycard/electron-sudo#mycard",
"electron-sudo": "moecube/electron-sudo#moecube",
"font-awesome": "latest",
"glob": "latest",
"ini": "latest",
......@@ -46,7 +46,7 @@
"reconnecting-websocket": "^3.0.3",
"reflect-metadata": "latest",
"rxjs": "latest",
"systemjs": "mycard/systemjs#mycard",
"systemjs": "moecube/systemjs#moecube",
"systemjs-plugin-text": "latest",
"tether": "latest",
"typeahead.js": "latest",
......@@ -76,12 +76,12 @@
"tslint": "^3.15.1"
},
"build": {
"productName": "MyCard",
"appId": "com.mycard.mycard",
"productName": "MoeCube",
"appId": "com.moecube.moecube",
"publish": [
{
"provider": "generic",
"url": "https://wudizhanche.mycard.moe/downloads"
"url": "https://api.moecube.com/downloads"
},
{
"provider": "github"
......
......@@ -15,7 +15,7 @@ body {
/*padding-right: 0 !important;*/
/*}*/
mycard {
moecube {
height: 100%;
display: flex;
flex-direction: column;
......@@ -94,7 +94,7 @@ body.resizing /deep/ * {
-webkit-user-select: none;
}
/*mycard {*/
/*moecube {*/
/*background-color: white;*/
/*}*/
......
......@@ -17,7 +17,7 @@
"skipLibCheck": true
},
"files": [
"app/mycard.module.ts",
"app/moecube.module.ts",
"app/main.ts"
],
"angularCompilerOptions": {
......
......@@ -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://mycard.moe" target="_blank">{{pageText.updateFailed.p2}}</a> {{pageText.updateFailed.p3}}</p>
<p>{{pageText.updateFailed.p1}} <a href="https://moecube.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>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment