diff --git a/src/app/tabs/run-tab.js b/src/app/tabs/run-tab.js index 376959d826..6eb7104abc 100644 --- a/src/app/tabs/run-tab.js +++ b/src/app/tabs/run-tab.js @@ -355,7 +355,8 @@ function contractDropdown (events, appAPI, appEvents, opts, self) { return } } - self._view.noInstancesText.style.display = 'none' + var noInstancesText = self._view.noInstancesText + if (noInstancesText.parentNode) { noInstancesText.parentNode.removeChild(noInstancesText) } var address = isVM ? txResult.result.createdAddress : txResult.result.contractAddress instanceContainer.appendChild(opts.udappUI.renderInstance(selectedContract.contract.object, address, selectContractNames.value)) } else { @@ -375,7 +376,8 @@ function contractDropdown (events, appAPI, appEvents, opts, self) { // ACCESS DEPLOYED INSTANCE function loadFromAddress (appAPI) { - self._view.noInstancesText.style.display = 'none' + var noInstancesText = self._view.noInstancesText + if (noInstancesText.parentNode) { noInstancesText.parentNode.removeChild(noInstancesText) } var contractNames = document.querySelector(`.${css.contractNames.classNames[0]}`) var address = atAddressButtonInput.value if (!ethJSUtil.isValidAddress(address)) { diff --git a/src/app/tabs/styles/run-tab-styles.js b/src/app/tabs/styles/run-tab-styles.js index fa680d9d94..56916dc25d 100644 --- a/src/app/tabs/styles/run-tab-styles.js +++ b/src/app/tabs/styles/run-tab-styles.js @@ -20,6 +20,17 @@ var css = csjs` margin-bottom: 2%; padding: 10px 15px 15px 15px; } + .recorderCount { + border: 1px solid ${styles.rightPanel.runTab.icon_HoverColor}; + border-radius: 50%; + margin-right: 30px; + min-width: 13px; + height: 13px; + display: flex; + justify-content: center; + align-items: center; + font-size: 10px; + } .crow { margin-top: .5em; display: flex; diff --git a/src/universal-dapp-styles.js b/src/universal-dapp-styles.js index 10df4ae302..8ac6cb18a8 100644 --- a/src/universal-dapp-styles.js +++ b/src/universal-dapp-styles.js @@ -20,6 +20,9 @@ var css = csjs` line-height: initial; overflow: visible; margin-bottom: 10px; + } + .noInstancesText { + } .titleLine { display: flex; diff --git a/src/universal-dapp-ui.js b/src/universal-dapp-ui.js index 010cd85670..54f0eccb68 100644 --- a/src/universal-dapp-ui.js +++ b/src/universal-dapp-ui.js @@ -14,7 +14,6 @@ var MultiParamManager = require('./multiParamManager') function UniversalDAppUI (udapp, opts = {}) { var self = this this.udapp = udapp - self.el = yo`
` } @@ -23,6 +22,10 @@ UniversalDAppUI.prototype.reset = function () { } UniversalDAppUI.prototype.renderInstance = function (contract, address, contractName) { + var noInstances = document.querySelector('[class^="noInstancesText"]') + if (noInstances) { + noInstances.parentNode.removeChild(noInstances) + } var abi = this.udapp.getABI(contract) return this.renderInstanceFromABI(abi, address, contractName) } @@ -33,7 +36,6 @@ UniversalDAppUI.prototype.renderInstance = function (contract, address, contract // this returns a DOM element UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address, contractName) { var self = this - address = (address.slice(0, 2) === '0x' ? '' : '0x') + address.toString('hex') var instance = yo`` var context = self.udapp.context() @@ -51,10 +53,15 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address } function remove () { - var instanceContainer = document.querySelector('[class^="instanceContainer"]') - var noInstancesText = yo`