mirror of https://github.com/BTCPrivate/copay.git
add notpending in proposals
This commit is contained in:
parent
d7e025c2d0
commit
8c43f55756
|
@ -1,23 +1,31 @@
|
||||||
<i class="icon ion-ios-circle-filled" ng-show="tx.pendingForUs" ng-style="{'color':tx.wallet.color}"></i>
|
|
||||||
<span ng-show="!tx.merchant">
|
|
||||||
<span ng-show="addressbook[tx.toAddress] && !tx.message">
|
|
||||||
{{addressbook[tx.toAddress]}}
|
|
||||||
</span>
|
|
||||||
<span class="ellipsis" ng-show="!addressbook[tx.toAddress] && tx.message">
|
|
||||||
{{tx.message}}
|
|
||||||
</span>
|
|
||||||
<span ng-show="!addressbook[tx.toAddress] && !tx.message" translate>
|
|
||||||
Sending
|
|
||||||
</span>
|
|
||||||
</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>
|
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<span class="ellipsis" ng-show="!addressbook[tx.toAddress] && tx.message">
|
||||||
|
{{tx.message}}
|
||||||
|
</span>
|
||||||
|
<span ng-show="!addressbook[tx.toAddress] && !tx.message" translate>
|
||||||
|
Sending
|
||||||
|
</span>
|
||||||
|
</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>
|
||||||
|
</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()">
|
<ion-content class="padding" ng-controller="proposalsController" ng-init="init()">
|
||||||
|
|
||||||
<div class="list card">
|
<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>
|
<span ng-include="'views/includes/txp.html'"></span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<span class="badge badge-assertive" ng-show="txpsN>3" translate> {{txpsN}}</span>
|
<span class="badge badge-assertive" ng-show="txpsN>3" translate> {{txpsN}}</span>
|
||||||
</a>
|
</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>
|
<span ng-include="'views/includes/txp.html'"></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,17 +7,24 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
$scope.bitpayCardEnabled = true; // TODO
|
$scope.bitpayCardEnabled = true; // TODO
|
||||||
|
|
||||||
|
|
||||||
|
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 = txps;
|
||||||
|
$scope.txpsN = n;
|
||||||
|
$ionicScrollDelegate.resize();
|
||||||
|
|
||||||
var setPendingTxps = function(txps) {
|
$timeout(function() {
|
||||||
if (!txps) {
|
$scope.$apply();
|
||||||
$scope.txps = [];
|
}, 1);
|
||||||
return;
|
})
|
||||||
}
|
|
||||||
$scope.txps = lodash.sortBy(txps, 'createdOn').reverse();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.updateAllWallets = function() {
|
$scope.updateAllWallets = function() {
|
||||||
$scope.wallets = profileService.getWallets();
|
$scope.wallets = profileService.getWallets();
|
||||||
if (lodash.isEmpty($scope.wallets)) return;
|
if (lodash.isEmpty($scope.wallets)) return;
|
||||||
|
@ -35,20 +42,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
wallet.status = status;
|
wallet.status = status;
|
||||||
}
|
}
|
||||||
if (++j==i) {
|
if (++j==i) {
|
||||||
profileService.getTxps({
|
updateTxps();
|
||||||
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);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -92,20 +86,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
}
|
}
|
||||||
$scope.notifications = notifications;
|
$scope.notifications = notifications;
|
||||||
|
|
||||||
profileService.getTxps({
|
updateTxps();
|
||||||
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);
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -908,22 +908,14 @@ angular.module('copayApp.services')
|
||||||
|
|
||||||
var txps = [];
|
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) {
|
lodash.each(w, function(x) {
|
||||||
if (x.pendingTxps)
|
if (x.pendingTxps)
|
||||||
txps = txps.concat(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);
|
txps = lodash.compact(lodash.flatten(txps)).slice(0,MAX);
|
||||||
var n = txps.length;
|
var n = txps.length;
|
||||||
return cb(null, process(txps), n);
|
return cb(null, txps, n);
|
||||||
};
|
};
|
||||||
|
|
||||||
return root;
|
return root;
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
.wallet-activity {
|
.wallet-activity {
|
||||||
|
|
||||||
|
&-not-pending {
|
||||||
|
background-color:#eee;
|
||||||
|
}
|
||||||
|
|
||||||
&-amount {
|
&-amount {
|
||||||
float: right;
|
float: right;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
|
Loading…
Reference in New Issue