From 3860a36aaf06a9b3de62a51f676b4a09d45e6bc4 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Wed, 15 Feb 2017 08:47:40 +0300 Subject: [PATCH] added missing gui/init.js script --- gui/index.html | 7 +------ gui/init.js | 45 +++++++++++++++++++++++++++++++++++++++++++++ gui/module-hack.js | 4 ++++ 3 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 gui/init.js create mode 100644 gui/module-hack.js 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