From 073b063a48dd4e39362d35df233c6bc82711d34e Mon Sep 17 00:00:00 2001 From: Marty Alcala Date: Thu, 3 Nov 2016 17:29:29 -0400 Subject: [PATCH] improve tx proposal list item styling --- src/js/controllers/walletDetails.js | 8 +++-- src/sass/views/walletDetails.scss | 8 +++++ www/img/icon-proposal-pending.svg | 23 ++++++++++++ www/views/includes/txp.html | 54 +++++++++++++++++++++++++++-- www/views/tab-home.html | 8 +++-- www/views/walletDetails.html | 20 +++++------ 6 files changed, 105 insertions(+), 16 deletions(-) create mode 100644 www/img/icon-proposal-pending.svg diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index c01673915..64c5b2c35 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -172,9 +172,9 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun return getMonthYear(date1) === getMonthYear(date2); } - $scope.createdWithinPastDay = function(tx) { + $scope.createdWithinPastDay = function(time) { var now = new Date(); - var date = new Date(tx.time * 1000); + var date = new Date(time * 1000); return (now.getTime() - date.getTime()) < (1000 * 60 * 60 * 24); }; @@ -187,6 +187,10 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun return date.getMonth() + date.getFullYear(); } + $scope.isUnconfirmed = function(tx) { + return !tx.time && (!tx.confirmations || tx.confirmations === 0); + }; + $scope.showMore = function() { $timeout(function() { currentTxHistoryPage++; diff --git a/src/sass/views/walletDetails.scss b/src/sass/views/walletDetails.scss index 009614072..58ece2d10 100644 --- a/src/sass/views/walletDetails.scss +++ b/src/sass/views/walletDetails.scss @@ -39,6 +39,14 @@ align-items: center; background: #fff; padding-left: 1rem; + + &__marker { + position: absolute; + height: 100%; + width: 3px; + background: #F5A623; + left: 0; + } } &__tx-content { diff --git a/www/img/icon-proposal-pending.svg b/www/img/icon-proposal-pending.svg new file mode 100644 index 000000000..6314b99ff --- /dev/null +++ b/www/img/icon-proposal-pending.svg @@ -0,0 +1,23 @@ + + + + Group + Created with Sketch. + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/www/views/includes/txp.html b/www/views/includes/txp.html index 107c0046c..6a66a5d8f 100644 --- a/www/views/includes/txp.html +++ b/www/views/includes/txp.html @@ -1,4 +1,4 @@ - + +
+ + +
+ +
+ + + {{addressbook[tx.toAddress].name || addressbook[tx.toAddress]}} + + + {{tx.message}} + + + Sending + + + + {{tx.merchant.domain}} + {{tx.merchant.domain}} + +
+ +
+
+ Confirming +
+
+ + + + + + (possible double spend) + + + {{tx.amountStr}} + + +
+ + + + +
+
+
diff --git a/www/views/tab-home.html b/www/views/tab-home.html index 865afc0bc..783442eb3 100644 --- a/www/views/tab-home.html +++ b/www/views/tab-home.html @@ -37,9 +37,13 @@ {{txpsN}} - + + +
+
+
diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index 9d933ca79..4b8e4799b 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -96,8 +96,8 @@ Payment Proposals Unsent transactions
-
- +
+
- - + + @@ -195,7 +195,7 @@
-
+
{{btx.note.body}}
Received
@@ -217,7 +217,7 @@ Invalid
-
+
Confirming
@@ -234,13 +234,13 @@
- - + + - Unconfirmed - + -->