kms electron
This commit is contained in:
11
main.js
11
main.js
@@ -1,5 +1,5 @@
|
||||
// Modules to control application life and create native browser window
|
||||
const { app, BrowserWindow, Menu } = require("electron");
|
||||
const { app, BrowserWindow, Menu, ipcMain } = require("electron");
|
||||
const path = require("path");
|
||||
const serve = require("electron-serve");
|
||||
const loadURL = serve({ directory: "public" });
|
||||
@@ -15,6 +15,13 @@ function isDev() {
|
||||
return !app.isPackaged;
|
||||
}
|
||||
|
||||
function registerIPCPipes() {
|
||||
ipcMain.handle("ezpplauncher:login", (e, args) => {
|
||||
console.log(args);
|
||||
return "yes";
|
||||
});
|
||||
}
|
||||
|
||||
function createWindow() {
|
||||
setupTitlebar();
|
||||
|
||||
@@ -50,6 +57,8 @@ function createWindow() {
|
||||
loadURL(mainWindow);
|
||||
}
|
||||
|
||||
registerIPCPipes();
|
||||
|
||||
// Uncomment the following line of code when app is ready to be packaged.
|
||||
// loadURL(mainWindow);
|
||||
|
||||
|
Reference in New Issue
Block a user