mirror of https://github.com/BTCPrivate/copay.git
add notpending in proposals
This commit is contained in:
parent
d7e025c2d0
commit
8c43f55756
|
@ -1,5 +1,6 @@
|
|||
<i class="icon ion-ios-circle-filled" ng-show="tx.pendingForUs" ng-style="{'color':tx.wallet.color}"></i>
|
||||
<span ng-show="!tx.merchant">
|
||||
|
||||
<div class="wallet-activity" ng-class="{'wallet-activity-not-pending':!tx.pendingForUs}">
|
||||
<span ng-show="!tx.merchant">
|
||||
<span ng-show="addressbook[tx.toAddress] && !tx.message">
|
||||
{{addressbook[tx.toAddress]}}
|
||||
</span>
|
||||
|
@ -9,15 +10,22 @@
|
|||
<span ng-show="!addressbook[tx.toAddress] && !tx.message" translate>
|
||||
Sending
|
||||
</span>
|
||||
</span>
|
||||
<span ng-show="tx.merchant">
|
||||
</span>
|
||||
<span ng-show="tx.merchant">
|
||||
<span ng-show="tx.merchant.pr.ca"><i class="fi-lock"></i> {{tx.merchant.domain}}</span>
|
||||
<span ng-show="!tx.merchant.pr.ca"><i class="fi-unlock"></i> {{tx.merchant.domain}}</span>
|
||||
</span>
|
||||
<span>
|
||||
- {{tx.amountStr}}
|
||||
</span>
|
||||
<div class="item-note">
|
||||
{{tx.wallet.name}} · <time>{{ (tx.ts || tx.createdOn ) * 1000 | amTimeAgo}}</time>
|
||||
</div>
|
||||
</span>
|
||||
<span>
|
||||
</span>
|
||||
|
||||
<div class="wallet-activity-amount">
|
||||
{{tx.amountStr}}
|
||||
</div>
|
||||
|
||||
|
||||
<p class="wallet-activity-note">
|
||||
<i class="icon ion-record wallet-activity-note-child" ng-style="{'color':tx.wallet.color}"></i>
|
||||
<span class="wallet-activity-note-child">{{tx.wallet.name}}</span>
|
||||
<time class="wallet-activity-note-child">{{tx.createdOn * 1000 | amTimeAgo}}</time>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<ion-content class="padding" ng-controller="proposalsController" ng-init="init()">
|
||||
|
||||
<div class="list card">
|
||||
<a ng-repeat="tx in txps" class="item item-icon-left" ng-click="openTxpModal(tx)">
|
||||
<a ng-repeat="tx in txps" class="item" ng-click="openTxpModal(tx)">
|
||||
<span ng-include="'views/includes/txp.html'"></span>
|
||||
</a>
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<span class="badge badge-assertive" ng-show="txpsN>3" translate> {{txpsN}}</span>
|
||||
</a>
|
||||
|
||||
<a ng-repeat="tx in txps" class="item item-icon-left" ng-click="openTxpModal(tx)">
|
||||
<a ng-repeat="tx in txps" class="item" ng-click="openTxpModal(tx)">
|
||||
<span ng-include="'views/includes/txp.html'"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -7,15 +7,22 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
$scope.bitpayCardEnabled = true; // TODO
|
||||
|
||||
|
||||
|
||||
var setPendingTxps = function(txps) {
|
||||
if (!txps) {
|
||||
$scope.txps = [];
|
||||
return;
|
||||
function updateTxps() {
|
||||
profileService.getTxps({
|
||||
limit: 3
|
||||
}, function(err, txps, n) {
|
||||
if (err) {
|
||||
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
|
||||
}
|
||||
$scope.txps = lodash.sortBy(txps, 'createdOn').reverse();
|
||||
};
|
||||
$scope.txps = txps;
|
||||
$scope.txpsN = n;
|
||||
$ionicScrollDelegate.resize();
|
||||
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 1);
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
$scope.updateAllWallets = function() {
|
||||
|
@ -35,20 +42,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
wallet.status = status;
|
||||
}
|
||||
if (++j==i) {
|
||||
profileService.getTxps({
|
||||
limit: 3
|
||||
}, function(err, txps, n) {
|
||||
if (err) {
|
||||
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
|
||||
}
|
||||
$scope.txps = txps;
|
||||
$scope.txpsN = n;
|
||||
$ionicScrollDelegate.resize();
|
||||
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 1);
|
||||
});
|
||||
updateTxps();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -92,20 +86,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
}
|
||||
$scope.notifications = notifications;
|
||||
|
||||
profileService.getTxps({
|
||||
limit: 3
|
||||
}, function(err, txps, n) {
|
||||
if (err) {
|
||||
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
|
||||
}
|
||||
$scope.txps = txps;
|
||||
$scope.txpsN = n;
|
||||
$ionicScrollDelegate.resize();
|
||||
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 1);
|
||||
})
|
||||
updateTxps();
|
||||
})
|
||||
});
|
||||
};
|
||||
|
|
|
@ -908,22 +908,14 @@ angular.module('copayApp.services')
|
|||
|
||||
var txps = [];
|
||||
|
||||
function process(notifications) {
|
||||
if (!notifications) return [];
|
||||
|
||||
var shown = lodash.sortBy(notifications, 'createdOn').reverse();
|
||||
shown = shown.splice(0, opts.limit || MAX);
|
||||
return shown;
|
||||
};
|
||||
|
||||
lodash.each(w, function(x) {
|
||||
if (x.pendingTxps)
|
||||
txps = txps.concat(x.pendingTxps);
|
||||
});
|
||||
txps = lodash.sortBy(txps, 'createdOn');
|
||||
txps = lodash.sortBy(txps, 'pendingForUs', 'createdOn');
|
||||
txps = lodash.compact(lodash.flatten(txps)).slice(0,MAX);
|
||||
var n = txps.length;
|
||||
return cb(null, process(txps), n);
|
||||
return cb(null, txps, n);
|
||||
};
|
||||
|
||||
return root;
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
.wallet-activity {
|
||||
|
||||
&-not-pending {
|
||||
background-color:#eee;
|
||||
}
|
||||
|
||||
&-amount {
|
||||
float: right;
|
||||
font-size: 18px;
|
||||
|
|
Loading…
Reference in New Issue