imporve formatting main.js
This commit is contained in:
parent
8e47bb13c6
commit
8ba26af235
|
@ -21,7 +21,7 @@ function createWindow() {
|
|||
const appImgPath = isDev
|
||||
? 'build/window-icon.png'
|
||||
: path.join(process.resourcesPath, 'window-icon.png');
|
||||
let appIcon = nativeImage.createFromPath(appImgPath);
|
||||
const appIcon = nativeImage.createFromPath(appImgPath);
|
||||
// Create the browser window.
|
||||
const mainWindow = new BrowserWindow({
|
||||
height: 600,
|
||||
|
@ -93,14 +93,14 @@ app.on('ready', () => {
|
|||
const trayImgPath = isDev
|
||||
? 'build/taskbar-icon.png'
|
||||
: path.join(process.resourcesPath, 'taskbar-icon.png');
|
||||
let trayIcon = nativeImage.createFromPath(trayImgPath);
|
||||
const trayIcon = nativeImage.createFromPath(trayImgPath);
|
||||
tray = new Tray(trayIcon);
|
||||
tray.setToolTip('ente');
|
||||
tray.setContextMenu(buildContextMenu());
|
||||
});
|
||||
|
||||
ipcMain.on('select-dir', async (event) => {
|
||||
let dialogWindow = new BrowserWindow({
|
||||
const dialogWindow = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
|
@ -131,7 +131,7 @@ ipcMain.on('send-notification', (event, args) => {
|
|||
new Notification(notification).show();
|
||||
});
|
||||
ipcMain.on('reload-window', (event, args) => {
|
||||
let secondWindow = createWindow();
|
||||
const secondWindow = createWindow();
|
||||
mainWindow.destroy();
|
||||
mainWindow = secondWindow;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue