|
|
@ -32,24 +32,7 @@ Network.prototype.render = function () { |
|
|
|
} |
|
|
|
} |
|
|
|
let iconName, hoverText |
|
|
|
let iconName, hoverText |
|
|
|
|
|
|
|
|
|
|
|
if (networkNumber === 'loading') { |
|
|
|
if (providerName === 'mainnet') { |
|
|
|
return h('span.pointer.network-indicator', { |
|
|
|
|
|
|
|
style: { |
|
|
|
|
|
|
|
display: 'flex', |
|
|
|
|
|
|
|
alignItems: 'center', |
|
|
|
|
|
|
|
flexDirection: 'row', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
onClick: (event) => this.props.onClick(event), |
|
|
|
|
|
|
|
}, [ |
|
|
|
|
|
|
|
h('img', { |
|
|
|
|
|
|
|
title: context.t('attemptingConnect'), |
|
|
|
|
|
|
|
style: { |
|
|
|
|
|
|
|
width: '27px', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
src: 'images/loading.svg', |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
} else if (providerName === 'mainnet') { |
|
|
|
|
|
|
|
hoverText = context.t('mainnet') |
|
|
|
hoverText = context.t('mainnet') |
|
|
|
iconName = 'ethereum-network' |
|
|
|
iconName = 'ethereum-network' |
|
|
|
} else if (providerName === 'ropsten') { |
|
|
|
} else if (providerName === 'ropsten') { |
|
|
@ -92,6 +75,7 @@ Network.prototype.render = function () { |
|
|
|
h(NetworkDropdownIcon, { |
|
|
|
h(NetworkDropdownIcon, { |
|
|
|
backgroundColor: '#038789', // $blue-lagoon
|
|
|
|
backgroundColor: '#038789', // $blue-lagoon
|
|
|
|
nonSelectBackgroundColor: '#15afb2', |
|
|
|
nonSelectBackgroundColor: '#15afb2', |
|
|
|
|
|
|
|
loading: networkNumber === 'loading', |
|
|
|
}), |
|
|
|
}), |
|
|
|
h('.network-name', context.t('mainnet')), |
|
|
|
h('.network-name', context.t('mainnet')), |
|
|
|
h('i.fa.fa-chevron-down.fa-lg.network-caret'), |
|
|
|
h('i.fa.fa-chevron-down.fa-lg.network-caret'), |
|
|
@ -101,6 +85,7 @@ Network.prototype.render = function () { |
|
|
|
h(NetworkDropdownIcon, { |
|
|
|
h(NetworkDropdownIcon, { |
|
|
|
backgroundColor: '#e91550', // $crimson
|
|
|
|
backgroundColor: '#e91550', // $crimson
|
|
|
|
nonSelectBackgroundColor: '#ec2c50', |
|
|
|
nonSelectBackgroundColor: '#ec2c50', |
|
|
|
|
|
|
|
loading: networkNumber === 'loading', |
|
|
|
}), |
|
|
|
}), |
|
|
|
h('.network-name', context.t('ropsten')), |
|
|
|
h('.network-name', context.t('ropsten')), |
|
|
|
h('i.fa.fa-chevron-down.fa-lg.network-caret'), |
|
|
|
h('i.fa.fa-chevron-down.fa-lg.network-caret'), |
|
|
@ -110,6 +95,7 @@ Network.prototype.render = function () { |
|
|
|
h(NetworkDropdownIcon, { |
|
|
|
h(NetworkDropdownIcon, { |
|
|
|
backgroundColor: '#690496', // $purple
|
|
|
|
backgroundColor: '#690496', // $purple
|
|
|
|
nonSelectBackgroundColor: '#b039f3', |
|
|
|
nonSelectBackgroundColor: '#b039f3', |
|
|
|
|
|
|
|
loading: networkNumber === 'loading', |
|
|
|
}), |
|
|
|
}), |
|
|
|
h('.network-name', context.t('kovan')), |
|
|
|
h('.network-name', context.t('kovan')), |
|
|
|
h('i.fa.fa-chevron-down.fa-lg.network-caret'), |
|
|
|
h('i.fa.fa-chevron-down.fa-lg.network-caret'), |
|
|
@ -119,13 +105,31 @@ Network.prototype.render = function () { |
|
|
|
h(NetworkDropdownIcon, { |
|
|
|
h(NetworkDropdownIcon, { |
|
|
|
backgroundColor: '#ebb33f', // $tulip-tree
|
|
|
|
backgroundColor: '#ebb33f', // $tulip-tree
|
|
|
|
nonSelectBackgroundColor: '#ecb23e', |
|
|
|
nonSelectBackgroundColor: '#ecb23e', |
|
|
|
|
|
|
|
loading: networkNumber === 'loading', |
|
|
|
}), |
|
|
|
}), |
|
|
|
h('.network-name', context.t('rinkeby')), |
|
|
|
h('.network-name', context.t('rinkeby')), |
|
|
|
h('i.fa.fa-chevron-down.fa-lg.network-caret'), |
|
|
|
h('i.fa.fa-chevron-down.fa-lg.network-caret'), |
|
|
|
]) |
|
|
|
]) |
|
|
|
default: |
|
|
|
default: |
|
|
|
return h('.network-indicator', [ |
|
|
|
return h('.network-indicator', [ |
|
|
|
h('i.fa.fa-question-circle.fa-lg', { |
|
|
|
networkNumber === 'loading' |
|
|
|
|
|
|
|
? h('span.pointer.network-indicator', { |
|
|
|
|
|
|
|
style: { |
|
|
|
|
|
|
|
display: 'flex', |
|
|
|
|
|
|
|
alignItems: 'center', |
|
|
|
|
|
|
|
flexDirection: 'row', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
onClick: (event) => this.props.onClick(event), |
|
|
|
|
|
|
|
}, [ |
|
|
|
|
|
|
|
h('img', { |
|
|
|
|
|
|
|
title: context.t('attemptingConnect'), |
|
|
|
|
|
|
|
style: { |
|
|
|
|
|
|
|
width: '27px', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
src: 'images/loading.svg', |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
: h('i.fa.fa-question-circle.fa-lg', { |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
margin: '10px', |
|
|
|
margin: '10px', |
|
|
|
color: 'rgb(125, 128, 130)', |
|
|
|
color: 'rgb(125, 128, 130)', |
|
|
|