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.
feature/default_network_editable
Frankie 9 years ago
parent 2c36c17238
commit e0daea35a9
  1. 2
      ui/app/app.js
  2. 3
      ui/app/components/drop-menu-item.js
  3. 30
      ui/app/components/network.js
  4. 17
      ui/app/css/index.css

@ -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',[
h('i.fa.fa-question-circle.fa-lg', {
ariaHidden: true, ariaHidden: true,
style: { style: {
margin: '10px', margin: '10px',
color: 'rgb(125, 128, 130)', 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…
Cancel
Save