mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add network name to indicator and some css fixes
-also fix custom net work bug in drop down where it thinks local:8545 is custom.
This commit is contained in:
parent
2c36c17238
commit
e0daea35a9
@ -139,7 +139,7 @@ App.prototype.renderAppBar = function () {
|
|||||||
h('h1', {
|
h('h1', {
|
||||||
style: {
|
style: {
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
left: '3px',
|
left: '9px',
|
||||||
},
|
},
|
||||||
}, 'MetaMask'),
|
}, 'MetaMask'),
|
||||||
|
|
||||||
|
@ -41,7 +41,8 @@ DropMenuItem.prototype.activeNetworkRender = function () {
|
|||||||
if (activeNetwork === '2') return h('.check', ' ✓')
|
if (activeNetwork === '2') return h('.check', ' ✓')
|
||||||
break
|
break
|
||||||
case 'Localhost 8545':
|
case 'Localhost 8545':
|
||||||
if (activeNetwork > '2') return h('.check', ' ✓')
|
debugger
|
||||||
|
if (activeNetwork === 'http://localhost:8545') return h('.check', ' ✓')
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
if (activeNetwork === 'custom') return h('.check', ' ✓')
|
if (activeNetwork === 'custom') return h('.check', ' ✓')
|
||||||
|
@ -47,17 +47,39 @@ Network.prototype.render = function () {
|
|||||||
(function () {
|
(function () {
|
||||||
switch (iconName) {
|
switch (iconName) {
|
||||||
case 'ethereum-network':
|
case 'ethereum-network':
|
||||||
return h('.menu-icon.diamond')
|
return h('.network-indicator',[
|
||||||
|
h('.menu-icon.diamond'),
|
||||||
|
h('.network-name',{
|
||||||
|
style: {
|
||||||
|
color: '#039396',
|
||||||
|
}},
|
||||||
|
'Etherum Main Net')
|
||||||
|
])
|
||||||
case 'morden-test-network':
|
case 'morden-test-network':
|
||||||
return h('.menu-icon.red-dot')
|
return h('.network-indicator',[
|
||||||
|
h('.menu-icon.red-dot'),
|
||||||
|
h('.network-name',{
|
||||||
|
style: {
|
||||||
|
color: '#ff6666',
|
||||||
|
}},
|
||||||
|
'Morden Test Net')
|
||||||
|
])
|
||||||
default:
|
default:
|
||||||
return h('i.fa.fa-question-circle.fa-lg', {
|
return h('.network-indicator',[
|
||||||
ariaHidden: true,
|
h('i.fa.fa-question-circle.fa-lg', {
|
||||||
style: {
|
ariaHidden: true,
|
||||||
margin: '10px',
|
style: {
|
||||||
color: 'rgb(125, 128, 130)',
|
margin: '10px',
|
||||||
},
|
color: 'rgb(125, 128, 130)',
|
||||||
})
|
},
|
||||||
|
}),
|
||||||
|
|
||||||
|
h('.network-name',{
|
||||||
|
style: {
|
||||||
|
color: '#AEAEAE',
|
||||||
|
}},
|
||||||
|
'Private Network'),
|
||||||
|
])
|
||||||
}
|
}
|
||||||
})(),
|
})(),
|
||||||
])
|
])
|
||||||
|
@ -141,6 +141,23 @@ textarea.twelve-word-phrase {
|
|||||||
resize: none;
|
resize: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.network-indicator {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 0.6em;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.network-name {
|
||||||
|
position: absolute;
|
||||||
|
top: 8px;
|
||||||
|
width: 5.2em;
|
||||||
|
line-height: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check {
|
||||||
|
color: #F7861C;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
app sections
|
app sections
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user