|
|
@ -23,14 +23,15 @@ Network.prototype.render = function () { |
|
|
|
|
|
|
|
|
|
|
|
if (networkNumber === 'loading') { |
|
|
|
if (networkNumber === 'loading') { |
|
|
|
return h('span.pointer', { |
|
|
|
return h('span.pointer', { |
|
|
|
|
|
|
|
className: props.onClick && 'pointer', |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
display: 'flex', |
|
|
|
display: 'flex', |
|
|
|
alignItems: 'center', |
|
|
|
alignItems: 'center', |
|
|
|
flexDirection: 'row', |
|
|
|
flexDirection: 'row', |
|
|
|
}, |
|
|
|
}, |
|
|
|
onClick: (event) => this.props.onClick(event), |
|
|
|
onClick: (event) => props.onClick && props.onClick(event), |
|
|
|
}, [ |
|
|
|
}, [ |
|
|
|
h('img', { |
|
|
|
props.onClick && h('img', { |
|
|
|
title: 'Attempting to connect to blockchain.', |
|
|
|
title: 'Attempting to connect to blockchain.', |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
width: '27px', |
|
|
|
width: '27px', |
|
|
@ -60,9 +61,10 @@ Network.prototype.render = function () { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
h('#network_component.pointer', { |
|
|
|
h('#network_component', { |
|
|
|
|
|
|
|
className: props.onClick && 'pointer', |
|
|
|
title: hoverText, |
|
|
|
title: hoverText, |
|
|
|
onClick: (event) => this.props.onClick(event), |
|
|
|
onClick: (event) => props.onClick && props.onClick(event), |
|
|
|
}, [ |
|
|
|
}, [ |
|
|
|
(function () { |
|
|
|
(function () { |
|
|
|
switch (iconName) { |
|
|
|
switch (iconName) { |
|
|
@ -74,7 +76,7 @@ Network.prototype.render = function () { |
|
|
|
color: '#039396', |
|
|
|
color: '#039396', |
|
|
|
}}, |
|
|
|
}}, |
|
|
|
'Main Network'), |
|
|
|
'Main Network'), |
|
|
|
h('i.fa.fa-caret-down.fa-lg'), |
|
|
|
props.onClick && h('i.fa.fa-caret-down.fa-lg'), |
|
|
|
]) |
|
|
|
]) |
|
|
|
case 'ropsten-test-network': |
|
|
|
case 'ropsten-test-network': |
|
|
|
return h('.network-indicator', [ |
|
|
|
return h('.network-indicator', [ |
|
|
@ -84,7 +86,7 @@ Network.prototype.render = function () { |
|
|
|
color: '#ff6666', |
|
|
|
color: '#ff6666', |
|
|
|
}}, |
|
|
|
}}, |
|
|
|
'Ropsten Test Net'), |
|
|
|
'Ropsten Test Net'), |
|
|
|
h('i.fa.fa-caret-down.fa-lg'), |
|
|
|
props.onClick && h('i.fa.fa-caret-down.fa-lg'), |
|
|
|
]) |
|
|
|
]) |
|
|
|
case 'kovan-test-network': |
|
|
|
case 'kovan-test-network': |
|
|
|
return h('.network-indicator', [ |
|
|
|
return h('.network-indicator', [ |
|
|
@ -94,7 +96,7 @@ Network.prototype.render = function () { |
|
|
|
color: '#690496', |
|
|
|
color: '#690496', |
|
|
|
}}, |
|
|
|
}}, |
|
|
|
'Kovan Test Net'), |
|
|
|
'Kovan Test Net'), |
|
|
|
h('i.fa.fa-caret-down.fa-lg'), |
|
|
|
props.onClick && h('i.fa.fa-caret-down.fa-lg'), |
|
|
|
]) |
|
|
|
]) |
|
|
|
case 'rinkeby-test-network': |
|
|
|
case 'rinkeby-test-network': |
|
|
|
return h('.network-indicator', [ |
|
|
|
return h('.network-indicator', [ |
|
|
@ -104,7 +106,7 @@ Network.prototype.render = function () { |
|
|
|
color: '#e7a218', |
|
|
|
color: '#e7a218', |
|
|
|
}}, |
|
|
|
}}, |
|
|
|
'Rinkeby Test Net'), |
|
|
|
'Rinkeby Test Net'), |
|
|
|
h('i.fa.fa-caret-down.fa-lg'), |
|
|
|
props.onClick && h('i.fa.fa-caret-down.fa-lg'), |
|
|
|
]) |
|
|
|
]) |
|
|
|
default: |
|
|
|
default: |
|
|
|
return h('.network-indicator', [ |
|
|
|
return h('.network-indicator', [ |
|
|
@ -120,7 +122,7 @@ Network.prototype.render = function () { |
|
|
|
color: '#AEAEAE', |
|
|
|
color: '#AEAEAE', |
|
|
|
}}, |
|
|
|
}}, |
|
|
|
'Private Network'), |
|
|
|
'Private Network'), |
|
|
|
h('i.fa.fa-caret-down.fa-lg'), |
|
|
|
props.onClick && h('i.fa.fa-caret-down.fa-lg'), |
|
|
|
]) |
|
|
|
]) |
|
|
|
} |
|
|
|
} |
|
|
|
})(), |
|
|
|
})(), |
|
|
|