disable amount collapsibility on android

This commit is contained in:
Marty Alcala 2016-11-14 18:26:45 -05:00
commit d3d15ea887
3 changed files with 68 additions and 8 deletions

View file

@ -12,6 +12,8 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
$scope.isAndroid = platformInfo.isAndroid;
$scope.isIOS = platformInfo.isIOS;
$scope.amountIsCollapsible = !$scope.isAndroid;
$scope.openExternalLink = function(url, target) {
externalLinkService.open(url, target);
};
@ -279,7 +281,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
var scrollWatcherInitialized;
$scope.$on("$ionicView.enter", function(event, data) {
if(scrollWatcherInitialized) {
if(scrollWatcherInitialized || !$scope.amountIsCollapsible) {
return;
}
scrollWatcherInitialized = true;

View file

@ -123,7 +123,11 @@
background-color: inherit !important;
}
ion-content {
margin-top: 180px;
&.collapsible {
margin-top: 180px;
}
padding-top: 0;
top: 0;
.scroll {
@ -150,12 +154,15 @@
text-align: center;
color: #fff;
height: 180px;
margin-bottom: 10px;
padding-top: 40px;
display: flex;
align-items: center;
justify-content: center;
&.collapsible {
margin-bottom: 10px;
}
&__balance {
transform: scale3d(1, 1, 1);
margin-top: 5px;

View file

@ -13,12 +13,16 @@
<div class="bp-content" ng-class="{'status-bar': isCordova && isIOS}">
<div class="amount-wrapper" ng-show="wallet && wallet.isComplete()" ng-style="{'background-color':wallet.color}">
<div class="amount-wrapper" ng-show="wallet && wallet.isComplete() && amountIsCollapsible" ng-style="{'background-color':wallet.color}">
<div
class="amount-bg"
ng-style="{'background-color':wallet.color}"
></div>
<div ng-style="{'background-color':wallet.color, 'height': amountHeight}" class="amount">
<div
ng-style="{'background-color':wallet.color, 'height': amountHeight}"
class="amount"
ng-class="{collapsible: amountIsCollapsible}"
>
<div ng-if="!notAuthorized && !updatingStatus">
<div ng-show="updateStatusError">
@ -69,13 +73,14 @@
<strong>...</strong>
</div>
</div>
</div> <!-- amount -->
</div>
<div class="wallet-details-wallet-info" ng-style="{opacity: altAmountOpacity}">
<span ng-include="'views/includes/walletInfo.html'"></span>
</div>
</div> <!-- oh -->
<ion-content ng-style="{'margin-top': contentMargin}">
</div>
<ion-content ng-style="{'margin-top': contentMargin}" ng-class="{collapsible: amountIsCollapsible}">
<ion-refresher
ng-if="isAndroid"
pulling-icon="ion-ios-refresh"
@ -83,6 +88,52 @@
on-refresh="onRefresh()">
</ion-refresher>
<div class="oh pr" ng-show="wallet && wallet.isComplete() && !amountIsCollapsible">
<div
ng-style="{'background-color':wallet.color}"
class="amount"
ng-class="{'collapsible': amountIsCollapsible}"
>
<div ng-if="!updatingStatus">
<div ng-show="updateStatusError">
<span class="size-12 db m10b">{{updateStatusError}}</span>
<a class="button button-outline button-light button-small" ng-click='updateAll()' translate>Tap to retry</a>
</div>
<div ng-show="walletNotRegistered">
<span class="size-12 db m10b" translate>This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information.</span>
<a class="button button-outline button-light button-small" ng-click='recreate()' translate>Recreate</a>
</div>
<div ng-click='updateAll(true)' ng-show="!updateStatusError && !wallet.balanceHidden" on-hold="hideToggle()">
<strong ng-if="!status.pendingAmount" class="size-36">{{status.totalBalanceStr}}</strong>
<div ng-if="!status.pendingAmount" class="size-14 amount-alternative" ng-if="status.totalBalanceAlternative">{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}</div>
<div class="size-20" ng-if="status.pendingAmount">
<div style="margin-bottom:.5rem"><span translate>Available</span>: {{status.totalBalanceStr}}</div>
<div><span translate>Confirming</span>: {{status.pendingAmountStr}}</div>
</div>
</div>
<div ng-show="!updateStatusError && wallet.balanceHidden" on-hold="hideToggle()">
<strong class="size-24" translate>[Balance Hidden]</strong>
<div class="size-14" translate>
Tap and hold to show
</div>
</div>
</div>
<div ng-if="updatingStatus">
<div class="size-36">
<strong>...</strong>
</div>
</div>
</div> <!-- amount -->
<div class="wallet-details-wallet-info">
<span ng-include="'views/includes/walletInfo.html'"></span>
</div>
</div> <!-- oh -->
<a class="wallet-not-backed-up-warning" ng-show="!isBackedUp" ng-click="backup()">
Wallet not backed up
</a>