Rename electron window
This commit is contained in:
parent
beb84ea9ef
commit
c190224113
1 changed files with 3 additions and 3 deletions
|
@ -31,7 +31,7 @@ const getAssetPath = (...paths) => path.join(RESOURCES_PATH, ...paths);
|
||||||
|
|
||||||
function createWindow() {
|
function createWindow() {
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
const win = new BrowserWindow({
|
const mainWindow = new BrowserWindow({
|
||||||
width: 620,
|
width: 620,
|
||||||
height: 350,
|
height: 350,
|
||||||
x: screenz.width - 620,
|
x: screenz.width - 620,
|
||||||
|
@ -54,7 +54,7 @@ function createWindow() {
|
||||||
tray.setTitle("hello world");
|
tray.setTitle("hello world");
|
||||||
|
|
||||||
// and load the index.html of the app.
|
// and load the index.html of the app.
|
||||||
win.loadURL(
|
mainWindow.loadURL(
|
||||||
isDev
|
isDev
|
||||||
? "http://localhost:8080"
|
? "http://localhost:8080"
|
||||||
: `file://${path.join(__dirname, "../build/index.html")}`,
|
: `file://${path.join(__dirname, "../build/index.html")}`,
|
||||||
|
@ -62,7 +62,7 @@ function createWindow() {
|
||||||
|
|
||||||
// Open the DevTools.
|
// Open the DevTools.
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
win.webContents.openDevTools({ mode: "detach" });
|
mainWindow.webContents.openDevTools({ mode: "detach" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue