Commit f6780afd authored by 2breakegg's avatar 2breakegg

debug

parent 9b9f13f7
......@@ -2,7 +2,7 @@ import {Component, Renderer, ChangeDetectorRef, OnInit, ElementRef, ViewChild} f
import {remote, shell} from 'electron';
import {LoginService} from './login.service';
import {SettingsService} from './settings.sevices';
import * as $ from 'jquery';
import $ = require('jquery');
import 'bootstrap';
const autoUpdater: Electron.AutoUpdater = remote.getGlobal('autoUpdater');
......
......@@ -237,6 +237,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
replay: true
});
}
}
refresh_replay_rooms() {
......@@ -369,6 +370,11 @@ export class YGOProComponent implements OnInit, OnDestroy {
}
this.replay_connections = [];
});
remote.ipcMain.on('YGOPro', (e: any , type: string) => {
console.log('rrrrr')
this.request_match(type);
});
}
......@@ -518,6 +524,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
let exp_rank_ex: number;
let arena_rank_ex: number;
let win = remote.getCurrentWindow();
win.minimize();
await new Promise((resolve, reject) => {
let child = child_process.spawn(path.join(this.app.local!.path, this.app.actions.get('main')!.execute), args, {
......@@ -709,6 +716,8 @@ export class YGOProComponent implements OnInit, OnDestroy {
clearInterval(this.match_interval);
this.match_interval = undefined;
}
remote.ipcMain.removeAllListeners('YGOPro');
}
refresh_match() {
......
......@@ -5,8 +5,6 @@ import * as $ from 'jquery';
let data_url = (new URL(document.location.toString())).searchParams;
let data_str = data_url.get('data');
console.log(data_str);
// {
// "usernamea": "Joe1991",
// "usernameb": "zh99998",
......@@ -137,6 +135,8 @@ $('#rewards').append(tr_rewards);
function again() {
let {ipcRenderer} = require('electron');
ipcRenderer.send('YGOPro', data.type);
window.opener=null;
window.close();
}
let t = setTimeout(function () {
window.opener = null;
......
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