diff --git a/src/app/tabs/run-tab.js b/src/app/tabs/run-tab.js index e1639fbfc1..0732aead8f 100644 --- a/src/app/tabs/run-tab.js +++ b/src/app/tabs/run-tab.js @@ -165,6 +165,20 @@ var css = csjs` padding-left: 10px; display: inline; } + .network { + display: flex; + justify-content: flex-end; + align-items: center; + position: absolute; + color: grey; + width: 100%; + height: 100%; + padding-right: 28px; + pointer-events: none; + } + .networkItem { + margin-right: 5px; + } ` module.exports = runTab @@ -378,33 +392,49 @@ function contractDropdown (appAPI, appEvents, instanceContainer) { ------------------------------------------------ */ function settings (appAPI, appEvents) { // SETTINGS HTML + var net = yo`` + const updateNetwork = () => { + executionContext.detectNetwork((err, { id, name } = {}) => { + if (err) { + console.error(err) + net.innerHTML = 'can\'t detect network ' + } else { + net.innerHTML = ` ${name} (${id || '-'})` + } + }) + } + setInterval(updateNetwork, 5000) var el = yo`