Rearrange header components: closer to redesigned UI

feature/default_network_editable
sdtsui 7 years ago
parent 4d7295b05f
commit 8c5be54722
  1. 49
      ui/app/app.js

@ -82,7 +82,7 @@ App.prototype.render = function () {
// app bar
this.renderAppBar(),
this.renderNetworkDropdown(),
this.renderDropdown(),
// this.renderDropdown(),
h(Loading, {
isLoading: isLoading || isLoadingNetwork,
@ -120,7 +120,7 @@ App.prototype.renderAppBar = function () {
style: {
alignItems: 'center',
visibility: props.isUnlocked ? 'visible' : 'none',
background: props.isUnlocked ? 'white' : 'none',
background: '#EFEFEF', // $gallery
height: '38px',
position: 'relative',
zIndex: 12,
@ -134,7 +134,6 @@ App.prototype.renderAppBar = function () {
alignItems: 'center',
},
}, [
// mini logo
h('img', {
height: 24,
@ -142,46 +141,34 @@ App.prototype.renderAppBar = function () {
src: '/images/icon-128.png',
}),
h(NetworkIndicator, {
network: this.props.network,
provider: this.props.provider,
onClick: (event) => {
event.preventDefault()
event.stopPropagation()
this.setState({ isNetworkMenuOpen: !isNetworkMenuOpen })
// metamask name
h('h1', {
style: {
position: 'relative',
left: '9px',
},
}),
]),
}, 'MetaMask'),
// metamask name
props.isUnlocked && h('h1', {
style: {
position: 'relative',
left: '9px',
},
}, 'MetaMask'),
]),
props.isUnlocked && h('div', {
h('div', {
style: {
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
},
}, [
// hamburger
props.isUnlocked && h(SandwichExpando, {
width: 16,
barHeight: 2,
padding: 0,
isOpen: state.isMainMenuOpen,
color: 'rgb(247,146,30)',
// Network Indicator
h(NetworkIndicator, {
network: this.props.network,
provider: this.props.provider,
onClick: (event) => {
event.preventDefault()
event.stopPropagation()
this.setState({ isMainMenuOpen: !state.isMainMenuOpen })
this.setState({ isNetworkMenuOpen: !isNetworkMenuOpen })
},
}),
]),
]),
])
@ -213,8 +200,8 @@ App.prototype.renderNetworkDropdown = function () {
zIndex: 11,
style: {
position: 'absolute',
left: '2px',
top: '36px',
right: '2px',
top: '38px',
},
innerStyle: {
padding: '2px 16px 2px 0px',

Loading…
Cancel
Save