Update: Adds a Bitcoin Core Wallet setting which hides BTC wallets when disabled

This commit is contained in:
Sam Cheng Hung 2018-03-27 11:30:34 +09:00
commit 780951eb2f
12 changed files with 108 additions and 9 deletions

View file

@ -29,6 +29,15 @@
<ion-toggle ng-model="hideNextSteps.value" ng-if="!isWindowsPhoneApp" toggle-class="toggle-balanced" ng-change="nextStepsChange()">
<span class="toggle-label" translate>Hide Next Steps Card</span>
</ion-toggle>
<div class="item item-divider"></div>
<ion-toggle class="has-comment" ng-model="displayBitcoinCoreEnabled.value" toggle-class="toggle-balanced" ng-change="displayBitcoinCoreChange()">
<span class="toggle-label" translate>Bitcoin Core Wallet</span>
</ion-toggle>
<div class="comment" translate>
If enabled, Bitcoin Core (BTC) wallet(s) will be displayed on the Home screen. If disabled, BTC wallets will be not be deleted, only hidden.
</div>
</div>
</ion-content>
</ion-view>

View file

@ -37,13 +37,14 @@
</div>
</a>
<div class="subheader" ng-if="walletsBtc[0] && walletsBch[0]" translate>
<div class="subheader" ng-if="walletsBtc[0] && walletsBch[0] && displayWallet" translate>
<img class="wallet-coin-logo" src="img/icon-bitcoin.svg" width="18">
<span translate>Bitcoin Core (BTC)</span>
</div>
<a
ng-repeat="wallet in walletsBtc track by $index"
class="item item-icon-left item-big-icon-left item-icon-right wallet"
ng-show="displayWallet"
ng-click="selectWallet(wallet)"
>
<i class="icon big-icon-svg" ng-include="'views/includes/walletIcon.html'"></i>

View file

@ -99,7 +99,8 @@ wallet-selector-title="fromWalletSelectorTitle"
wallet-selector-wallets="fromWallets"
wallet-selector-selected-wallet="fromWallet"
wallet-selector-show="showFromWallets"
wallet-selector-on-select="onFromWalletSelect">
wallet-selector-on-select="onFromWalletSelect"
wallet-selector-always-display-bitcoin-core="true">
</wallet-selector>
<wallet-selector
@ -107,6 +108,7 @@ wallet-selector-title="toWalletSelectorTitle"
wallet-selector-wallets="toWallets"
wallet-selector-selected-wallet="toWallet"
wallet-selector-show="showToWallets"
wallet-selector-on-select="onToWalletSelect">
wallet-selector-on-select="onToWalletSelect"
wallet-selector-always-display-bitcoin-core="true">
</wallet-selector>
</ion-view>

View file

@ -78,7 +78,8 @@
</div>
</div>
<div class="list card">
<div class="list card"
ng-show="displayBitcoinCore">
<div class="item item-icon-right item-heading">
<img class="wallet-coin-logo" src="img/icon-bitcoin.svg" width="18">
<span translate>Bitcoin Core (BTC)</span>

View file

@ -70,7 +70,11 @@
<span translate>Transfer to Wallet</span>
</div>
<div class="list">
<a class="item item-icon-left item-icon-right" ng-repeat="item in list" ng-if="hasWallets && item.recipientType == 'wallet'" ng-click="goToAmount(item)">
<a class="item item-icon-left item-icon-right"
ng-repeat="item in list"
ng-if="hasWallets && item.recipientType == 'wallet'"
ng-click="goToAmount(item)"
ng-show="item.displayWallet">
<i class="icon big-icon-svg" ng-if="item.recipientType == 'wallet'" ng-init="wallet = item" ng-include="'views/includes/walletIcon.html'"></i>
{{item.name}}
<p>