fix navigation top control
This commit is contained in:
parent
32a1817ccb
commit
9a806f3bab
3 changed files with 80 additions and 33 deletions
|
|
@ -7,15 +7,22 @@ angular.module('copayApp.controllers').controller('backupController',
|
|||
var fc = profileService.focusedClient;
|
||||
var customWords = [];
|
||||
var mnemonic = null;
|
||||
self.xPrivKey = null;
|
||||
self.step1 = true;
|
||||
self.step2 = false;
|
||||
self.step3 = false;
|
||||
self.step4 = false;
|
||||
self.deleted = false;
|
||||
self.credentialsEncrypted = false;
|
||||
self.selectComplete = false;
|
||||
self.backupError = false;
|
||||
|
||||
function init() {
|
||||
customWords = [];
|
||||
mnemonic = null;
|
||||
self.xPrivKey = null;
|
||||
self.step1 = true;
|
||||
self.step2 = false;
|
||||
self.step3 = false;
|
||||
self.step4 = false;
|
||||
self.deleted = false;
|
||||
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)));
|
||||
|
|
@ -729,7 +730,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
_creator = '';
|
||||
|
||||
if (it.actions && it.actions.length > 1) {
|
||||
for (var i = 0; i < it.actions.length; i++) {
|
||||
for (var i = 0; i < it.actions.length; i++) {
|
||||
_copayers += it.actions[i].copayerName + ':' + it.actions[i].type + ' - ';
|
||||
}
|
||||
_creator = (it.creatorName && it.creatorName != 'undefined') ? it.creatorName : '';
|
||||
|
|
@ -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…
Add table
Add a link
Reference in a new issue