mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2025-01-09 00:21:10 +00:00
Implement Electron Window State Manager
This commit is contained in:
parent
c5a76ade59
commit
9ac18e071e
@ -4,6 +4,7 @@
|
||||
"description": "Placeholder for the nativefier cli to override with a target url",
|
||||
"main": "lib/main.js",
|
||||
"dependencies": {
|
||||
"electron-window-state": "^2.0.0",
|
||||
"wurl": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {},
|
||||
|
@ -8,7 +8,7 @@ var electron = require('electron');
|
||||
var createMainWindow = require('./components/mainWindow/mainWindow');
|
||||
var createLoginWindow = require('./components/login/loginWindow');
|
||||
var helpers = require('./helpers/helpers');
|
||||
|
||||
var windowStateKeeper = require('electron-window-state');
|
||||
var app = electron.app;
|
||||
var ipcMain = electron.ipcMain;
|
||||
var isOSX = helpers.isOSX;
|
||||
@ -47,7 +47,12 @@ app.on('before-quit', function () {
|
||||
});
|
||||
|
||||
app.on('ready', function () {
|
||||
var mainWindowState = windowStateKeeper({
|
||||
defaultWidth: appArgs.width || 1280,
|
||||
defaultHeight: appArgs.height || 800
|
||||
});
|
||||
mainWindow = createMainWindow(appArgs, app.quit, app.dock.setBadge);
|
||||
mainWindowState.manage(mainWindow);
|
||||
});
|
||||
|
||||
app.on('login', function(event, webContents, request, authInfo, callback) {
|
||||
|
Loading…
Reference in New Issue
Block a user