Merge branch 'master' into release/v1.1.0
This commit is contained in:
commit
e326ee394c
12
src/main.js
12
src/main.js
|
@ -50,6 +50,18 @@ var mainWindow = null;
|
||||||
var trayIcon = null;
|
var trayIcon = null;
|
||||||
var willAppQuit = false;
|
var willAppQuit = false;
|
||||||
|
|
||||||
|
app.on('login', function(event, webContents, request, authInfo, callback) {
|
||||||
|
event.preventDefault();
|
||||||
|
var readlineSync = require('readline-sync');
|
||||||
|
console.log("HTTP basic auth requiring login, please provide login data.");
|
||||||
|
var username = readlineSync.question('Username: ');
|
||||||
|
var password = readlineSync.question('Password: ', {
|
||||||
|
hideEchoBack: true
|
||||||
|
});
|
||||||
|
console.log("Replacing default auth behaviour.");
|
||||||
|
callback(username, password);
|
||||||
|
});
|
||||||
|
|
||||||
// Quit when all windows are closed.
|
// Quit when all windows are closed.
|
||||||
app.on('window-all-closed', function() {
|
app.on('window-all-closed', function() {
|
||||||
// On OS X it is common for applications and their menu bar
|
// On OS X it is common for applications and their menu bar
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
"react": "^0.14.3",
|
"react": "^0.14.3",
|
||||||
"react-bootstrap": "^0.28.1",
|
"react-bootstrap": "^0.28.1",
|
||||||
"react-dom": "^0.14.3",
|
"react-dom": "^0.14.3",
|
||||||
|
"readline-sync": "^1.4.1",
|
||||||
"yargs": "^3.31.0"
|
"yargs": "^3.31.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue