aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-06-04 04:08:49 +0800
committerDan Finlay <dan@danfinlay.com>2016-06-04 04:08:49 +0800
commitd86d7b9ac77c04d4e5800d67f01ec1c859abfbf1 (patch)
treebf92490e9552a534bf5befce426ca06da6e4304e
parent3170e094c5963ccbde9e8e668bdcfe4f90600549 (diff)
downloadtangerine-wallet-browser-d86d7b9ac77c04d4e5800d67f01ec1c859abfbf1.tar
tangerine-wallet-browser-d86d7b9ac77c04d4e5800d67f01ec1c859abfbf1.tar.gz
tangerine-wallet-browser-d86d7b9ac77c04d4e5800d67f01ec1c859abfbf1.tar.bz2
tangerine-wallet-browser-d86d7b9ac77c04d4e5800d67f01ec1c859abfbf1.tar.lz
tangerine-wallet-browser-d86d7b9ac77c04d4e5800d67f01ec1c859abfbf1.tar.xz
tangerine-wallet-browser-d86d7b9ac77c04d4e5800d67f01ec1c859abfbf1.tar.zst
tangerine-wallet-browser-d86d7b9ac77c04d4e5800d67f01ec1c859abfbf1.zip
Differentiate icon name from hover text
-rw-r--r--ui/app/components/network.js28
1 files changed, 16 insertions, 12 deletions
diff --git a/ui/app/components/network.js b/ui/app/components/network.js
index dbba2b494..5f507f630 100644
--- a/ui/app/components/network.js
+++ b/ui/app/components/network.js
@@ -11,24 +11,28 @@ function Network() {
}
Network.prototype.render = function() {
- var state = this.props
- var networkNumber = state.network
- var networkName;
- var imagePath = "/images/"
+ const state = this.props
+ const networkNumber = state.network
+ let iconName, hoverText
+ const imagePath = "/images/"
if (networkNumber == undefined || networkNumber == "error") {
- networkName = "No Blockchain Connection"
+ hoverText = 'No Blockchain Connection'
+ iconName = 'no-connection'
} else if (networkNumber == 1) {
- networkName = "Main Ethereum Network"
- } else if (networkNumber == 2) {
- networkName = "Morden Test Network"
- } else {
- networkName = "Unknown Private Network"
+ hoverText = 'Main Ethereum Network'
+ iconName = 'ethereum-network'
+ }else if (networkNumber == 2) {
+ hoverText = "Morden Test Network"
+ iconName = 'morden-test-network'
+ }else {
+ hoverText = "Unknown Private Network"
+ iconName = 'unknown-private-network'
}
return (
h('#network_component.flex-center', {
style: {},
- title: networkName
- },[ h('img',{src: imagePath + networkName + ".jpg", width: '25px'}) ])
+ title: hoverText,
+ },[ h('img',{src: imagePath + iconName + ".jpg", width: '25px'}) ])
)
}