diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-07-04 06:24:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-04 06:24:10 +0800 |
commit | 36e0fef8548b098078350ad0658173d6a4154cd1 (patch) | |
tree | 325b1da321f0051ae40d8cfad8f860c2a3a2fba8 /ui/app/app.js | |
parent | 1503dba5ca3526e9750353c2db999dd50433837e (diff) | |
parent | 27c651d8da3a9d8956c6b8a119a51a3382c449fe (diff) | |
download | tangerine-wallet-browser-36e0fef8548b098078350ad0658173d6a4154cd1.tar tangerine-wallet-browser-36e0fef8548b098078350ad0658173d6a4154cd1.tar.gz tangerine-wallet-browser-36e0fef8548b098078350ad0658173d6a4154cd1.tar.bz2 tangerine-wallet-browser-36e0fef8548b098078350ad0658173d6a4154cd1.tar.lz tangerine-wallet-browser-36e0fef8548b098078350ad0658173d6a4154cd1.tar.xz tangerine-wallet-browser-36e0fef8548b098078350ad0658173d6a4154cd1.tar.zst tangerine-wallet-browser-36e0fef8548b098078350ad0658173d6a4154cd1.zip |
Merge branch 'master' into i1720-NoSpinnerOnConfig
Diffstat (limited to 'ui/app/app.js')
-rw-r--r-- | ui/app/app.js | 47 |
1 files changed, 31 insertions, 16 deletions
diff --git a/ui/app/app.js b/ui/app/app.js index e4f312bf4..1a63002e1 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -68,7 +68,7 @@ App.prototype.render = function () { const { isLoading, loadingMessage, transForward, network } = props const isLoadingNetwork = network === 'loading' && props.currentView.name !== 'config' const loadMessage = loadingMessage || isLoadingNetwork ? - 'Searching for Network' : null + `Connecting to ${this.getNetworkName()}` : null log.debug('Main ui render function') @@ -136,7 +136,7 @@ App.prototype.renderAppBar = function () { }, }, [ - h('div', { + h('div.left-menu-section', { style: { display: 'flex', flexDirection: 'row', @@ -151,21 +151,15 @@ App.prototype.renderAppBar = function () { src: '/images/icon-128.png', }), - h('#network-spacer.flex-center', { - style: { - marginRight: '-72px', + h(NetworkIndicator, { + network: this.props.network, + provider: this.props.provider, + onClick: (event) => { + event.preventDefault() + event.stopPropagation() + this.setState({ isNetworkMenuOpen: !isNetworkMenuOpen }) }, - }, [ - h(NetworkIndicator, { - network: this.props.network, - provider: this.props.provider, - onClick: (event) => { - event.preventDefault() - event.stopPropagation() - this.setState({ isNetworkMenuOpen: !isNetworkMenuOpen }) - }, - }), - ]), + }), ]), // metamask name @@ -555,6 +549,27 @@ App.prototype.renderCustomOption = function (provider) { } } +App.prototype.getNetworkName = function () { + const { provider } = this.props + const providerName = provider.type + + let name + + if (providerName === 'mainnet') { + name = 'Main Ethereum Network' + } else if (providerName === 'ropsten') { + name = 'Ropsten Test Network' + } else if (providerName === 'kovan') { + name = 'Kovan Test Network' + } else if (providerName === 'rinkeby') { + name = 'Rinkeby Test Network' + } else { + name = 'Unknown Private Network' + } + + return name +} + App.prototype.renderCommonRpc = function (rpcList, provider) { const { rpcTarget } = provider const props = this.props |