mirror of https://github.com/BTCPrivate/copay.git
fix navigation top control
This commit is contained in:
parent
32a1817ccb
commit
9a806f3bab
|
@ -1,14 +1,25 @@
|
|||
<div
|
||||
class="topbar-container"
|
||||
ng-include="'views/includes/topbar.html'"
|
||||
ng-init="titleSection='Backup'; closeToHome = 'true'">
|
||||
</div>
|
||||
<div class="" ng-controller="backupController as wordsC">
|
||||
<nav class="tab-bar">
|
||||
<section class="left-small" ng-show="!wordsC.step1 && !wordsC.step4">
|
||||
<a ng-click="wordsC.goToStep();">
|
||||
<i class="icon-arrow-left3 icon-back"></i>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<div class="content preferences backup" ng-controller="backupController as wordsC">
|
||||
<h4></h4>
|
||||
<section class="middle tab-bar-section">
|
||||
</section>
|
||||
|
||||
<section class="right-small">
|
||||
<a class="p10" ng-click="$root.go(index.prevState);">
|
||||
<span class="text-close">X</span>
|
||||
</a>
|
||||
</section>
|
||||
</nav>
|
||||
|
||||
<div class="content preferences backup">
|
||||
<div class="box-notification" ng-show="wordsC.error">
|
||||
<span class="text-warning">
|
||||
{{wordsC.error|translate}}
|
||||
<span class="text-warning" translate>
|
||||
{{wordsC.error}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -169,16 +180,6 @@
|
|||
<p class="text-gray p20" translate>
|
||||
You backed up your new wallet. You can now restore this wallet at any time
|
||||
</p>
|
||||
</div>
|
||||
<div class="row m10t m10b text-center" ng-show="wordsC.backupError">
|
||||
<div class="circle-icon">
|
||||
<i class="fi-like size-48"></i>
|
||||
</div>
|
||||
<h5>Backup failed</h5>
|
||||
<p class="text-gray p20" translate>
|
||||
Failed to verify backup. Please try again
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="columns text-center m20t">
|
||||
<button
|
||||
|
@ -189,6 +190,25 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m10t m10b text-center" ng-show="wordsC.backupError">
|
||||
<div class="circle-icon">
|
||||
<i class="fi-dislike size-48"></i>
|
||||
</div>
|
||||
<h5>Backup failed</h5>
|
||||
<p class="text-gray p20" translate>
|
||||
Failed to verify backup. Please check your information
|
||||
</p>
|
||||
|
||||
<div class="columns text-center m20t">
|
||||
<button
|
||||
ng-style="{'background-color':index.backgroundColor}"
|
||||
class="button round expand"
|
||||
ng-click="$root.go(index.prevState);"
|
||||
translate>Try again
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- hide this in multisig just to show less text -->
|
||||
<div class="row m20t" ng-show="index.n==1">
|
||||
|
|
|
@ -7,6 +7,10 @@ angular.module('copayApp.controllers').controller('backupController',
|
|||
var fc = profileService.focusedClient;
|
||||
var customWords = [];
|
||||
var mnemonic = null;
|
||||
|
||||
function init() {
|
||||
customWords = [];
|
||||
mnemonic = null;
|
||||
self.xPrivKey = null;
|
||||
self.step1 = true;
|
||||
self.step2 = false;
|
||||
|
@ -16,6 +20,9 @@ angular.module('copayApp.controllers').controller('backupController',
|
|||
self.credentialsEncrypted = false;
|
||||
self.selectComplete = false;
|
||||
self.backupError = false;
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
if (fc.credentials && !fc.credentials.mnemonicEncrypted && !fc.credentials.mnemonic)
|
||||
self.deleted = true;
|
||||
|
@ -33,6 +40,21 @@ angular.module('copayApp.controllers').controller('backupController',
|
|||
return mnemonic;
|
||||
}
|
||||
|
||||
self.goToStep = function() {
|
||||
if (self.step2) {
|
||||
self.goToStep1();
|
||||
} else if (self.step3) {
|
||||
self.goToStep2();
|
||||
}
|
||||
}
|
||||
|
||||
self.goToStep1 = function() {
|
||||
init();
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 1);
|
||||
}
|
||||
|
||||
self.goToStep2 = function() {
|
||||
self.step1 = false;
|
||||
self.step2 = true;
|
||||
|
|
|
@ -9,6 +9,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
self.onGoingProcess = {};
|
||||
self.historyShowLimit = 10;
|
||||
self.updatingTxHistory = {};
|
||||
self.prevState = 'walletHome';
|
||||
|
||||
function strip(number) {
|
||||
return (parseFloat(number.toPrecision(12)));
|
||||
|
@ -1097,6 +1098,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
});
|
||||
};
|
||||
|
||||
$rootScope.$on('$stateChangeSuccess', function(ev, to, toParams, from, fromParams) {
|
||||
self.prevState = from.name || 'walletHome';
|
||||
});
|
||||
|
||||
$rootScope.$on('Local/ClearHistory', function(event) {
|
||||
$log.debug('The wallet transaction history has been deleted');
|
||||
self.txHistory = self.completeHistory = [];
|
||||
|
|
Loading…
Reference in New Issue