Add: getPlatform #86
This commit is contained in:
parent
7f806bd155
commit
367f2f656e
|
@ -46,11 +46,9 @@ function verck(ver) {
|
|||
});
|
||||
}
|
||||
}
|
||||
var electron = require("electron");
|
||||
var remote = electron.remote;
|
||||
var dialog = remote.dialog;
|
||||
var platform = remote.process.platform;
|
||||
console.log("Your platform:" + remote.process.platform)
|
||||
var platform = localStorage.getItem("platform");
|
||||
console.log("Your platform:" + platform)
|
||||
if (platform == "win32") {
|
||||
const options = {
|
||||
type: 'info',
|
||||
|
|
|
@ -8,6 +8,10 @@ onmessage = function (e) {
|
|||
|
||||
}
|
||||
}
|
||||
ipc.send("getPlatform", "")
|
||||
ipc.on('platform', function (event, arg) {
|
||||
localStorage.setItem("platform",arg)
|
||||
})
|
||||
ipc.on('reload', function (event, arg) {
|
||||
location.reload();
|
||||
})
|
||||
|
|
|
@ -40,6 +40,10 @@ function system(mainWindow, dir, lang) {
|
|||
});
|
||||
}
|
||||
});
|
||||
//プラットフォーム
|
||||
ipc.on('getPlatform', function (e, arg) {
|
||||
mainWindow.webContents.send('platform', process.platform);
|
||||
})
|
||||
//言語
|
||||
ipc.on('lang', function (e, arg) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user