diff --git a/gui/index.html b/gui/index.html index 6c932b0..9630b28 100644 --- a/gui/index.html +++ b/gui/index.html @@ -4,12 +4,7 @@ - + diff --git a/gui/init.js b/gui/init.js new file mode 100644 index 0000000..a36bbaa --- /dev/null +++ b/gui/init.js @@ -0,0 +1,45 @@ +$(document).ready(function() { + $('#pulse').jRoll({ + radius: 100, + animation: 'pulse' + }); + + var appConf = GetAppConf(); + const remote = require('electron').remote; + var window = remote.getCurrentWindow(); + + $('#loading_status_text').text('Starting Iguana daemon...'); + + if (appConf && !appConf.manualIguanaStart) { + StartIguana(); + } + + if (appConf && !appConf.skipBasiliskNetworkCheck) { + var portcheck; + + function sartcheck() { + portcheck = setInterval(function(){ + Iguana_activehandle().then(function(result){ + console.log(result); + + if (result !== 'error') { + stopcheck(); + $('#loading_status_text').text('Connecting to Basilisk Network...'); + EDEX_DEXgetinfoAll(); + } + }) + //var check = Iguana_activehandle(); + //console.log(check[0]) + }, 2000); + } + + function stopcheck() { + clearInterval(portcheck); + } + + sartcheck(); + //setTimeout(function(){ window.close(); }, 15000); + } else { + window.close(); + } +}); \ No newline at end of file diff --git a/gui/module-hack.js b/gui/module-hack.js new file mode 100644 index 0000000..5bf264e --- /dev/null +++ b/gui/module-hack.js @@ -0,0 +1,4 @@ +if (typeof module === 'object') { + window.module = module; + module = undefined; +} \ No newline at end of file