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