mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
refactor file structure
This commit is contained in:
29
lib/main-window.js
Normal file
29
lib/main-window.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const electron = require('electron')
|
||||
const app = electron.app
|
||||
const BrowserWindow = electron.BrowserWindow
|
||||
const path = require('path')
|
||||
|
||||
var mainWindow = new BrowserWindow({
|
||||
width: 1080,
|
||||
height: 720,
|
||||
'zoom-factor': 1.0,
|
||||
'web-preferences': {
|
||||
'overlay-scrollbars': true
|
||||
},
|
||||
'standard-window': false
|
||||
})
|
||||
|
||||
const url = path.resolve(__dirname, '../browser/main/index.html')
|
||||
|
||||
mainWindow.loadURL('file://' + url)
|
||||
|
||||
mainWindow.webContents.on('new-window', function (e) {
|
||||
e.preventDefault()
|
||||
})
|
||||
|
||||
app.on('activate', function () {
|
||||
if (mainWindow == null) return null
|
||||
mainWindow.show()
|
||||
})
|
||||
|
||||
module.exports = mainWindow
|
||||
Reference in New Issue
Block a user