mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Differentiate icon name from hover text
This commit is contained in:
parent
3170e094c5
commit
d86d7b9ac7
@ -11,24 +11,28 @@ function Network() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Network.prototype.render = function() {
|
Network.prototype.render = function() {
|
||||||
var state = this.props
|
const state = this.props
|
||||||
var networkNumber = state.network
|
const networkNumber = state.network
|
||||||
var networkName;
|
let iconName, hoverText
|
||||||
var imagePath = "/images/"
|
const imagePath = "/images/"
|
||||||
|
|
||||||
if (networkNumber == undefined || networkNumber == "error") {
|
if (networkNumber == undefined || networkNumber == "error") {
|
||||||
networkName = "No Blockchain Connection"
|
hoverText = 'No Blockchain Connection'
|
||||||
|
iconName = 'no-connection'
|
||||||
} else if (networkNumber == 1) {
|
} else if (networkNumber == 1) {
|
||||||
networkName = "Main Ethereum Network"
|
hoverText = 'Main Ethereum Network'
|
||||||
} else if (networkNumber == 2) {
|
iconName = 'ethereum-network'
|
||||||
networkName = "Morden Test Network"
|
}else if (networkNumber == 2) {
|
||||||
} else {
|
hoverText = "Morden Test Network"
|
||||||
networkName = "Unknown Private Network"
|
iconName = 'morden-test-network'
|
||||||
|
}else {
|
||||||
|
hoverText = "Unknown Private Network"
|
||||||
|
iconName = 'unknown-private-network'
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
h('#network_component.flex-center', {
|
h('#network_component.flex-center', {
|
||||||
style: {},
|
style: {},
|
||||||
title: networkName
|
title: hoverText,
|
||||||
},[ h('img',{src: imagePath + networkName + ".jpg", width: '25px'}) ])
|
},[ h('img',{src: imagePath + iconName + ".jpg", width: '25px'}) ])
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user