Fixes Android presentation of the balance button.
This commit is contained in:
parent
4e3bc918fc
commit
dd25901d19
2 changed files with 35 additions and 8 deletions
|
|
@ -269,6 +269,16 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
};
|
||||
|
||||
function refreshAmountSection(scrollPos) {
|
||||
$scope.showBalanceButton = false;
|
||||
if ($scope.wallet.status) {
|
||||
$scope.showBalanceButton = ($scope.wallet.status.totalBalanceSat != $scope.wallet.status.spendableAmount);
|
||||
}
|
||||
if (!$scope.amountIsCollapsible) {
|
||||
var t = ($scope.showBalanceButton ? 15 : 45);
|
||||
$scope.amountScale = 'translateY(' + t + 'px)';
|
||||
return;
|
||||
}
|
||||
|
||||
scrollPos = scrollPos || 0;
|
||||
var amountHeight = 210 - scrollPos;
|
||||
if (amountHeight < 80) {
|
||||
|
|
@ -290,18 +300,16 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
var s = amountScale;
|
||||
|
||||
// Make space for the balance button when it needs to display.
|
||||
var TOP_NO_BALANCE_BUTTON = 45;
|
||||
var TOP_BALANCE_BUTTON = 10;
|
||||
var TOP_NO_BALANCE_BUTTON = 115;
|
||||
var TOP_BALANCE_BUTTON = 30;
|
||||
var top = TOP_NO_BALANCE_BUTTON;
|
||||
$scope.showBalanceButton = ($scope.wallet.status.totalBalanceSat != $scope.wallet.status.spendableAmount);
|
||||
if ($scope.showBalanceButton) {
|
||||
top = TOP_BALANCE_BUTTON;
|
||||
$scope.showBalanceButton = true;
|
||||
}
|
||||
|
||||
var amountTop = ((amountScale - 0.5) / 0.5) * top;
|
||||
if (amountTop < 5) {
|
||||
amountTop = 5;
|
||||
var amountTop = ((amountScale - 0.7) / 0.7) * top;
|
||||
if (amountTop < -10) {
|
||||
amountTop = -10;
|
||||
}
|
||||
if (amountTop > top) {
|
||||
amountTop = top;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
ng-show="!updateStatusError && wallet.walletScanStatus != 'error' && !wallet.balanceHidden"
|
||||
on-hold="hideToggle()"
|
||||
ng-style="{'transform': amountScale}"
|
||||
class="amount__balance">
|
||||
ng-class="{amount__balance: amountIsCollapsible}">
|
||||
<strong class="size-36">{{status.totalBalanceStr}}</strong>
|
||||
<div
|
||||
class="size-14 amount-alternative"
|
||||
|
|
@ -121,6 +121,25 @@
|
|||
<span class="size-12 db m10" 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()" ng-style="{'transform': amountScale}">
|
||||
<strong class="size-36">{{status.totalBalanceStr}}</strong>
|
||||
<div class="size-14 amount-alternative" ng-if="status.totalBalanceAlternative">{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="!wallet.balanceHidden && showBalanceButton" ng-style="{'opacity': altAmountOpacity, 'transform': amountScale}">
|
||||
<button class="button button-standard button-primary amount__button-balance size-14" ng-click="openBalanceModal()">
|
||||
<i class="icon ion-ios-checkmark-outline"></i>
|
||||
<strong>
|
||||
{{status.spendableBalanceStr}}
|
||||
</strong>
|
||||
|
||||
<span>
|
||||
{{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div ng-show="!updateStatusError && wallet.balanceHidden" on-hold="hideToggle()">
|
||||
<strong class="size-24" translate>[Balance Hidden]</strong>
|
||||
<div class="size-14" translate>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue