Fixed layout, relative time. Standardize on use of timeService.
This commit is contained in:
parent
59edea271b
commit
ae777d6639
10 changed files with 40 additions and 34 deletions
|
|
@ -163,7 +163,7 @@ angular.module('copayApp.controllers').controller('bitpayCardController', functi
|
|||
runningBalance -= parseFloat(tx.amount);
|
||||
};
|
||||
|
||||
this.withinPastDay = function(tx) {
|
||||
$scope.createdWithinPastDay = function(tx) {
|
||||
var result = false;
|
||||
if (tx.timestamp) {
|
||||
result = timeService.withinPastDay(tx.timestamp);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('proposalsController',
|
||||
function($timeout, $scope, profileService, $log, txpModalService, addressbookService) {
|
||||
function($timeout, $scope, profileService, $log, txpModalService, addressbookService, timeService) {
|
||||
|
||||
$scope.fetchingProposals = true;
|
||||
|
||||
|
|
@ -27,8 +27,6 @@ angular.module('copayApp.controllers').controller('proposalsController',
|
|||
$scope.openTxpModal = txpModalService.open;
|
||||
|
||||
$scope.createdWithinPastDay = function(time) {
|
||||
var now = new Date();
|
||||
var date = new Date(time * 1000);
|
||||
return (now.getTime() - date.getTime()) < (1000 * 60 * 60 * 24);
|
||||
return timeService.withinPastDay(time);
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -131,9 +131,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
});
|
||||
|
||||
$scope.createdWithinPastDay = function(time) {
|
||||
var now = new Date();
|
||||
var date = new Date(time * 1000);
|
||||
return (now.getTime() - date.getTime()) < (1000 * 60 * 60 * 24);
|
||||
return timeService.withinPastDay(time);
|
||||
};
|
||||
|
||||
$scope.openExternalLink = function() {
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
};
|
||||
|
||||
$scope.createdDuringSameMonth = function(curTx, prevTx) {
|
||||
return timeService.withinSameMonth(curTx.time, prevTx.time);
|
||||
return timeService.withinSameMonth(curTx.time * 1000, prevTx.time * 1000);
|
||||
};
|
||||
|
||||
$scope.createdWithinPastDay = function(time) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue