mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Style transaction list using new panel component
This commit is contained in:
parent
a9fc4f452f
commit
356da540d1
@ -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,
|
||||||
href: explorerLink(transaction.hash, parseInt(network)),
|
style: {
|
||||||
target: '_blank',
|
cursor: 'pointer',
|
||||||
},
|
},
|
||||||
addressSummary(transaction.txParams.to)),
|
onClick: (event) => {
|
||||||
h('div.font-small', formatBalance(transaction.txParams.value))
|
var url = explorerLink(transaction.hash, parseInt(network))
|
||||||
])
|
chrome.tabs.create({ url });
|
||||||
|
},
|
||||||
|
attributes: [
|
||||||
|
{
|
||||||
|
key: 'TO',
|
||||||
|
value: addressSummary(transaction.txParams.to),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'VALUE',
|
||||||
|
value: formatBalance(transaction.txParams.value),
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
return h(Panel, panelOpts)
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
])
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user