aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2016-05-14 08:02:33 +0800
committerkumavis <aaron@kumavis.me>2016-05-14 08:02:33 +0800
commit82504ae965af9db892daa21c7d0c5bd59d099195 (patch)
treeecfc7db617528328d02cf91681bd018b92f246db /ui/app/components
parent2365fe114213c6e5fa8230688b9191bd3a1c369f (diff)
downloadtangerine-wallet-browser-82504ae965af9db892daa21c7d0c5bd59d099195.tar
tangerine-wallet-browser-82504ae965af9db892daa21c7d0c5bd59d099195.tar.gz
tangerine-wallet-browser-82504ae965af9db892daa21c7d0c5bd59d099195.tar.bz2
tangerine-wallet-browser-82504ae965af9db892daa21c7d0c5bd59d099195.tar.lz
tangerine-wallet-browser-82504ae965af9db892daa21c7d0c5bd59d099195.tar.xz
tangerine-wallet-browser-82504ae965af9db892daa21c7d0c5bd59d099195.tar.zst
tangerine-wallet-browser-82504ae965af9db892daa21c7d0c5bd59d099195.zip
ui - txList - add time
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/transaction-list.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/ui/app/components/transaction-list.js b/ui/app/components/transaction-list.js
index fd6a0b2ff..2a1442b8c 100644
--- a/ui/app/components/transaction-list.js
+++ b/ui/app/components/transaction-list.js
@@ -1,4 +1,5 @@
const h = require('react-hyperscript')
+const vreme = new (require('vreme'))
const formatBalance = require('../util').formatBalance
const addressSummary = require('../util').addressSummary
const explorerLink = require('../../lib/explorer-link')
@@ -12,6 +13,7 @@ module.exports = function(transactions, network) {
h('h3.flex-center.text-transform-uppercase', {
style: {
background: '#EBEBEB',
+ color: '#AEAEAE',
},
}, [
'Transactions',
@@ -43,6 +45,7 @@ module.exports = function(transactions, network) {
}
function renderTransaction(transaction){
+
var panelOpts = {
key: `tx-${transaction.hash}`,
identiconKey: transaction.txParams.to,
@@ -52,6 +55,10 @@ function renderTransaction(transaction){
},
attributes: [
{
+ key: 'TIME',
+ value: formatDate(transaction.time),
+ },
+ {
key: 'TO',
value: addressSummary(transaction.txParams.to),
},
@@ -63,4 +70,8 @@ function renderTransaction(transaction){
}
return h(Panel, panelOpts)
+}
+
+function formatDate(date){
+ return vreme.format(new Date(date), 'March 16 2014 14:30')
} \ No newline at end of file