mirror of https://github.com/BTCPrivate/copay.git
show full date in wallet detail list if the transaction occured more than a day ago
This commit is contained in:
parent
bddfdac0b1
commit
b0e23b7231
|
@ -172,6 +172,12 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
return getMonthYear(date1) === getMonthYear(date2);
|
||||
}
|
||||
|
||||
$scope.createdWithinPastDay = function(tx) {
|
||||
var now = new Date();
|
||||
var date = new Date(tx.time * 1000);
|
||||
return (now.getTime() - date.getTime()) < (1000 * 60 * 60 * 24);
|
||||
};
|
||||
|
||||
$scope.isDateInCurrentMonth = function(date) {
|
||||
var now = new Date();
|
||||
return getMonthYear(now) === getMonthYear(date);
|
||||
|
|
|
@ -234,7 +234,9 @@
|
|||
</span>
|
||||
</span>
|
||||
<div>
|
||||
<time class="wallet-details__tx-time" ng-if="btx.time">{{btx.time * 1000 | amTimeAgo}}</time>
|
||||
<time class="wallet-details__tx-time" ng-if="btx.time && createdWithinPastDay(btx)">{{btx.time * 1000 | amTimeAgo}}</time>
|
||||
<time class="wallet-details__tx-time" ng-if="btx.time && !createdWithinPastDay(btx)">{{btx.time * 1000 | date:'MMMM d, y'}}</time>
|
||||
|
||||
<span translate class="text-warning"
|
||||
ng-show="!btx.time && (!btx.confirmations || btx.confirmations == 0)">
|
||||
Unconfirmed
|
||||
|
|
Loading…
Reference in New Issue