Merge pull request #6751 from cmgustavo/bug/balance-view-android-bug

Fix Android compatibility: walletDetails view
This commit is contained in:
Javier Donadío 2017-09-18 14:22:58 -03:00 committed by GitHub
commit 881679cd48
2 changed files with 75 additions and 1 deletions

View file

@ -1,5 +1,5 @@
<div class="actions" ng-show="(walletNotRegistered || updateStatusError) && !(updatingStatus || updatingTxHistory)">
<div class="actions" ng-show="(walletNotRegistered || updateStatusError)">
<a ng-show="walletNotRegistered" ng-click="recreate()" translate>Tap to recreate</a>
<a ng-show="updateStatusError" ng-click="updateAll(true)" translate>Tap to retry</a>
</div>

View file

@ -92,6 +92,80 @@
on-refresh="onRefresh()">
</ion-refresher>
<!-- Start Balance view duplicate (for Android compatibility) -->
<div class="amount-wrapper" ng-show="wallet && wallet.isComplete() && !amountIsCollapsible" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color':wallet.color}">
<div
ng-style="{'background-color':wallet.color, 'height': amountHeight}"
class="amount"
ng-class="{collapsible: amountIsCollapsible, 'wallet-background-color-default': !wallet.color, 'no-alternative': wallet.network != 'livenet'}"
>
<div class="amount__error" ng-style="{opacity: altAmountOpacity}" ng-show="updateStatusError">
<span>{{updateStatusError}}</span>
</div>
<div class="amount__error" ng-style="{opacity: altAmountOpacity}" ng-show="walletNotRegistered">
<span translate>This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information.</span>
</div>
<div
ng-click='updateAll(true)'
ng-show="!updateStatusError && !wallet.balanceHidden && !wallet.scanning"
on-hold="hideToggle()"
ng-style="{'transform': amountScale}"
ng-class="{amount__balance: amountIsCollapsible}">
<strong class="size-36">{{status.totalBalanceStr}}</strong>
<div
class="size-14 amount-alternative"
ng-if="status.totalBalanceAlternative && wallet.network == 'livenet'"
ng-style="{opacity: altAmountOpacity}">
{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
</div>
</div>
<div ng-style="{'transform': amountScale}"
class="amount__balance"
ng-show="!updateStatusError && wallet.balanceHidden && !wallet.scanning"
on-hold="hideToggle()">
<strong class="size-24" translate>[Balance Hidden]</strong>
<div ng-style="{opacity: altAmountOpacity}" class="size-14 amount-alternative" translate>
Tap and hold to show
</div>
</div>
<div ng-style="{'transform': amountScale}"
class="amount__balance"
ng-show="wallet.scanning">
<strong class="size-24" translate>[Scanning Funds]</strong>
<div ng-style="{opacity: altAmountOpacity}" class="size-14 amount-alternative" translate>
Please wait
</div>
</div>
<div ng-if="!wallet.balanceHidden && !wallet.scanning && 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>
&nbsp;
<span>
{{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
</span>
</button>
</div>
</div>
<div class="wallet-details-wallet-info" ng-style="{opacity: altAmountOpacity}">
<span ng-include="'views/includes/walletInfo.html'"></span>
</div>
</div>
<!-- End Balance view duplicate (for Android compatibility) -->
<a class="wallet-not-backed-up-warning" ng-if="wallet.needsBackup" ui-sref="tabs.wallet.backupWarning({from: 'tabs.wallet'})" translate>
Wallet not backed up
</a>