Remove: node in manager.js #86

This commit is contained in:
Cutls 2019-06-15 01:05:53 +09:00
parent 5672ccfa37
commit 861ee3250d
2 changed files with 8 additions and 16 deletions

View File

@ -310,15 +310,9 @@ function login(url) {
localStorage.setItem("client_secret", json["client_secret"]);
$("#auth").show();
$("#add").hide();
const {
shell
} = require('electron');
shell.openExternal(auth);
var electron = require("electron");
var ipc = electron.ipcRenderer;
postMessage(["openUrl", auth], "*")
if ($('#linux:checked').val() == "on") { } else {
ipc.send('quit', 'go');
postMessage(["sendSinmpleIpc", "quit"], "*")
}
}
}
@ -407,16 +401,13 @@ function misskeyAuth(url, mkc) {
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
const {
shell
} = require('electron');
var token = json.token;
$("#auth").show();
$("#code").val(token);
$("#add").hide();
$("#misskey").prop("checked", false);
localStorage.setItem("domain_tmp", url);
shell.openExternal(json.url);
postMessage(["openUrl", json.url], "*")
}
}
}

View File

@ -1,9 +1,10 @@
var electron = require("electron");
const shell = electron.shell;
var ipc = electron.ipcRenderer;
onmessage = function (e) {
if (e.data[0] == "openUrl") {
urls = url.match(/https?:\/\/(.+)/);
if(urls){
urls = e.data[1].match(/https?:\/\/(.+)/);
if (urls) {
shell.openExternal(e.data[1]);
}
} else if (e.data[0] == "sendSinmpleIpc") {
@ -15,10 +16,10 @@ onmessage = function (e) {
//version.js
ipc.send("getPlatform", "")
ipc.on('platform', function (event, arg) {
localStorage.setItem("platform",arg)
localStorage.setItem("platform", arg)
})
ipc.on('winstore', function (event, arg) {
localStorage.setItem("winstore",arg)
localStorage.setItem("winstore", arg)
})
ipc.on('reload', function (event, arg) {