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

fix

parent 6a33d0bc
......@@ -10,10 +10,10 @@ import {remote} from "electron";
import "rxjs/Rx";
import {AppLocal} from "./app-local";
import * as ini from "ini";
import Timer = NodeJS.Timer;
import {DownloadService} from "./download.service";
import {InstallOption} from "./install-option";
import {InstallService} from "./install.service";
import Timer = NodeJS.Timer;
const Aria2 = require('aria2');
const sudo = require('electron-sudo');
......@@ -145,8 +145,8 @@ export class AppsService {
let currentUnit = Math.floor(Math.log(currentSpeed) / Math.log(1024));
console.log(currentSpeed, currentUnit);
app.status.progressMessage = (currentSpeed / 1024 ** currentUnit).toFixed(1) + " " + speedUnit[currentUnit];
}else{
app.status.progressMessage='';
} else {
app.status.progressMessage = '';
}
this.ref.tick();
}, (error) => {
......@@ -358,7 +358,7 @@ export class AppsService {
// 如果还是在界面上显示的那个连接
if (this.connections.get(app) == connection) {
this.connections.delete(app);
if (event.code != 1000 && !(<Connection>connection).address) {
if (event.code != 1000 && !connection!.address) {
alert(`出错了 ${event.code}`);
}
}
......
......@@ -261,9 +261,12 @@ export class YGOProComponent implements OnInit {
start_game(args: string[]) {
let win = remote.getCurrentWindow();
win.minimize();
console.log(path.join((<AppLocal>this.app.local).path, (<any>this.app.actions.get('main')).execute), args, {cwd: (<AppLocal>this.app.local).path});
console.log(path.join(this.app.local!.path, this.app.actions.get('main')!.execute), args, {cwd: this.app.local!.path});
return new Promise((resolve, reject) => {
let child = child_process.spawn(path.join((<AppLocal>this.app.local).path, (<any>this.app.actions.get('main')).execute), args, {cwd: (<AppLocal>this.app.local).path});
let child = child_process.spawn(path.join(this.app.local!.path, this.app.actions.get('main')!.execute), args, {
cwd: this.app.local!.path,
stdio: 'inherit'
});
child.on('error', (error) => {
reject(error);
win.restore()
......
......@@ -1411,8 +1411,7 @@
"directx"
],
"darwin": [
"wine",
"directx"
"wine"
]
},
"references": {
......
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