Fix account list formatting when only a single item.

- Makes account list items no longer flex larger than they should be.
- Makes the add account button not flex larger than it should be.
- Adds a line under the add account button to define its size.
feature/default_network_editable
Dan Finlay 8 years ago
parent 9b861b6687
commit c2105c4070
  1. 13
      ui/app/accounts/account-list-item.js
  2. 4
      ui/app/accounts/index.js

@ -7,14 +7,14 @@ const EthBalance = require('../components/eth-balance')
const CopyButton = require('../components/copyButton') const CopyButton = require('../components/copyButton')
const Identicon = require('../components/identicon') const Identicon = require('../components/identicon')
module.exports = NewComponent module.exports = AccountListItem
inherits(NewComponent, Component) inherits(AccountListItem, Component)
function NewComponent () { function AccountListItem () {
Component.call(this) Component.call(this)
} }
NewComponent.prototype.render = function () { AccountListItem.prototype.render = function () {
const identity = this.props.identity const identity = this.props.identity
var isSelected = this.props.selectedAddress === identity.address var isSelected = this.props.selectedAddress === identity.address
var account = this.props.accounts[identity.address] var account = this.props.accounts[identity.address]
@ -23,9 +23,6 @@ NewComponent.prototype.render = function () {
return ( return (
h(`.accounts-list-option.flex-row.flex-space-between.pointer.hover-white${selectedClass}`, { h(`.accounts-list-option.flex-row.flex-space-between.pointer.hover-white${selectedClass}`, {
key: `account-panel-${identity.address}`, key: `account-panel-${identity.address}`,
style: {
flex: '1 0 auto',
},
onClick: (event) => this.props.onShowDetail(identity.address, event), onClick: (event) => this.props.onShowDetail(identity.address, event),
}, [ }, [
@ -73,7 +70,7 @@ NewComponent.prototype.render = function () {
) )
} }
NewComponent.prototype.pendingOrNot = function () { AccountListItem.prototype.pendingOrNot = function () {
const pending = this.props.pending const pending = this.props.pending
if (pending.length === 0) return null if (pending.length === 0) return null
return h('.pending-dot', pending.length) return h('.pending-dot', pending.length)

@ -84,7 +84,7 @@ AccountsScreen.prototype.render = function () {
}) })
}), }),
h('hr.horizontal-line', {key: 'horizontal-line1'}), h('hr.horizontal-line'),
h('div.footer.hover-white.pointer', { h('div.footer.hover-white.pointer', {
key: 'reveal-account-bar', key: 'reveal-account-bar',
onClick: () => { onClick: () => {
@ -92,7 +92,6 @@ AccountsScreen.prototype.render = function () {
}, },
style: { style: {
display: 'flex', display: 'flex',
flex: '1 0 auto',
height: '40px', height: '40px',
paddint: '10px', paddint: '10px',
justifyContent: 'center', justifyContent: 'center',
@ -101,6 +100,7 @@ AccountsScreen.prototype.render = function () {
}, [ }, [
h('i.fa.fa-plus.fa-lg', {key: ''}), h('i.fa.fa-plus.fa-lg', {key: ''}),
]), ]),
h('hr.horizontal-line'),
]), ]),
unconfTxList.length ? ( unconfTxList.length ? (

Loading…
Cancel
Save