mirror of https://github.com/BTCPrivate/copay.git
hide border for last tx in group
This commit is contained in:
parent
155697e087
commit
ccdad2c6e4
|
@ -157,7 +157,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
return date;
|
||||
};
|
||||
|
||||
$scope.showGroupHeader = function(index) {
|
||||
$scope.isFirstInGroup = function(index) {
|
||||
if(index === 0) {
|
||||
return true;
|
||||
}
|
||||
|
@ -166,6 +166,13 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
return !createdDuringSameMonth(curTx, prevTx);
|
||||
};
|
||||
|
||||
$scope.isLastInGroup = function(index) {
|
||||
if(index === $scope.txHistory.length - 1) {
|
||||
return true;
|
||||
}
|
||||
return $scope.isFirstInGroup(index + 1);
|
||||
};
|
||||
|
||||
function createdDuringSameMonth(tx1, tx2) {
|
||||
var date1 = new Date(tx1.time * 1000);
|
||||
var date2 = new Date(tx2.time * 1000);
|
||||
|
|
|
@ -61,6 +61,10 @@
|
|||
padding-right: 1rem;
|
||||
border-bottom: 1px solid rgb(245, 245, 245);
|
||||
overflow: hidden;
|
||||
|
||||
&.no-border {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&__tx-amount {
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
|
||||
<div class="wallet-details__list" ng-show="txHistory[0]">
|
||||
<div ng-repeat="btx in txHistory track by $index" ng-click="openTxModal(btx)">
|
||||
<div class="wallet-details__group-label" ng-if="showGroupHeader($index)">
|
||||
<div class="wallet-details__group-label" ng-if="isFirstInGroup($index)">
|
||||
<span ng-if="isDateInCurrentMonth(getDate(btx.time))">
|
||||
Recent
|
||||
</span>
|
||||
|
@ -197,7 +197,7 @@
|
|||
<img class="wallet-details__tx-icon" src="img/icon-tx-moved.svg" width="40" ng-if="btx.action == 'moved'">
|
||||
</span>
|
||||
|
||||
<div class="wallet-details__tx-content">
|
||||
<div class="wallet-details__tx-content" ng-class="{'no-border': isLastInGroup($index)}">
|
||||
|
||||
<div class="wallet-details__tx-title" ng-if="!isUnconfirmed(btx)">
|
||||
<div ng-show="btx.action == 'received'" class="ellipsis">
|
||||
|
|
Loading…
Reference in New Issue