Style transaction list using new panel component

feature/default_network_editable
Dan Finlay 9 years ago
parent a9fc4f452f
commit 356da540d1
  1. 1
      CHANGELOG.md
  2. 2
      ui/app/accounts.js
  3. 46
      ui/app/components/transaction-list.js

@ -9,6 +9,7 @@
- Restored back button to account detail view. - Restored back button to account detail view.
- Show transaction list always, never collapsed. - Show transaction list always, never collapsed.
- Changing provider now reloads current Dapps - Changing provider now reloads current Dapps
- Improved appearance of transaction list in account detail view.
## 1.7.0 2016-04-29 ## 1.7.0 2016-04-29

@ -50,7 +50,7 @@ AccountsScreen.prototype.render = function() {
* regardless of the current domain. * regardless of the current domain.
*/ */
h('.current-domain-panel.flex-center.font-small', [ h('.current-domain-panel.flex-center.font-small', [
h('spam', 'Selected address is visible to all sites you visit.'), h('span', 'Selected address is visible to all sites you visit.'),
// h('span', state.currentDomain), // h('span', state.currentDomain),
]), ]),

@ -2,9 +2,16 @@ const h = require('react-hyperscript')
const formatBalance = require('../util').formatBalance const formatBalance = require('../util').formatBalance
const addressSummary = require('../util').addressSummary const addressSummary = require('../util').addressSummary
const explorerLink = require('../../lib/explorer-link') const explorerLink = require('../../lib/explorer-link')
const Panel = require('./panel')
module.exports = function(transactions, network) { module.exports = function(transactions, network) {
return h('.tx-list', { return h('section', [
h('.current-domain-panel.flex-center.font-small', [
h('span', 'Transactions'),
]),
h('.tx-list', {
style: { style: {
overflowY: 'auto', overflowY: 'auto',
height: '180px', height: '180px',
@ -13,21 +20,36 @@ module.exports = function(transactions, network) {
}, },
[ [
h('div.font-small', {style: {display: 'inline'}}, 'Transactions'),
transactions.map((transaction) => { transactions.map((transaction) => {
return h('.tx.flex-row.flex-space-around', { console.dir(transaction)
key: `listed-tx-${transaction.hash}`,
}, [ var panelOpts = {
h('a.font-small', key: `tx-${transaction.hash}`,
identiconKey: transaction.txParams.to,
style: {
cursor: 'pointer',
},
onClick: (event) => {
var url = explorerLink(transaction.hash, parseInt(network))
chrome.tabs.create({ url });
},
attributes: [
{ {
href: explorerLink(transaction.hash, parseInt(network)), key: 'TO',
target: '_blank', value: addressSummary(transaction.txParams.to),
}, },
addressSummary(transaction.txParams.to)), {
h('div.font-small', formatBalance(transaction.txParams.value)) key: 'VALUE',
]) value: formatBalance(transaction.txParams.value),
},
]
}
return h(Panel, panelOpts)
}) })
] ]
) )
}
])
}

Loading…
Cancel
Save