diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-11-22 04:17:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-22 04:17:46 +0800 |
commit | b4bee4fb5987ab205c8dd7e7dff86af979facdbe (patch) | |
tree | 528f87b75425d172db7f3d4b9b563a348535042b /ui/app | |
parent | 37d836fa72c75945d436bd94feadb65aa95d7e5f (diff) | |
parent | e8a83026248e6e27e6d801cf1713551eb740137a (diff) | |
download | tangerine-wallet-browser-b4bee4fb5987ab205c8dd7e7dff86af979facdbe.tar tangerine-wallet-browser-b4bee4fb5987ab205c8dd7e7dff86af979facdbe.tar.gz tangerine-wallet-browser-b4bee4fb5987ab205c8dd7e7dff86af979facdbe.tar.bz2 tangerine-wallet-browser-b4bee4fb5987ab205c8dd7e7dff86af979facdbe.tar.lz tangerine-wallet-browser-b4bee4fb5987ab205c8dd7e7dff86af979facdbe.tar.xz tangerine-wallet-browser-b4bee4fb5987ab205c8dd7e7dff86af979facdbe.tar.zst tangerine-wallet-browser-b4bee4fb5987ab205c8dd7e7dff86af979facdbe.zip |
Merge pull request #832 from MetaMask/i831-AddRopsten
Begin adding Ropsten support
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/app.js | 11 | ||||
-rw-r--r-- | ui/app/components/drop-menu-item.js | 5 | ||||
-rw-r--r-- | ui/app/components/network.js | 16 | ||||
-rw-r--r-- | ui/app/css/lib.css | 2 |
4 files changed, 31 insertions, 3 deletions
diff --git a/ui/app/app.js b/ui/app/app.js index ae6fe7071..3a3b234cc 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -235,7 +235,7 @@ App.prototype.renderNetworkDropdown = function () { }), h(DropMenuItem, { - label: 'Morden Test Network', + label: 'Ropsten Test Network', closeMenu: () => this.setState({ isNetworkMenuOpen: false }), action: () => props.dispatch(actions.setProviderType('testnet')), icon: h('.menu-icon.red-dot'), @@ -244,6 +244,15 @@ App.prototype.renderNetworkDropdown = function () { }), h(DropMenuItem, { + label: 'Morden Test Network', + closeMenu: () => this.setState({ isNetworkMenuOpen: false }), + action: () => props.dispatch(actions.setProviderType('morden')), + icon: h('.menu-icon.red-dot'), + activeNetworkRender: props.network, + provider: props.provider, + }), + + h(DropMenuItem, { label: 'Localhost 8545', closeMenu: () => this.setState({ isNetworkMenuOpen: false }), action: () => props.dispatch(actions.setRpcTarget('http://localhost:8545')), diff --git a/ui/app/components/drop-menu-item.js b/ui/app/components/drop-menu-item.js index 8088680c0..b82114f03 100644 --- a/ui/app/components/drop-menu-item.js +++ b/ui/app/components/drop-menu-item.js @@ -41,9 +41,12 @@ DropMenuItem.prototype.activeNetworkRender = function () { case 'Main Ethereum Network': if (providerType === 'mainnet') return h('.check', '✓') break - case 'Morden Test Network': + case 'Ropsten Test Network': if (provider.type === 'testnet') return h('.check', '✓') break + case 'Morden Test Network': + if (provider.type === 'morden') return h('.check', '✓') + break case 'Localhost 8545': if (activeNetwork === 'http://localhost:8545') return h('.check', '✓') break diff --git a/ui/app/components/network.js b/ui/app/components/network.js index 845861396..b7d3cdbf5 100644 --- a/ui/app/components/network.js +++ b/ui/app/components/network.js @@ -36,6 +36,12 @@ Network.prototype.render = function () { } else if (providerName === 'mainnet') { hoverText = 'Main Ethereum Network' iconName = 'ethereum-network' + } else if (providerName === 'testnet') { + hoverText = 'Ropsten Test Network' + iconName = 'ropsten-test-network' + } else if (parseInt(networkNumber) === 3) { + hoverText = 'Ropsten Test Network' + iconName = 'ropsten-test-network' } else if (parseInt(networkNumber) === 2) { hoverText = 'Morden Test Network' iconName = 'morden-test-network' @@ -43,6 +49,7 @@ Network.prototype.render = function () { hoverText = 'Unknown Private Network' iconName = 'unknown-private-network' } + return ( h('#network_component.flex-center.pointer', { style: { @@ -63,6 +70,15 @@ Network.prototype.render = function () { }}, 'Ethereum Main Net'), ]) + case 'ropsten-test-network': + return h('.network-indicator', [ + h('.menu-icon.red-dot'), + h('.network-name', { + style: { + color: '#ff6666', + }}, + 'Ropsten Test Net'), + ]) case 'morden-test-network': return h('.network-indicator', [ h('.menu-icon.red-dot'), diff --git a/ui/app/css/lib.css b/ui/app/css/lib.css index bcd6a4a67..f5f602729 100644 --- a/ui/app/css/lib.css +++ b/ui/app/css/lib.css @@ -213,7 +213,7 @@ hr.horizontal-line { background: rgb(0, 163, 68); border-radius: 20px; } -.morden-icon { +.testnet-icon { background: #2465E1; } |