Files
koodo-reader/main.ts
troyeguo a745816251 fix bug
Former-commit-id: 37e9d9c373606c4546ee1ceea0aa211d970a0d6c
2020-07-18 12:08:04 +08:00

26 lines
621 B
TypeScript

const { app, BrowserWindow, dialog, shell, remote } = require("electron");
const isDev = require("electron-is-dev");
const path = require("path");
let mainWindow;
app.on("ready", () => {
// console.log("before message box");
mainWindow = new BrowserWindow({
width: 1024,
height: 660,
webPreferences: {
nodeIntegration: false,
},
});
if (!isDev) {
const { Menu } = require("electron");
Menu.setApplicationMenu(null);
}
const urlLocation = isDev
? "http://localhost:3000/"
: `file://${path.join(__dirname, "./build/index.html")}`;
mainWindow.loadURL(urlLocation);
});