adding loading placeholders to avoid the screen resize
This commit is contained in:
parent
03cde08a3b
commit
10986850d0
3 changed files with 126 additions and 61 deletions
|
|
@ -194,6 +194,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
if (err) $log.error(err);
|
if (err) $log.error(err);
|
||||||
$scope.txps = txps;
|
$scope.txps = txps;
|
||||||
$scope.txpsN = n;
|
$scope.txpsN = n;
|
||||||
|
$scope.txpsFinished = true;
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$ionicScrollDelegate.resize();
|
$ionicScrollDelegate.resize();
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
|
|
@ -225,6 +226,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
}
|
}
|
||||||
if (++j == i) {
|
if (++j == i) {
|
||||||
updateTxps();
|
updateTxps();
|
||||||
|
$scope.walletsFinished = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -252,6 +254,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
}
|
}
|
||||||
$scope.notifications = notifications;
|
$scope.notifications = notifications;
|
||||||
$scope.notificationsN = total;
|
$scope.notificationsN = total;
|
||||||
|
$scope.notificationsFinished = true;
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$ionicScrollDelegate.resize();
|
$ionicScrollDelegate.resize();
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,44 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.loading-block-title {
|
||||||
|
height: 20px;
|
||||||
|
width: 150px;
|
||||||
|
background:-webkit-radial-gradient(#fff, #f7f7f7);
|
||||||
|
background-size: 20px 100px;
|
||||||
|
-webkit-animation: m .6s linear infinite;
|
||||||
|
}
|
||||||
|
.loading-block-body {
|
||||||
|
width: 100%;
|
||||||
|
height: 160px;
|
||||||
|
background: -webkit-radial-gradient(#fff, #f7f7f7);
|
||||||
|
background-size: 25px 100%;
|
||||||
|
-webkit-animation: m .6s linear infinite;
|
||||||
|
}
|
||||||
|
@keyframes m {
|
||||||
|
0% {
|
||||||
|
background-position: 20px 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.card-loading-placeholder {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.loading-placeholder {
|
||||||
|
height: 100%;
|
||||||
|
.row {
|
||||||
|
height: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.animate-show-hide.ng-hide {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.animate-show-hide.ng-hide-add,
|
||||||
|
.animate-show-hide.ng-hide-remove {
|
||||||
|
transition: all linear 1s;
|
||||||
}
|
}
|
||||||
.wallet-details__item.item {
|
.wallet-details__item.item {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,31 @@
|
||||||
On this screen you can see all your wallets, accounts, and assets.
|
On this screen you can see all your wallets, accounts, and assets.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="loading-placeholder animate-show-hide" ng-show="!txpsFinished || !notificationsFinished || !walletsFinished">
|
||||||
|
<div class="row">
|
||||||
|
<div class="list card card-loading-placeholder">
|
||||||
|
<a class="item item-icon-right item-heading">
|
||||||
|
<div class="loading-block-title"></div>
|
||||||
|
<i class="icon bp-arrow-right"></i>
|
||||||
|
</a>
|
||||||
|
<a class="item">
|
||||||
|
<div class="loading-block-body"></div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="list card card-loading-placeholder">
|
||||||
|
<a class="item item-icon-right item-heading">
|
||||||
|
<div class="loading-block-title"></div>
|
||||||
|
<i class="icon bp-arrow-right"></i>
|
||||||
|
</a>
|
||||||
|
<a class="item">
|
||||||
|
<div class="loading-block-body"></div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div ng-show="txpsFinished && notificationsFinished && walletsFinished">
|
||||||
<div class="list card" ng-hide="!txps[0]">
|
<div class="list card" ng-hide="!txps[0]">
|
||||||
<a class="item item-icon-right item-heading" ui-sref="tabs.proposals">
|
<a class="item item-icon-right item-heading" ui-sref="tabs.proposals">
|
||||||
{{'Payment Proposals'|translate}}
|
{{'Payment Proposals'|translate}}
|
||||||
|
|
@ -109,6 +133,6 @@
|
||||||
<div class="ng-hide" ng-show="wallets[0] && buyAndSellItems.length>0" ng-include="'views/includes/buyAndSellCard.html'"></div>
|
<div class="ng-hide" ng-show="wallets[0] && buyAndSellItems.length>0" ng-include="'views/includes/buyAndSellCard.html'"></div>
|
||||||
<div class="ng-hide" ng-show="homeIntegrations.length>0" ng-include="'views/includes/homeIntegrations.html'"></div>
|
<div class="ng-hide" ng-show="homeIntegrations.length>0" ng-include="'views/includes/homeIntegrations.html'"></div>
|
||||||
<div class="ng-hide" ng-show="nextStepsItems.length>0" ng-include="'views/includes/nextSteps.html'"></div>
|
<div class="ng-hide" ng-show="nextStepsItems.length>0" ng-include="'views/includes/nextSteps.html'"></div>
|
||||||
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
</ion-view>
|
</ion-view>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue