-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
24 lines (21 loc) · 882 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const electron = require('electron');
const {app, BrowserWindow} = electron;
var app_state = {};
app.on('ready', () => {
app_state.main_win = app_state.main_win || new BrowserWindow({width:800, height: 600});
app_state.main_win.setMenu(null);
app_state.main_win.loadURL(`file://${__dirname}/public/html/login.html`);
//app_state.main_win.webContents.openDevTools();
});
exports.openPasswordWindow = ()=> {
let win = new BrowserWindow({width:400, height: 200});
win.setMenu(null);
win.loadURL(`file://${__dirname}/public/html/password.html`);
//win.webContents.openDevTools();
}
exports.authenticate = (password) => {
app_state.main_win = app_state.main_win || new BrowserWindow({width:800, height: 600});
app_state.main_win.setMenu(null);
app_state.main_win.loadURL(`file://${__dirname}/public/html/passwords.html`);
//app_state.main_win.webContents.openDevTools();
}