Merge pull request #3638 from matiu/feat/animation-when-new-tx

feat/animation-when-new-tx
This commit is contained in:
Gustavo Maximiliano Cortez 2015-12-10 12:53:40 -03:00
commit 8d4620cf74
3 changed files with 20 additions and 6 deletions

View File

@ -12,5 +12,5 @@
<!-- <img style="height:1em" ng&#45;show="index.preferences.email" src="img/icon&#45;email.svg"> --> <!-- <img style="height:1em" ng&#45;show="index.preferences.email" src="img/icon&#45;email.svg"> -->
<img style="height:1em" ng-show="index.usingCustomBWS" src="img/icon-bws.svg"> <img style="height:1em" ng-show="index.usingCustomBWS" src="img/icon-bws.svg">
<img style="height:1em" class="animated flash infinite" ng-show="index.loadingWallet" src="img/icon-sync.svg"> <img style="height:1em" class="animated flash infinite" ng-show="index.loadingWallet || index.updatingTxHistory[index.walletId]" src="img/icon-sync.svg">

View File

@ -187,7 +187,8 @@
</div> </div>
</div> </div>
</div> </div>
<div ng-show="index.updatingTxHistory[index.walletId] && index.txProgress > 6"> <div ng-show="index.updatingTxHistory[index.walletId]
&& ( (index.txProgress > 6 && !index.txHistory[0]) || (index.txProgress > 50 ) )">
<div class="row p20 text-center"> <div class="row p20 text-center">
<div class="columns large-12 medium-12 small-12 m10b"> <div class="columns large-12 medium-12 small-12 m10b">
<div class="spinner"> <div class="spinner">
@ -208,10 +209,23 @@
<div ng-show="index.txHistory[0]"> <div ng-show="index.txHistory[0]">
<h4 class="title m0"> <h4 class="title m0">
<span translate>Activity</span> <span translate>Activity</span>
<small ng-show="index.updatingTxHistory[index.walletId] && !index.loadingWallet" translate>
Updating...
</small>
</h4> </h4>
<div ng-if="index.txHistory[0] && index.updatingTxHistory[index.walletId]" class="row collapse last-transactions-content animated fadeInDown">
<div class="large-6 medium-6 small-6 columns size-14">
<div class="m10r left">
<img src="img/icon-new.svg" width="40">
</div>
<div class="m10t" style="background:#eee; width: 8em; margin-left: 52px; line-height:0.6em">
<span>&nbsp;</span>
</div>
<div style="margin-top:5px; background:#eee; width: 6em; margin-left: 52px; line-height:0.6em">
<span>&nbsp;</span>
</div>
</div>
</div>
<div ng-repeat="btx in index.txHistory" <div ng-repeat="btx in index.txHistory"
ng-click="home.openTxModal(btx)" ng-click="home.openTxModal(btx)"

View File

@ -855,7 +855,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
fixTxsUnit(txsFromLocal); fixTxsUnit(txsFromLocal);
function getNewTxs(newTxs, skip, i_cb) { function getNewTxs(newTxs, skip, i_cb) {
self.getTxsFromServer(client, skip, endingTxid, requestLimit, function(err, res, shouldContinue) { self.getTxsFromServer(client, skip, endingTxid, requestLimit, function(err, res, shouldContinue) {
if (err) return i_cb(err); if (err) return i_cb(err);
@ -882,6 +881,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
getNewTxs([], 0, function(err, txs) { getNewTxs([], 0, function(err, txs) {
if (err) return cb(err); if (err) return cb(err);
var newHistory = lodash.compact(txs.concat(txsFromLocal)); var newHistory = lodash.compact(txs.concat(txsFromLocal));
$log.debug('Tx History synced. Total Txs: ' + newHistory.length); $log.debug('Tx History synced. Total Txs: ' + newHistory.length);