Commit a6a5a285 authored by 神楽坂玲奈's avatar 神楽坂玲奈

Revert "Sentry"

This reverts commit b4e4756c.
parent b4e4756c
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"name": "mycard-mobile", "name": "mycard-mobile",
"version": "1.0.20", "version": "1.0.19",
"license": "UNLISENCED", "license": "UNLISENCED",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
"hammerjs": "^2.0.8", "hammerjs": "^2.0.8",
"lodash": "^4.17.10", "lodash": "^4.17.10",
"material-design-icons": "^3.0.1", "material-design-icons": "^3.0.1",
"raven-js": "^3.26.2",
"rxjs": "^5.5.10", "rxjs": "^5.5.10",
"webdav": "^1.5.2", "webdav": "^1.5.2",
"zone.js": "^0.8.26" "zone.js": "^0.8.26"
......
import { ErrorHandler, NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpModule, JsonpModule } from '@angular/http'; import { HttpModule, JsonpModule } from '@angular/http';
import { import {
...@@ -23,7 +23,6 @@ import { BrowserModule } from '@angular/platform-browser'; ...@@ -23,7 +23,6 @@ import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import 'hammerjs'; import 'hammerjs';
import 'rxjs/Rx'; import 'rxjs/Rx';
import * as Raven from 'raven-js';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
...@@ -38,14 +37,6 @@ import { WatchComponent } from './watch/watch.component'; ...@@ -38,14 +37,6 @@ import { WatchComponent } from './watch/watch.component';
import { WindbotComponent } from './windbot/windbot.component'; import { WindbotComponent } from './windbot/windbot.component';
import { YGOProService } from './ygopro.service'; import { YGOProService } from './ygopro.service';
Raven.config('https://a43997ca0d3a4aee8640ab90af35144b@sentry.io/1227659').install();
export class RavenErrorHandler implements ErrorHandler {
handleError(err: any): void {
Raven.captureException(err);
}
}
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent, AppComponent,
...@@ -83,7 +74,7 @@ export class RavenErrorHandler implements ErrorHandler { ...@@ -83,7 +74,7 @@ export class RavenErrorHandler implements ErrorHandler {
MatMenuModule, MatMenuModule,
MatProgressSpinnerModule MatProgressSpinnerModule
], ],
providers: [YGOProService, StorageService, { provide: ErrorHandler, useClass: RavenErrorHandler }], providers: [YGOProService, StorageService],
bootstrap: [AppComponent], bootstrap: [AppComponent],
entryComponents: [MatchDialogComponent, ResultDialogComponent] entryComponents: [MatchDialogComponent, ResultDialogComponent]
}) })
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</button> </button>
<mat-menu #menu="matMenu"> <mat-menu #menu="matMenu">
<a [href]="login.logout()" mat-menu-item>切换用户</a> <a [href]="login.logout()" mat-menu-item>切换用户</a>
<button mat-menu-item (click)="error()">大厅版本 {{version}}</button> <button mat-menu-item>大厅版本 {{version}}</button>
<button mat-menu-item *ngIf="build">应用版本 {{build.version_name}}</button> <button mat-menu-item *ngIf="build">应用版本 {{build.version_name}}</button>
</mat-menu> </mat-menu>
</mat-toolbar> </mat-toolbar>
......
...@@ -14,31 +14,28 @@ import { YGOProService } from '../ygopro.service'; ...@@ -14,31 +14,28 @@ import { YGOProService } from '../ygopro.service';
animations: [routerTransition2] animations: [routerTransition2]
}) })
export class LobbyComponent { export class LobbyComponent {
@HostBinding('@routerTransition2') animation: '';
@HostBinding('@routerTransition2')
animation: '';
version = environment.version; version = environment.version;
build: BuildConfig; build: BuildConfig;
searchCtrl = new FormControl(); searchCtrl = new FormControl();
suggestion = this.searchCtrl.valueChanges.filter(name => name).flatMap(name => suggestion = this.searchCtrl.valueChanges.filter(name => name).flatMap(name => this.jsonp.get('http://www.ourocg.cn/Suggest.aspx', {
this.jsonp params: {callback: 'JSONP_CALLBACK', key: name}
.get('http://www.ourocg.cn/Suggest.aspx', { }).map(response => response.json().result));
params: { callback: 'JSONP_CALLBACK', key: name }
})
.map(response => response.json().result)
);
key: string; key: string;
arena_url: string; arena_url: string;
constructor( constructor(public login: LoginService,
public login: LoginService, public ygopro: YGOProService,
public ygopro: YGOProService, private http: Http,
private http: Http, private jsonp: Jsonp,
private jsonp: Jsonp, public storage: StorageService) {
public storage: StorageService
) {
const arena_url = new URL('https://mycard.moe/ygopro/arena'); const arena_url = new URL('https://mycard.moe/ygopro/arena');
arena_url.searchParams.set('sso', login.token); arena_url.searchParams.set('sso', login.token);
this.arena_url = arena_url.toString(); this.arena_url = arena_url.toString();
...@@ -58,10 +55,6 @@ export class LobbyComponent { ...@@ -58,10 +55,6 @@ export class LobbyComponent {
url.searchParams.set('key', key); url.searchParams.set('key', key);
open(url.toString()); open(url.toString());
} }
error() {
throw new Error('Sentry test');
}
} }
interface BuildConfig { interface BuildConfig {
......
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