diff options
author | kumavis <kumavis@users.noreply.github.com> | 2016-06-30 08:14:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-30 08:14:16 +0800 |
commit | 4433618e95b8d5638bf890e746a6bc7c3793ba80 (patch) | |
tree | 3e0fddda3ffaf59c7752f1bd38b5a2aabec5ad25 /ui/app/app.js | |
parent | f7bb3cdcfebacc3f3970b469503db202e0bdda28 (diff) | |
parent | 41598a32a6fcecaeff5d90ada881bc4cfd52c08f (diff) | |
download | tangerine-wallet-browser-4433618e95b8d5638bf890e746a6bc7c3793ba80.tar tangerine-wallet-browser-4433618e95b8d5638bf890e746a6bc7c3793ba80.tar.gz tangerine-wallet-browser-4433618e95b8d5638bf890e746a6bc7c3793ba80.tar.bz2 tangerine-wallet-browser-4433618e95b8d5638bf890e746a6bc7c3793ba80.tar.lz tangerine-wallet-browser-4433618e95b8d5638bf890e746a6bc7c3793ba80.tar.xz tangerine-wallet-browser-4433618e95b8d5638bf890e746a6bc7c3793ba80.tar.zst tangerine-wallet-browser-4433618e95b8d5638bf890e746a6bc7c3793ba80.zip |
Merge pull request #370 from MetaMask/networkIndication
Network indication
Diffstat (limited to 'ui/app/app.js')
-rw-r--r-- | ui/app/app.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ui/app/app.js b/ui/app/app.js index 525681166..938caffd9 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -140,7 +140,7 @@ App.prototype.renderAppBar = function () { h('h1', { style: { position: 'relative', - left: '3px', + left: '9px', }, }, 'MetaMask'), @@ -216,6 +216,7 @@ App.prototype.renderNetworkDropdown = function () { closeMenu: () => this.setState({ isNetworkMenuOpen: false }), action: () => props.dispatch(actions.setProviderType('mainnet')), icon: h('.menu-icon.diamond'), + activeNetworkRender: props.network, }), h(DropMenuItem, { @@ -223,6 +224,7 @@ App.prototype.renderNetworkDropdown = function () { closeMenu: () => this.setState({ isNetworkMenuOpen: false }), action: () => props.dispatch(actions.setProviderType('testnet')), icon: h('.menu-icon.red-dot'), + activeNetworkRender: props.network, }), h(DropMenuItem, { @@ -230,6 +232,7 @@ App.prototype.renderNetworkDropdown = function () { closeMenu: () => this.setState({ isNetworkMenuOpen: false }), action: () => props.dispatch(actions.setRpcTarget('http://localhost:8545')), icon: h('i.fa.fa-question-circle.fa-lg', { ariaHidden: true }), + activeNetworkRender: props.provider.rpcTarget, }), this.renderCustomOption(props.provider.rpcTarget), ]) @@ -369,12 +372,20 @@ App.prototype.renderCustomOption = function (rpcTarget) { action: () => this.props.dispatch(actions.showConfigPage()), icon: h('i.fa.fa-question-circle.fa-lg', { ariaHidden: true }), }) + case 'http://localhost:8545': + return h(DropMenuItem, { + label: 'Custom RPC', + closeMenu: () => this.setState({ isNetworkMenuOpen: false }), + action: () => this.props.dispatch(actions.showConfigPage()), + icon: h('i.fa.fa-question-circle.fa-lg', { ariaHidden: true }), + }) default: return h(DropMenuItem, { label: `${rpcTarget}`, closeMenu: () => this.setState({ isNetworkMenuOpen: false }), icon: h('i.fa.fa-question-circle.fa-lg', { ariaHidden: true }), + activeNetworkRender: 'custom', }) } } |