1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00

Let account address take more space in account list

This commit is contained in:
Dan Finlay 2016-06-14 15:24:47 -07:00
parent 76bd67a563
commit 9417b92e44
3 changed files with 20 additions and 10 deletions

View File

@ -5,7 +5,6 @@ const h = require('react-hyperscript')
const connect = require('react-redux').connect const connect = require('react-redux').connect
const copyToClipboard = require('copy-to-clipboard') const copyToClipboard = require('copy-to-clipboard')
const actions = require('./actions') const actions = require('./actions')
const addressSummary = require('./util').addressSummary
const ReactCSSTransitionGroup = require('react-addons-css-transition-group') const ReactCSSTransitionGroup = require('react-addons-css-transition-group')
const valuesFor = require('./util').valuesFor const valuesFor = require('./util').valuesFor
@ -120,7 +119,7 @@ AccountDetailScreen.prototype.render = function() {
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
paddingTop: '3px', paddingTop: '3px',
}, },
}, selected), }, ethUtil.toChecksumAddress(selected)),
h('img.cursor-pointer.color-orange', { h('img.cursor-pointer.color-orange', {
src: 'images/copy.svg', src: 'images/copy.svg',

View File

@ -4,7 +4,6 @@ const inherits = require('util').inherits
const ethUtil = require('ethereumjs-util') const ethUtil = require('ethereumjs-util')
const EtherBalance = require('../components/eth-balance') const EtherBalance = require('../components/eth-balance')
const addressSummary = require('../util').addressSummary
const copyToClipboard = require('copy-to-clipboard') const copyToClipboard = require('copy-to-clipboard')
const Identicon = require('../components/identicon') const Identicon = require('../components/identicon')
@ -41,16 +40,29 @@ NewComponent.prototype.render = function() {
]), ]),
// account address, balance // account address, balance
h('.identity-data.flex-column.flex-justify-center.flex-grow.select-none', [ h('.identity-data.flex-column.flex-justify-center.flex-grow.select-none', {
style: {
width: '200px',
},
}, [
h('span', identity.name), h('span', identity.name),
h('span.font-small', addressSummary(identity.address)), h('span.font-small', {
style: {
overflow: 'hidden',
textOverflow: 'ellipsis',
},
}, ethUtil.toChecksumAddress(identity.address)),
h(EtherBalance, { h(EtherBalance, {
value: account.balance, value: account.balance,
}), }),
]), ]),
h('.identity-copy.flex-column', [ // copy button
h('.identity-copy.flex-column', {
style: {
margin: '0 20px',
},
}, [
h('i.fa.fa-clipboard.fa-md.cursor-pointer.color-orange', { h('i.fa.fa-clipboard.fa-md.cursor-pointer.color-orange', {
onClick: (event) => { onClick: (event) => {
event.stopPropagation() event.stopPropagation()
@ -58,7 +70,7 @@ NewComponent.prototype.render = function() {
copyToClipboard(ethUtil.toChecksumAddress(identity.address)) copyToClipboard(ethUtil.toChecksumAddress(identity.address))
} }
}), }),
]) ]),
]) ])
) )
} }

View File

@ -2,7 +2,6 @@ const inherits = require('util').inherits
const ethUtil = require('ethereumjs-util') const ethUtil = require('ethereumjs-util')
const Component = require('react').Component const Component = require('react').Component
const h = require('react-hyperscript') const h = require('react-hyperscript')
const addressSummary = require('../util').addressSummary
const formatBalance = require('../util').formatBalance const formatBalance = require('../util').formatBalance
const Identicon = require('./identicon') const Identicon = require('./identicon')
@ -37,7 +36,7 @@ AccountPanel.prototype.render = function() {
attributes: [ attributes: [
{ {
key: 'ADDRESS', key: 'ADDRESS',
value: addressSummary(identity.address) value: identity.address,
}, },
balanceOrFaucetingIndication(account, isFauceting), balanceOrFaucetingIndication(account, isFauceting),
] ]