main: add switches for choosing the app's address and fix the old ones
This commit is contained in:
parent
346c2a3904
commit
de6191eab9
3 changed files with 24 additions and 16 deletions
|
|
@ -1,7 +1,8 @@
|
|||
var path = require('path'),
|
||||
shortcut = require('electron-localshortcut'),
|
||||
{app, BrowserWindow, dialog} = require('electron'),
|
||||
settings = require('./settings')
|
||||
settings = require('./settings'),
|
||||
address = 'http://' + settings.read('address') || settings.read('appAddresses')[0]
|
||||
|
||||
dialog.showErrorBox = function(title,err) {
|
||||
console.log(title + ': ' + err)
|
||||
|
|
@ -24,7 +25,7 @@ app.on('ready',function(){
|
|||
backgroundColor:'#1a1d22'
|
||||
})
|
||||
|
||||
window.loadURL('http://127.0.0.1:' + settings.read('httpPort'))
|
||||
window.loadURL(address)
|
||||
|
||||
window.on('closed', function() {
|
||||
window = null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue