mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
refactor main-app process
clean unnecessary codes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const electron = require('electron')
|
||||
const { app } = electron
|
||||
const BrowserWindow = electron.BrowserWindow
|
||||
const Menu = electron.Menu
|
||||
const MenuItem = electron.MenuItem
|
||||
@@ -44,7 +45,7 @@ finderWindow.on('close', function (e) {
|
||||
})
|
||||
|
||||
var appIcon = new Tray(path.join(__dirname, '../resources/tray-icon.png'))
|
||||
appIcon.setToolTip('Boost')
|
||||
appIcon.setToolTip('Boostnote')
|
||||
|
||||
var trayMenu = new Menu()
|
||||
trayMenu.append(new MenuItem({
|
||||
@@ -84,4 +85,9 @@ function hideFinder () {
|
||||
}
|
||||
finderWindow.hide()
|
||||
}
|
||||
|
||||
app.on('before-quit', function (e) {
|
||||
finderWindow.removeAllListeners()
|
||||
})
|
||||
|
||||
module.exports = finderWindow
|
||||
|
||||
Reference in New Issue
Block a user