aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-05-07 05:42:08 +0800
committerDan Finlay <dan@danfinlay.com>2016-05-07 05:42:08 +0800
commit356da540d12871bdb78f8dca8acdc6b9c5a523ec (patch)
tree3e71ae65f67cdcf6c029c6c47355f3c7a9af1853 /ui
parenta9fc4f452f7adaac7c16806d0c917d2515dcf605 (diff)
downloadtangerine-wallet-browser-356da540d12871bdb78f8dca8acdc6b9c5a523ec.tar
tangerine-wallet-browser-356da540d12871bdb78f8dca8acdc6b9c5a523ec.tar.gz
tangerine-wallet-browser-356da540d12871bdb78f8dca8acdc6b9c5a523ec.tar.bz2
tangerine-wallet-browser-356da540d12871bdb78f8dca8acdc6b9c5a523ec.tar.lz
tangerine-wallet-browser-356da540d12871bdb78f8dca8acdc6b9c5a523ec.tar.xz
tangerine-wallet-browser-356da540d12871bdb78f8dca8acdc6b9c5a523ec.tar.zst
tangerine-wallet-browser-356da540d12871bdb78f8dca8acdc6b9c5a523ec.zip
Style transaction list using new panel component
Diffstat (limited to 'ui')
-rw-r--r--ui/app/accounts.js2
-rw-r--r--ui/app/components/transaction-list.js74
2 files changed, 49 insertions, 27 deletions
diff --git a/ui/app/accounts.js b/ui/app/accounts.js
index 0cc72878c..16f37dc67 100644
--- a/ui/app/accounts.js
+++ b/ui/app/accounts.js
@@ -50,7 +50,7 @@ AccountsScreen.prototype.render = function() {
* regardless of the current domain.
*/
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),
]),
diff --git a/ui/app/components/transaction-list.js b/ui/app/components/transaction-list.js
index c5a86f082..3e153aecf 100644
--- a/ui/app/components/transaction-list.js
+++ b/ui/app/components/transaction-list.js
@@ -2,32 +2,54 @@ const h = require('react-hyperscript')
const formatBalance = require('../util').formatBalance
const addressSummary = require('../util').addressSummary
const explorerLink = require('../../lib/explorer-link')
+const Panel = require('./panel')
module.exports = function(transactions, network) {
- return h('.tx-list', {
- style: {
- overflowY: 'auto',
- height: '180px',
- textAlign: 'center',
+ return h('section', [
+
+ h('.current-domain-panel.flex-center.font-small', [
+ h('span', 'Transactions'),
+ ]),
+
+ h('.tx-list', {
+ style: {
+ overflowY: 'auto',
+ height: '180px',
+ textAlign: 'center',
+ },
},
- },
-
- [
- h('div.font-small', {style: {display: 'inline'}}, 'Transactions'),
-
- transactions.map((transaction) => {
- return h('.tx.flex-row.flex-space-around', {
- key: `listed-tx-${transaction.hash}`,
- }, [
- h('a.font-small',
- {
- href: explorerLink(transaction.hash, parseInt(network)),
- target: '_blank',
- },
- addressSummary(transaction.txParams.to)),
- h('div.font-small', formatBalance(transaction.txParams.value))
- ])
- })
- ]
- )
-}
+
+ [
+
+ transactions.map((transaction) => {
+ console.dir(transaction)
+
+ var panelOpts = {
+ 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: [
+ {
+ key: 'TO',
+ value: addressSummary(transaction.txParams.to),
+ },
+ {
+ key: 'VALUE',
+ value: formatBalance(transaction.txParams.value),
+ },
+ ]
+ }
+
+ return h(Panel, panelOpts)
+ })
+ ]
+ )
+
+ ])
+ }