1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +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:
Frankie 2016-06-29 16:11:09 -07:00
parent 2c36c17238
commit e0daea35a9
4 changed files with 51 additions and 11 deletions

View File

@ -139,7 +139,7 @@ App.prototype.renderAppBar = function () {
h('h1', {
style: {
position: 'relative',
left: '3px',
left: '9px',
},
}, 'MetaMask'),

View File

@ -41,7 +41,8 @@ DropMenuItem.prototype.activeNetworkRender = function () {
if (activeNetwork === '2') return h('.check', ' ✓')
break
case 'Localhost 8545':
if (activeNetwork > '2') return h('.check', ' ✓')
debugger
if (activeNetwork === 'http://localhost:8545') return h('.check', ' ✓')
break
default:
if (activeNetwork === 'custom') return h('.check', ' ✓')

View File

@ -47,17 +47,39 @@ Network.prototype.render = function () {
(function () {
switch (iconName) {
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':
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:
return h('i.fa.fa-question-circle.fa-lg', {
ariaHidden: true,
style: {
margin: '10px',
color: 'rgb(125, 128, 130)',
},
})
return h('.network-indicator',[
h('i.fa.fa-question-circle.fa-lg', {
ariaHidden: true,
style: {
margin: '10px',
color: 'rgb(125, 128, 130)',
},
}),
h('.network-name',{
style: {
color: '#AEAEAE',
}},
'Private Network'),
])
}
})(),
])

View File

@ -141,6 +141,23 @@ textarea.twelve-word-phrase {
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
*/