Rearrange header components: closer to redesigned UI

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

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

Loading…
Cancel
Save