From 24ea10c36cd51f3cf41e8d0b45d32fe6ae81e48b Mon Sep 17 00:00:00 2001 From: bechi Date: Thu, 30 Oct 2014 16:46:39 -0300 Subject: [PATCH] history section --- css/src/main.css | 11 +++--- css/src/mobile.css | 5 +++ js/controllers/transactions.js | 3 ++ js/models/Wallet.js | 3 +- views/includes/sidebar.html | 2 +- views/transactions.html | 61 ++++++++++++++++------------------ 6 files changed, 47 insertions(+), 38 deletions(-) diff --git a/css/src/main.css b/css/src/main.css index d9725935f..68afbaa55 100644 --- a/css/src/main.css +++ b/css/src/main.css @@ -170,7 +170,8 @@ header .alt-currency { } .head .menu ul { - border: none; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; position: absolute; right: 14px; width: 100px; @@ -182,7 +183,6 @@ header .alt-currency { background: #FFFFFF; -moz-box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.25); box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.25); - border: none; } .head .menu ul li a { @@ -808,10 +808,13 @@ input[type=number]::-webkit-outer-spin-button { background-color: #1ABC9C; } +.label { + font-weight: 700; + padding: 0.3rem 0.4rem; +} + .label.alert { background-color: #C0392A; - padding: 0.3rem 0.4rem; - font-weight: 700; } .bg-alert { diff --git a/css/src/mobile.css b/css/src/mobile.css index 68765adde..89c1513e9 100644 --- a/css/src/mobile.css +++ b/css/src/mobile.css @@ -195,5 +195,10 @@ height: auto; } + .label { + font-size: 80%; + padding: 0.15rem 0.2rem; + } + } diff --git a/js/controllers/transactions.js b/js/controllers/transactions.js index 019a93616..e15aac4f2 100644 --- a/js/controllers/transactions.js +++ b/js/controllers/transactions.js @@ -62,6 +62,9 @@ angular.module('copayApp.controllers').controller('TransactionsController', return; } + _.each(res, function (r) { + r.ts = r.minedTs || r.sentTs; + }); $scope.blockchain_txs = w.cached_txs = res; $scope.loading = false; setTimeout(function() { diff --git a/js/models/Wallet.js b/js/models/Wallet.js index 0b6fe5b1f..609698d0a 100644 --- a/js/models/Wallet.js +++ b/js/models/Wallet.js @@ -2854,7 +2854,7 @@ Wallet.prototype.getTransactionHistory = function(cb) { tx.amountSat = Math.abs(amount); tx.amount = tx.amountSat * satToUnit; tx.sentTs = proposal ? proposal.sentTs : undefined; - tx.minedTs = tx.time * 1000; + tx.minedTs = !_.isNaN(tx.time) ? tx.time * 1000 : undefined; }; if (addresses.length > 0) { @@ -2864,6 +2864,7 @@ Wallet.prototype.getTransactionHistory = function(cb) { var history = _.map(txs, function(tx) { decorateTx(tx); + console.log(tx); return tx; }); return cb(null, history); diff --git a/views/includes/sidebar.html b/views/includes/sidebar.html index 571e9bf14..cc473b2d0 100644 --- a/views/includes/sidebar.html +++ b/views/includes/sidebar.html @@ -77,7 +77,7 @@ - {{'Add Wallet' | translate }} +