mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
add readme / add main.js for electron / add signin, register button
This commit is contained in:
27
main.js
Normal file
27
main.js
Normal file
@@ -0,0 +1,27 @@
|
||||
var app = require('app') // Module to control application life.
|
||||
var BrowserWindow = require('browser-window') // Module to create native browser window.
|
||||
|
||||
// Report crashes to our server.
|
||||
require('crash-reporter').start()
|
||||
|
||||
// Keep a global reference of the window object, if you don't, the window will
|
||||
// be closed automatically when the javascript object is GCed.
|
||||
var mainWindow = null
|
||||
|
||||
console.log(process.platform)
|
||||
// Quit when all windows are closed.
|
||||
app.on('window-all-closed', function () {
|
||||
if (process.platform !== 'darwin')
|
||||
app.quit()
|
||||
})
|
||||
app.on('ready', function () {
|
||||
mainWindow = new BrowserWindow({width: 800, height: 600})
|
||||
|
||||
mainWindow.loadUrl('file://' + __dirname + '/build/index.html')
|
||||
|
||||
mainWindow.openDevTools()
|
||||
|
||||
mainWindow.on('closed', function () {
|
||||
mainWindow = null
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user