using env vars for some comfy defaults for development
This commit is contained in:
parent
4323156242
commit
6904e8eb26
@ -8,6 +8,10 @@ const cfg = require('./src/config.js')
|
||||
let win
|
||||
let config = cfg.get_config(cfg.load_parser())
|
||||
|
||||
// NOTE: this line is only here for demonstration as the current make script exposes this var
|
||||
// so that we can test against self signed certificates but still use ssl
|
||||
// process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = '0'
|
||||
|
||||
function createWin() {
|
||||
win = new BrowserWindow({
|
||||
width: 800,
|
||||
@ -23,7 +27,9 @@ function createWin() {
|
||||
|
||||
win.loadFile('pages/index.html');
|
||||
if(process.platform !== 'darwin') {
|
||||
win.removeMenu();
|
||||
if(!process.env('DEV_ENV')) {
|
||||
win.removeMenu()
|
||||
}
|
||||
}
|
||||
win.on('closed', () => {
|
||||
win = null
|
||||
|
@ -6,6 +6,9 @@
|
||||
[[ -z "$1" ]] && echo Options: run \| build && exit 0
|
||||
|
||||
run() {
|
||||
# Required to tests against the self certs we use in testing envs
|
||||
export NODE_TLS_REJECT_UNAUTHORIZED=0
|
||||
export DEV_ENV=true
|
||||
./node_modules/electron/dist/electron main.js $@
|
||||
}
|
||||
|
||||
|
@ -45,8 +45,8 @@ exports.build_server_list = function (config, dom_id) {
|
||||
'classList': ['btn', 'btn-outline-secondary', 'btn-nav-settings'],
|
||||
'textContent': server['name'],
|
||||
'type': 'button',
|
||||
'onClick': channels.get_channels(server)
|
||||
})
|
||||
child.addEventListener('click', () => channels.get_channels(server))
|
||||
|
||||
container.appendChild(child)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user