Commit 4a358786 authored by HJISTC's avatar HJISTC

Renaming

parent 34eed07b
# 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) # MyCard [![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 ## Install Dependencies
```bash ```bash
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
</tr> </tr>
</tbody> </tbody>
</table> </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>
<div *ngIf="currentApp.description" class="d-flex"> <div *ngIf="currentApp.description" class="d-flex">
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
<p>{{item.text}}</p> <p>{{item.text}}</p>
<a i18n *ngIf="item.url" [href]="item.url" target="_blank">了解更多</a> <a i18n *ngIf="item.url" [href]="item.url" target="_blank">了解更多</a>
</div> </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> </div>
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
</div> </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--> <!--安装modal-->
<div class="modal fade" id="install-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" *ngIf="installOption"> <div class="modal fade" id="install-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" *ngIf="installOption">
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
<div class="form-group"> <div class="form-group">
<select class="form-control" name="installPath" (change)="selectLibrary()" [(ngModel)]="installOption.installLibrary" title="path"> <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 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> </select></div>
<h4 i18n>快捷方式</h4> <h4 i18n>快捷方式</h4>
<div class="checkbox"> <div class="checkbox">
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
<div class="form-group"> <div class="form-group">
<select class="form-control" name="installPath" (change)="selectLibrary()" [(ngModel)]="installOption.installLibrary" title="path"> <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 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> </select>
</div> </div>
<!--<h4 i18n>快捷方式</h4>--> <!--<h4 i18n>快捷方式</h4>-->
...@@ -346,7 +346,7 @@ ...@@ -346,7 +346,7 @@
<div class="modal-body"> <div class="modal-body">
订单已经创建,请在新窗口中进行支付,支付成功后页面会自动跳转 订单已经创建,请在新窗口中进行支付,支付成功后页面会自动跳转
若支付成功后没有自动跳转 请联系 thdod@mycard.moe 若支付成功后没有自动跳转 请联系 admin@moecube.com
若支付失败,请返回并选择其他支付方式 若支付失败,请返回并选择其他支付方式
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
......
...@@ -168,7 +168,7 @@ export class AppDetailComponent implements OnInit, OnChanges { ...@@ -168,7 +168,7 @@ export class AppDetailComponent implements OnInit, OnChanges {
async selectLibrary() { async selectLibrary() {
if (this.installOption.installLibrary.startsWith('create_')) { if (this.installOption.installLibrary.startsWith('create_')) {
let volume = this.installOption.installLibrary.slice(7); let volume = this.installOption.installLibrary.slice(7);
let library = path.join(volume, 'MyCardLibrary'); let library = path.join(volume, 'MoeCubeLibrary');
try { try {
await this.appsService.createDirectory(library); await this.appsService.createDirectory(library);
this.installOption.installLibrary = library; this.installOption.installLibrary = library;
......
...@@ -83,30 +83,30 @@ export class App { ...@@ -83,30 +83,30 @@ export class App {
static downloadUrl(app: App, platform: string, locale: string): string { static downloadUrl(app: App, platform: string, locale: string): string {
if (app.id === 'ygopro') { 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') { } 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 { static checksumUrl(app: App, platform: string, locale: string): string {
if (app.id === 'ygopro') { 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') { } 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 { static updateUrl(app: App, platform: string, locale: string): string {
if (app.id === 'ygopro') { 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') { } 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 { isBought(): Boolean {
......
...@@ -80,8 +80,8 @@ export class AppsService { ...@@ -80,8 +80,8 @@ export class AppsService {
} }
async loadApps() { async loadApps() {
let appsURL = 'https://api.mycard.moe/apps.json'; let appsURL = 'https://api.moecube.com/apps.json';
let keysURL = 'https://api.mycard.moe/keys'; let keysURL = 'https://api.moecube.com/keys';
try { try {
let params = new URLSearchParams(); let params = new URLSearchParams();
params.set('user_id', this.loginService.user.email); params.set('user_id', this.loginService.user.email);
...@@ -116,7 +116,7 @@ export class AppsService { ...@@ -116,7 +116,7 @@ export class AppsService {
async bundle() { async bundle() {
try { 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 { ...@@ -124,48 +124,48 @@ export class AppsService {
// "createShortcut": false, // "createShortcut": false,
// "createDesktopShortcut": false, // "createDesktopShortcut": false,
// "install": true, // "install": true,
// "installDir": "D:\\MyCardLibrary\\apps\\th105", // "installDir": "D:\\MoeCubeLibrary\\apps\\th105",
// "installLibrary": "D:\\MyCardLibrary" // "installLibrary": "D:\\MoeCubeLibrary"
// }, // },
// { // {
// "app": "th105-lang-zh-CN", // "app": "th105-lang-zh-CN",
// "createShortcut": false, // "createShortcut": false,
// "createDesktopShortcut": false, // "createDesktopShortcut": false,
// "install": true, // "install": true,
// "installDir": "D:\\MyCardLibrary\\apps\\th105", // "installDir": "D:\\MoeCubeLibrary\\apps\\th105",
// "installLibrary": "D:\\MyCardLibrary" // "installLibrary": "D:\\MoeCubeLibrary"
// }, // },
// { // {
// "app": "th123", // "app": "th123",
// "createShortcut": false, // "createShortcut": false,
// "createDesktopShortcut": true, // "createDesktopShortcut": true,
// "install": true, // "install": true,
// "installDir": "D:\\MyCardLibrary\\apps\\th123", // "installDir": "D:\\MoeCubeLibrary\\apps\\th123",
// "installLibrary": "D:\\MyCardLibrary" // "installLibrary": "D:\\MoeCubeLibrary"
// }, // },
// { // {
// "app": "th123-lang-zh-CN", // "app": "th123-lang-zh-CN",
// "createShortcut": false, // "createShortcut": false,
// "createDesktopShortcut": false, // "createDesktopShortcut": false,
// "install": true, // "install": true,
// "installDir": "D:\\MyCardLibrary\\apps\\th123", // "installDir": "D:\\MoeCubeLibrary\\apps\\th123",
// "installLibrary": "D:\\MyCardLibrary" // "installLibrary": "D:\\MoeCubeLibrary"
// }, // },
// { // {
// "app": "directx", // "app": "directx",
// "createShortcut": false, // "createShortcut": false,
// "createDesktopShortcut": false, // "createDesktopShortcut": false,
// "install": true, // "install": true,
// "installDir": "D:\\MyCardLibrary\\apps\\directx", // "installDir": "D:\\MoeCubeLibrary\\apps\\directx",
// "installLibrary": "D:\\MyCardLibrary" // "installLibrary": "D:\\MoeCubeLibrary"
// }, // },
// ] // ]
// { // {
// library: "D:\\MyCardLibrary", // library: "D:\\MoeCubeLibrary",
// apps: ["th105", "th105-lang-zh-CN", "th123", "th123-lang-zh-CN", "directx"] // 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 // TODO: 安装那些app,不需要下载。安装成功后删除 bundle.json
} catch (error) { } catch (error) {
...@@ -195,7 +195,7 @@ export class AppsService { ...@@ -195,7 +195,7 @@ export class AppsService {
} }
if (!library) { if (!library) {
try { try {
let _library = path.join(volume + ':', 'MyCardLibrary'); let _library = path.join(volume + ':', 'MoeCubeLibrary');
await this.createDirectory(_library); await this.createDirectory(_library);
this.settingsService.addLibrary(_library, true); this.settingsService.addLibrary(_library, true);
library = _library; library = _library;
...@@ -219,7 +219,7 @@ export class AppsService { ...@@ -219,7 +219,7 @@ export class AppsService {
let libraries = this.settingsService.getLibraries(); let libraries = this.settingsService.getLibraries();
for (let library of libraries) { for (let library of libraries) {
if (library.path === path.join(remote.app.getPath('appData'), 'library')) { 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)); localStorage.setItem(SettingsService.SETTING_LIBRARY, JSON.stringify(libraries));
......
...@@ -228,7 +228,7 @@ export class CandyComponent implements OnInit, OnChanges { ...@@ -228,7 +228,7 @@ export class CandyComponent implements OnInit, OnChanges {
ngOnInit() { 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.password = this.loginService.user.external_id.toString();
this.nickname = this.loginService.user.username; this.nickname = this.loginService.user.username;
...@@ -262,11 +262,11 @@ export class CandyComponent implements OnInit, OnChanges { ...@@ -262,11 +262,11 @@ export class CandyComponent implements OnInit, OnChanges {
</form> </form>
`; `;
Candy.init('wss://chat.mycard.moe:5280/websocket', { Candy.init('wss://chat.moecube.com:5280/websocket', {
core: { core: {
debug: false, debug: false,
autojoin: this.currentApp.conference && [this.currentApp.conference + '@conference.mycard.moe'], autojoin: this.currentApp.conference && [this.currentApp.conference + '@conference.moecube.com'],
resource: 'mycard-' + Math.random().toString().split('.')[1] resource: 'moecube-' + Math.random().toString().split('.')[1]
}, },
view: { view: {
assets: 'node_modules/candy/res/', assets: 'node_modules/candy/res/',
...@@ -309,7 +309,7 @@ export class CandyComponent implements OnInit, OnChanges { ...@@ -309,7 +309,7 @@ export class CandyComponent implements OnInit, OnChanges {
if (!conference) { if (!conference) {
return; return;
} }
conference += '@conference.mycard.moe'; conference += '@conference.moecube.com';
try { try {
if (Candy.View.Pane.Chat.rooms[conference]) { if (Candy.View.Pane.Chat.rooms[conference]) {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<span i18n *ngIf="grouped_apps.installed">已安装</span> <span i18n *ngIf="grouped_apps.installed">已安装</span>
<ul *ngIf="grouped_apps.installed" class="nav nav-pills flex-column"> <ul *ngIf="grouped_apps.installed" class="nav nav-pills flex-column">
<li *ngFor="let app of grouped_apps.installed" class="nav-item"> <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"> <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> {{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"> <div *ngIf="!app.isReady() && app.status.total" class="progress">
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<span *ngIf="grouped_apps.test">测试</span> <span *ngIf="grouped_apps.test">测试</span>
<ul *ngIf="grouped_apps.test" class="nav nav-pills flex-column"> <ul *ngIf="grouped_apps.test" class="nav nav-pills flex-column">
<li *ngFor="let app of grouped_apps.test" class="nav-item"> <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"> <img *ngIf="app.icon" class="icon" [src]="app.icon">
{{app.name}} {{app.name}}
</a> </a>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<span i18n *ngIf="grouped_apps.recommend">推荐</span> <span i18n *ngIf="grouped_apps.recommend">推荐</span>
<ul *ngIf="grouped_apps.recommend" class="nav nav-pills flex-column"> <ul *ngIf="grouped_apps.recommend" class="nav nav-pills flex-column">
<li *ngFor="let app of grouped_apps.recommend" class="nav-item"> <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"> <img *ngIf="app.icon" class="icon" [src]="app.icon">
{{app.name}} {{app.name}}
</a> </a>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<span i18n *ngIf="grouped_apps.mysterious">迷之物体</span> <span i18n *ngIf="grouped_apps.mysterious">迷之物体</span>
<ul *ngIf="grouped_apps.mysterious" class="nav nav-pills flex-column"> <ul *ngIf="grouped_apps.mysterious" class="nav nav-pills flex-column">
<li *ngFor="let app of grouped_apps.mysterious" class="nav-item"> <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"> <img *ngIf="app.icon" class="icon" [src]="app.icon">
{{app.name}} {{app.name}}
</a> </a>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<span i18n *ngIf="grouped_apps.touhou">东方 Project</span> <span i18n *ngIf="grouped_apps.touhou">东方 Project</span>
<ul *ngIf="grouped_apps.touhou" class="nav nav-pills flex-column"> <ul *ngIf="grouped_apps.touhou" class="nav nav-pills flex-column">
<li *ngFor="let app of grouped_apps.touhou" class="nav-item"> <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"> <img *ngIf="app.icon" class="icon" [src]="app.icon">
{{app.name}} {{app.name}}
</a> </a>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<span i18n *ngIf="grouped_apps.touhou_pc98">东方旧作</span> <span i18n *ngIf="grouped_apps.touhou_pc98">东方旧作</span>
<ul *ngIf="grouped_apps.touhou_pc98" class="nav nav-pills flex-column"> <ul *ngIf="grouped_apps.touhou_pc98" class="nav nav-pills flex-column">
<li *ngFor="let app of grouped_apps.touhou_pc98" class="nav-item"> <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"> <img *ngIf="app.icon" class="icon" [src]="app.icon">
{{app.name}} {{app.name}}
</a> </a>
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<span i18n *ngIf="grouped_apps.runtime_installed">已安装的运行库</span> <span i18n *ngIf="grouped_apps.runtime_installed">已安装的运行库</span>
<ul *ngIf="grouped_apps.runtime_installed" class="nav nav-pills flex-column"> <ul *ngIf="grouped_apps.runtime_installed" class="nav nav-pills flex-column">
<li *ngFor="let app of grouped_apps.runtime_installed" class="nav-item"> <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"> <img *ngIf="app.icon" class="icon" [src]="app.icon">
{{app.name}} {{app.name}}
</a> </a>
......
...@@ -59,7 +59,7 @@ export class LobbyComponent implements OnInit { ...@@ -59,7 +59,7 @@ export class LobbyComponent implements OnInit {
} }
this.ref.detectChanges(); 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']; let params: URLSearchParams = url['searchParams'];
params.set('user_id', this.loginService.user.email); params.set('user_id', this.loginService.user.email);
this.messages = new ReconnectingWebSocket(url); this.messages = new ReconnectingWebSocket(url);
......
...@@ -17,7 +17,7 @@ declare const URLSearchParams: any; ...@@ -17,7 +17,7 @@ declare const URLSearchParams: any;
}) })
export class LoginComponent { export class LoginComponent {
url: string; 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) { constructor(private loginService: LoginService) {
...@@ -38,13 +38,13 @@ export class LoginComponent { ...@@ -38,13 +38,13 @@ export class LoginComponent {
// params.set('redirect', this.url); // params.set('redirect', this.url);
// 暂时 hack 一下登出,因为聊天室现在没办法重新初始化,于是登出后刷新页面。 // 暂时 hack 一下登出,因为聊天室现在没办法重新初始化,于是登出后刷新页面。
params.set('redirect', 'https://mycard.moe/logout_callback'); params.set('redirect', 'https://moecube.com/logout_callback');
this.url = url.toString(); this.url = url.toString();
} }
} }
return_sso(return_url: string) { return_sso(return_url: string) {
if (return_url === 'https://mycard.moe/logout_callback') { if (return_url === 'https://moecube.com/logout_callback') {
return location.reload(); return location.reload();
} }
if (!return_url.startsWith(this.return_sso_url)) { if (!return_url.startsWith(this.return_sso_url)) {
......
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {getTranslationProviders} from './i18n-providers'; import {getTranslationProviders} from './i18n-providers';
import {MyCard} from './mycard.module'; import {MoeCube} from './moecube.module';
getTranslationProviders().then(providers => { getTranslationProviders().then(providers => {
const options = {providers}; const options = {providers};
platformBrowserDynamic().bootstrapModule(MyCard, options); platformBrowserDynamic().bootstrapModule(MoeCube, options);
}); });
...@@ -9,12 +9,12 @@ const autoUpdater: Electron.AutoUpdater = remote.getGlobal('autoUpdater'); ...@@ -9,12 +9,12 @@ const autoUpdater: Electron.AutoUpdater = remote.getGlobal('autoUpdater');
@Component({ @Component({
moduleId: module.id, moduleId: module.id,
selector: 'mycard', selector: 'moecube',
templateUrl: 'mycard.component.html', templateUrl: 'moecube.component.html',
styleUrls: ['mycard.component.css'], styleUrls: ['moecube.component.css'],
}) })
export class MyCardComponent implements OnInit { export class MoeCubeComponent implements OnInit {
currentPage: string = 'lobby'; currentPage: string = 'lobby';
update_status: string | undefined = remote.getGlobal('update_status'); update_status: string | undefined = remote.getGlobal('update_status');
......
...@@ -2,7 +2,7 @@ import {NgModule, NO_ERRORS_SCHEMA, LOCALE_ID} from '@angular/core'; ...@@ -2,7 +2,7 @@ import {NgModule, NO_ERRORS_SCHEMA, LOCALE_ID} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser'; import {BrowserModule} from '@angular/platform-browser';
import {FormsModule, ReactiveFormsModule} from '@angular/forms'; import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {HttpModule} from '@angular/http'; import {HttpModule} from '@angular/http';
import {MyCardComponent} from './mycard.component'; import {MoeCubeComponent} from './moecube.component';
import {LoginComponent} from './login.component'; import {LoginComponent} from './login.component';
import {StoreComponent} from './store.component'; import {StoreComponent} from './store.component';
import {LobbyComponent} from './lobby.component'; import {LobbyComponent} from './lobby.component';
...@@ -19,10 +19,10 @@ import {CandyComponent} from './candy.component'; ...@@ -19,10 +19,10 @@ import {CandyComponent} from './candy.component';
@NgModule({ @NgModule({
imports: [BrowserModule, FormsModule, ReactiveFormsModule, HttpModule], imports: [BrowserModule, FormsModule, ReactiveFormsModule, HttpModule],
declarations: [ declarations: [
MyCardComponent, LoginComponent, StoreComponent, LobbyComponent, MoeCubeComponent, LoginComponent, StoreComponent, LobbyComponent,
AppDetailComponent, RosterComponent, YGOProComponent, AboutComponent, CandyComponent AppDetailComponent, RosterComponent, YGOProComponent, AboutComponent, CandyComponent
], ],
bootstrap: [MyCardComponent], bootstrap: [MoeCubeComponent],
providers: [ providers: [
AppsService, SettingsService, LoginService, DownloadService AppsService, SettingsService, LoginService, DownloadService
, { , {
...@@ -33,5 +33,5 @@ import {CandyComponent} from './candy.component'; ...@@ -33,5 +33,5 @@ import {CandyComponent} from './candy.component';
], ],
schemas: [NO_ERRORS_SCHEMA] schemas: [NO_ERRORS_SCHEMA]
}) })
export class MyCard { export class MoeCube {
} }
...@@ -17,7 +17,7 @@ export class SettingsService { ...@@ -17,7 +17,7 @@ export class SettingsService {
static defaultLibraries = [ static defaultLibraries = [
{ {
'default': true, 'default': true,
path: path.join(remote.app.getPath('appData'), 'MyCardLibrary') path: path.join(remote.app.getPath('appData'), 'MoeCubeLibrary')
}, },
]; ];
static SETTING_LOCALE = 'locale'; static SETTING_LOCALE = 'locale';
......
...@@ -207,14 +207,14 @@ export class YGOProComponent implements OnInit, OnDestroy { ...@@ -207,14 +207,14 @@ export class YGOProComponent implements OnInit, OnDestroy {
if (this.settingsService.getLocale().startsWith('zh')) { if (this.settingsService.getLocale().startsWith('zh')) {
this.servers.push({ this.servers.push({
id: 'tiramisu', id: 'tiramisu',
url: 'wss://tiramisu.mycard.moe:7923', url: 'wss://tiramisu.moecube.com:7923',
address: '112.124.105.11', address: '112.124.105.11',
port: 7911, port: 7911,
custom: true, custom: true,
replay: true replay: true
}, { }, {
id: 'tiramisu-athletic', id: 'tiramisu-athletic',
url: 'wss://tiramisu.mycard.moe:8923', url: 'wss://tiramisu.moecube.com:8923',
address: '112.124.105.11', address: '112.124.105.11',
port: 8911, port: 8911,
custom: false, custom: false,
...@@ -223,14 +223,14 @@ export class YGOProComponent implements OnInit, OnDestroy { ...@@ -223,14 +223,14 @@ export class YGOProComponent implements OnInit, OnDestroy {
} else { } else {
this.servers.push({ this.servers.push({
id: 'mercury-us-1-athletic', 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', address: '104.237.154.173',
port: 7911, port: 7911,
custom: true, custom: true,
replay: true replay: true
}, { }, {
id: 'mercury-us-1', 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', address: '104.237.154.173',
port: 8911, port: 8911,
custom: false, custom: false,
...@@ -591,7 +591,7 @@ export class YGOProComponent implements OnInit, OnDestroy { ...@@ -591,7 +591,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
search.set('locale', this.settingsService.getLocale()); search.set('locale', this.settingsService.getLocale());
match_started_at = new Date(); match_started_at = new Date();
this.matching_arena = matching_arena = arena; 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, headers: headers,
search: search search: search
}).map(response => response.json()) }).map(response => response.json())
......
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>MyCard</title> <title>MoeCube</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
...@@ -29,12 +29,12 @@ ...@@ -29,12 +29,12 @@
<body> <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"> <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> <i class="fa fa-times close" i18n="" i18n-title="" title="关闭" onclick="window.close()"></i>
</div> </div>
...@@ -47,9 +47,9 @@ ...@@ -47,9 +47,9 @@
<span>.</span> <span>.</span>
</p> </p>
</div> </div>
<div id="failed" hidden>发生了错误,请复制以下错误信息并联系 support@mycard.moe</div> <div id="failed" hidden>发生了错误,请复制以下错误信息并联系 admin@moecube.com</div>
<pre id="error" hidden></pre> <pre id="error" hidden></pre>
</mycard> </moecube>
<script> <script>
document.body.classList.add(process.platform); document.body.classList.add(process.platform);
// document.getElementById('version').innerHTML = require('electron').remote.app.getVersion(); // document.getElementById('version').innerHTML = require('electron').remote.app.getVersion();
......
...@@ -63,7 +63,7 @@ if (!process.env['NODE_ENV']) { ...@@ -63,7 +63,7 @@ if (!process.env['NODE_ENV']) {
let updateWindow; let updateWindow;
global.autoUpdater = autoUpdater; global.autoUpdater = autoUpdater;
// if (process.env['NODE_ENV'] == 'production' && process.platform == 'darwin') { // 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{ // else{
// setTimeout(()=>{ // setTimeout(()=>{
...@@ -193,7 +193,7 @@ function createTray() { ...@@ -193,7 +193,7 @@ function createTray() {
label: '退出', type: 'normal', click: app.quit label: '退出', type: 'normal', click: app.quit
} }
]); ]);
tray.setToolTip('MyCard'); tray.setToolTip('MoeCube');
tray.setContextMenu(contextMenu); tray.setContextMenu(contextMenu);
} }
......
...@@ -567,8 +567,8 @@ ...@@ -567,8 +567,8 @@
</trans-unit> </trans-unit>
<trans-unit datatype="html" id="9d9335d175b40b85f2b98610af517a8b7509c089"> <trans-unit datatype="html" id="9d9335d175b40b85f2b98610af517a8b7509c089">
<source>MyCard 设置</source> <source>MoeCube 设置</source>
<target>MyCard Settings</target> <target>MoeCube Settings</target>
</trans-unit> </trans-unit>
<trans-unit datatype="html" id="b22ce2179c700e2499e1d402fb1d3f4392c7f6af"> <trans-unit datatype="html" id="b22ce2179c700e2499e1d402fb1d3f4392c7f6af">
......
...@@ -15,7 +15,7 @@ body { ...@@ -15,7 +15,7 @@ body {
/*padding-right: 0 !important;*/ /*padding-right: 0 !important;*/
/*}*/ /*}*/
mycard { moecube {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -94,7 +94,7 @@ body.resizing /deep/ * { ...@@ -94,7 +94,7 @@ body.resizing /deep/ * {
-webkit-user-select: none; -webkit-user-select: none;
} }
/*mycard {*/ /*moecube {*/
/*background-color: white;*/ /*background-color: white;*/
/*}*/ /*}*/
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
"skipLibCheck": true "skipLibCheck": true
}, },
"files": [ "files": [
"app/mycard.module.ts", "app/moecube.module.ts",
"app/main.ts" "app/main.ts"
], ],
"angularCompilerOptions": { "angularCompilerOptions": {
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<div class="container"> <div class="container">
<h1>{{pageText.updateTitle}}</h1> <h1>{{pageText.updateTitle}}</h1>
<p v-for="(msg, index) in pageText.updateMsg" >{{msg}}</p> <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"> <p id="actions">
<button @click="onClose" type="button" class="btn btn-secondary">{{pageText.actions.close}}</button> <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> <button @click="onUpdate" type="button" class="btn btn-primary">{{pageText.actions.update}}</button>
......
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