From 8796ad21e83174779c4fe75dc5be2db124d1d338 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 19 Jul 2016 10:57:40 +0200 Subject: [PATCH 1/2] fix entry point location --- package.json | 2 +- src/Ethdebugger.js | 4 +++- src/TxBrowser.js | 21 ++++++++++++++++----- src/styles/basicStyles.js | 4 ++++ 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 70b492ce9c..968c78a54c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ethereum-remix", - "version": "0.0.2-alpha.0.0.3", + "version": "0.0.2-alpha.0.0.4", "description": "Ethereum IDE and tools for the web", "contributors": [ { diff --git a/src/Ethdebugger.js b/src/Ethdebugger.js index 4a1e04a260..d0524bc0bf 100644 --- a/src/Ethdebugger.js +++ b/src/Ethdebugger.js @@ -18,9 +18,11 @@ function Ethdebugger (_web3) { this.statusMessage = '' this.view + this.displayConnectionSetting = true if (_web3) { this.web3 = _web3 init.extendWeb3(this.web3) + this.displayConnectionSetting = false } else { this.web3 = init.loadWeb3() } @@ -28,7 +30,7 @@ function Ethdebugger (_web3) { this.traceManager = new TraceManager(this.web3) var self = this - this.txBrowser = new TxBrowser(this.web3) + this.txBrowser = new TxBrowser(this.web3, this.displayConnectionSetting) this.txBrowser.register('newTxLoading', this, function () { self.unLoad() }) diff --git a/src/TxBrowser.js b/src/TxBrowser.js index 6ba1aff5ac..cc4dd952f1 100644 --- a/src/TxBrowser.js +++ b/src/TxBrowser.js @@ -6,7 +6,7 @@ var yo = require('yo-yo') var ui = require('./helpers/ui') var init = require('./helpers/init') -function TxBrowser (_web3) { +function TxBrowser (_web3, _displayConnectionSetting) { util.extend(this, new EventManager()) this.web3 = _web3 @@ -16,6 +16,10 @@ function TxBrowser (_web3) { this.from this.to this.view + this.displayConnectionSetting = true + if (_displayConnectionSetting !== undefined) { + this.displayConnectionSetting = _displayConnectionSetting + } this.setDefaultValues() } @@ -113,13 +117,20 @@ TxBrowser.prototype.init = function (ev) { yo.update(this.view, this.render()) } +TxBrowser.prototype.connectionSetting = function () { + if (this.displayConnectionSetting) { + var self = this + return yo`
Node URL: + ${this.connectInfo}
` + } else { + return '' + } +} + TxBrowser.prototype.render = function () { var self = this var view = yo`
- Node URL: - ${this.connectInfo} -
-
+ ${this.connectionSetting()}