mirror of https://github.com/BTCPrivate/copay.git
fix backup click
This commit is contained in:
parent
4349627f35
commit
8bb221b54b
|
@ -54,25 +54,25 @@
|
|||
|
||||
<div ng-show="wordsC.mnemonicWords">
|
||||
<div class="row">
|
||||
<div class="m10t columns" ng-init="show=false">
|
||||
<a class="button outline light-gray expand tiny" ng-click="show=!show">
|
||||
<div class="m10t columns">
|
||||
<a class="button outline light-gray expand tiny" ng-click="wordsC.toggle()">
|
||||
<i class="fi-widget m3r"></i>
|
||||
<span translate ng-hide="show" ng-click="wordsC.done()">Show Wallet Seed</span>
|
||||
<span translate ng-hide="!show">Hide Wallet Seed</span>
|
||||
<i ng-if="!show" class="icon-arrow-down4"></i>
|
||||
<i ng-if="show" class="icon-arrow-up4"></i>
|
||||
<span translate ng-hide="wordsC.show">Show Wallet Seed</span>
|
||||
<span translate ng-hide="!wordsC.show">Hide Wallet Seed</span>
|
||||
<i ng-if="!wordsC.show" class="icon-arrow-down4"></i>
|
||||
<i ng-if="wordsC.show" class="icon-arrow-up4"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row m10t m10b" ng-show="show">
|
||||
<div class="row m10t m10b" ng-show="wordsC.show">
|
||||
<div class="small-centered text-gray columns size-14 text-center" translate>
|
||||
Your Wallet Seed
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="show">
|
||||
<div class="row" ng-show="wordsC.show">
|
||||
<div class="columns">
|
||||
<div class="p10" style="background:#eee" ng-class="{'enable_text_select': index.network == 'testnet'}">
|
||||
<span ng-repeat="word in wordsC.mnemonicWords track by $index"><span style="white-space:nowrap">{{word}}</span><span ng-show="wordsC.useIdeograms"> </span> </span>
|
||||
|
@ -80,7 +80,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row m10t m20b" ng-show="show">
|
||||
<div class="row m10t m20b" ng-show="wordsC.show">
|
||||
<div class="columns" ng-show="wordsC.mnemonicHasPassphrase">
|
||||
<span class="size-12">
|
||||
<i class="fi-alert"></i>
|
||||
|
@ -91,7 +91,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="show">
|
||||
<div class="row" ng-show="wordsC.show">
|
||||
<div class="m10t text-center columns">
|
||||
<div class="size-12 text-gray">
|
||||
<span translate>
|
||||
|
|
|
@ -6,8 +6,17 @@ angular.module('copayApp.controllers').controller('wordsController',
|
|||
var msg = gettext('Are you sure you want to delete the backup words?');
|
||||
var successMsg = gettext('Backup words deleted');
|
||||
|
||||
this.done = function() {
|
||||
$rootScope.$emit('Local/BackupDone');
|
||||
this.show = false;
|
||||
|
||||
this.toggle = function() {
|
||||
this.show = !this.show;
|
||||
|
||||
if (this.show)
|
||||
$rootScope.$emit('Local/BackupDone');
|
||||
|
||||
$timeout(function(){
|
||||
$scope.$apply();
|
||||
}, 1);
|
||||
};
|
||||
|
||||
this.delete = function() {
|
||||
|
|
|
@ -808,6 +808,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
}
|
||||
|
||||
self.startScan = function(walletId) {
|
||||
$log.debug('Scanning wallet ' + walletId);
|
||||
var c = profileService.walletClients[walletId];
|
||||
if (!c.isComplete()) return;
|
||||
|
||||
|
@ -1022,8 +1023,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
|
||||
$rootScope.$on('Local/BackupDone', function(event) {
|
||||
self.needsBackup = false;
|
||||
$log.debug('Backup done');
|
||||
storageService.setBackupFlag(self.walletId, function(err) {
|
||||
if (err) root.showErrorPopup(err);
|
||||
$log.debug('Backup done stored');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -1034,6 +1037,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
$rootScope.$on('Local/WalletImported', function(event, walletId) {
|
||||
self.needsBackup = false;
|
||||
storageService.setBackupFlag(walletId, function() {
|
||||
$log.debug('Backup done stored');
|
||||
addressService.expireAddress(walletId, function(err) {
|
||||
$timeout(function() {
|
||||
self.startScan(walletId);
|
||||
|
|
Loading…
Reference in New Issue