aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/network.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-06-04 08:49:54 +0800
committerDan Finlay <dan@danfinlay.com>2016-06-04 08:49:54 +0800
commitb9007ee8439ed0fbff5b0aede2d0e78d75601c45 (patch)
tree9d87f2e1ba53e18d34c1945b9731d9db027547f0 /ui/app/components/network.js
parent5560ebba264d0ff5254562c700f86b2546afac4d (diff)
downloadtangerine-wallet-browser-b9007ee8439ed0fbff5b0aede2d0e78d75601c45.tar
tangerine-wallet-browser-b9007ee8439ed0fbff5b0aede2d0e78d75601c45.tar.gz
tangerine-wallet-browser-b9007ee8439ed0fbff5b0aede2d0e78d75601c45.tar.bz2
tangerine-wallet-browser-b9007ee8439ed0fbff5b0aede2d0e78d75601c45.tar.lz
tangerine-wallet-browser-b9007ee8439ed0fbff5b0aede2d0e78d75601c45.tar.xz
tangerine-wallet-browser-b9007ee8439ed0fbff5b0aede2d0e78d75601c45.tar.zst
tangerine-wallet-browser-b9007ee8439ed0fbff5b0aede2d0e78d75601c45.zip
Add provider menu on clicking network status indicator.
Also simplifies network status icons.
Diffstat (limited to 'ui/app/components/network.js')
-rw-r--r--ui/app/components/network.js32
1 files changed, 26 insertions, 6 deletions
diff --git a/ui/app/components/network.js b/ui/app/components/network.js
index e73ecb3f4..5ad5f9351 100644
--- a/ui/app/components/network.js
+++ b/ui/app/components/network.js
@@ -21,14 +21,14 @@ Network.prototype.render = function() {
title: 'Attempting to connect to blockchain.',
style: {
width: '27px',
- marginRight: '-16px'
+ marginRight: '-27px'
},
src: 'images/loading.svg',
})
- } else if (networkNumber == 1) {
+ } else if (parseInt(networkNumber) == 1) {
hoverText = 'Main Ethereum Network'
iconName = 'ethereum-network'
- }else if (networkNumber == 2) {
+ }else if (parseInt(networkNumber) == 2) {
hoverText = "Morden Test Network"
iconName = 'morden-test-network'
}else {
@@ -36,10 +36,30 @@ Network.prototype.render = function() {
iconName = 'unknown-private-network'
}
return (
- h('#network_component.flex-center', {
- style: { marginRight: '-16px' },
+ h('#network_component.flex-center.pointer', {
+ style: {
+ marginRight: '-27px',
+ marginLeft: '-3px',
+ },
title: hoverText,
onClick:(event) => this.props.onClick(event),
- },[ h('img.menu-icon',{src: imagePath + iconName + ".jpg"}) ])
+ },[
+ function() {
+ switch (iconName) {
+ case 'ethereum-network':
+ return h('.menu-icon.ether-icon')
+ case 'morden-test-network':
+ return h('.menu-icon.morden-icon')
+ default:
+ return h('i.fa.fa-question-circle.fa-lg', {
+ ariaHidden: true,
+ style: {
+ margin: '10px',
+ color: 'rgb(125, 128, 130)',
+ },
+ })
+ }
+ }()
+ ])
)
}