mirror of https://github.com/BTCPrivate/copay.git
tap to lock balance
This commit is contained in:
parent
82558a1696
commit
efa36915e1
|
@ -85,7 +85,7 @@
|
|||
<br><span translate>Tap to retry</span>
|
||||
</div>
|
||||
|
||||
<div ng-click='index.updateAll({triggerTxUpdate: true})' ng-show="!index.updateError && index.walletScanStatus != 'error'">
|
||||
<div ng-click='index.updateAll({triggerTxUpdate: true})' ng-show="!index.updateError && index.walletScanStatus != 'error' && !index.shouldHideBalance" on-hold="index.onHold()">
|
||||
<strong class="size-36">{{index.totalBalanceStr}}</strong>
|
||||
<div class="size-14"
|
||||
ng-if="index.totalBalanceAlternative">
|
||||
|
@ -98,6 +98,12 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<div ng-show="index.shouldHideBalance" on-hold="index.onHold()">
|
||||
<strong class="size-24" translate>[Balance Hidden]</strong>
|
||||
<div class="size-14" transalate>
|
||||
Tap and hold to show
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="index.anyOnGoingProcess">
|
||||
|
@ -396,7 +402,7 @@
|
|||
<div id="send" class="send tab-view">
|
||||
<div class="pr p25b">
|
||||
<h4 class="title m0">
|
||||
<available-balance></available-balance>
|
||||
<available-balance ng-show="!index.shouldHideBalance"></available-balance>
|
||||
<span
|
||||
ng-show="home.lockedCurrentFeePerKb || home.blockUx || home.lockAmount"
|
||||
class="text-gray" translate>Send Max</span>
|
||||
|
|
|
@ -69,6 +69,18 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
go.walletHome();
|
||||
};
|
||||
|
||||
self.hideBalance = function() {
|
||||
storageService.getHideBalanceFlag(self.walletId, function(err, shouldHideBalance) {
|
||||
if (err) self.shouldHideBalance = false;
|
||||
else self.shouldHideBalance = (shouldHideBalance == 'true') ? true : false;
|
||||
});
|
||||
}
|
||||
|
||||
self.onHold = function(){
|
||||
self.shouldHideBalance = !self.shouldHideBalance;
|
||||
storageService.setHideBalanceFlag(self.walletId, self.shouldHideBalance, function() {});
|
||||
}
|
||||
|
||||
self.setOngoingProcess = function(processName, isOn) {
|
||||
$log.debug('onGoingProcess', processName, isOn);
|
||||
self[processName] = isOn;
|
||||
|
@ -153,6 +165,8 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
self.initGlidera();
|
||||
self.initCoinbase();
|
||||
|
||||
self.hideBalance();
|
||||
|
||||
self.setCustomBWSFlag();
|
||||
|
||||
if (!self.isComplete) {
|
||||
|
|
|
@ -200,6 +200,14 @@ angular.module('copayApp.services')
|
|||
storage.remove('config', cb);
|
||||
};
|
||||
|
||||
root.setHideBalanceFlag = function(walletId, val, cb) {
|
||||
storage.set('hideBalance-' + walletId, val, cb);
|
||||
};
|
||||
|
||||
root.getHideBalanceFlag = function(walletId, cb) {
|
||||
storage.get('hideBalance-' + walletId, cb);
|
||||
};
|
||||
|
||||
//for compatibility
|
||||
root.getCopayDisclaimerFlag = function(cb) {
|
||||
storage.get('agreeDisclaimer', cb);
|
||||
|
|
Loading…
Reference in New Issue