fixes - hide tabs in backup flow
This commit is contained in:
parent
5955041547
commit
f3117cec17
5 changed files with 31 additions and 23 deletions
|
|
@ -31,7 +31,7 @@
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
<article ng-if="wallet.isComplete()">
|
<article ng-if="wallet.isComplete()">
|
||||||
<div class="row backup" ng-show="!wallet.showBackupNeededModal" ng-click="goToBackupFlow()">
|
<div class="row backup" ng-show="!wallet.showBackupNeededModal && wallet.needsBackup" ng-click="goToBackupFlow()">
|
||||||
<div class="m15t text-center col center-block">
|
<div class="m15t text-center col center-block">
|
||||||
<i class="icon ion-alert"></i><span translate>Wallet not backed up</span><i class="icon ion-ios-arrow-thin-right"></i>
|
<i class="icon ion-alert"></i><span translate>Wallet not backed up</span><i class="icon ion-ios-arrow-thin-right"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('importController',
|
angular.module('copayApp.controllers').controller('importController',
|
||||||
function($scope, $timeout, $log, $state, $stateParams, profileService, configService, sjcl, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService, popupService, gettextCatalog) {
|
function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, profileService, configService, sjcl, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService, popupService, gettextCatalog) {
|
||||||
|
|
||||||
var isChromeApp = platformInfo.isChromeApp;
|
var isChromeApp = platformInfo.isChromeApp;
|
||||||
var isDevel = platformInfo.isDevel;
|
var isDevel = platformInfo.isDevel;
|
||||||
|
|
|
||||||
|
|
@ -33,12 +33,16 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
|
|
||||||
$scope.addr = null;
|
$scope.addr = null;
|
||||||
$scope.generatingAddress = true;
|
$scope.generatingAddress = true;
|
||||||
|
$timeout(function() {
|
||||||
|
walletService.getAddress($scope.wallet, forceNew, function(err, addr) {
|
||||||
|
$scope.generatingAddress = false;
|
||||||
|
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||||
|
$scope.addr = addr;
|
||||||
|
if ($scope.wallet.showBackupNeededModal) $scope.openBackupNeededModal();
|
||||||
|
$scope.$apply();
|
||||||
|
});
|
||||||
|
}, 100);
|
||||||
|
|
||||||
walletService.getAddress($scope.wallet, forceNew, function(err, addr) {
|
|
||||||
$scope.generatingAddress = false;
|
|
||||||
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
|
|
||||||
$scope.addr = addr;
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
|
|
@ -49,13 +53,9 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
$log.debug('No wallet provided');
|
$log.debug('No wallet provided');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$timeout(function() {
|
$scope.wallet = wallet;
|
||||||
$scope.wallet = wallet;
|
$log.debug('Wallet changed: ' + wallet.name);
|
||||||
$log.debug('Wallet changed: ' + wallet.name);
|
$scope.setAddress();
|
||||||
$scope.setAddress();
|
|
||||||
if ($scope.wallet.showBackupNeededModal) $scope.openBackupNeededModal();
|
|
||||||
$scope.$apply();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -73,14 +73,17 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.openBackupNeededModal = function() {
|
$scope.openBackupNeededModal = function() {
|
||||||
$ionicModal.fromTemplateUrl('views/includes/backupNeededPopup.html', {
|
$timeout(function() {
|
||||||
scope: $scope,
|
$ionicModal.fromTemplateUrl('views/includes/backupNeededPopup.html', {
|
||||||
backdropClickToClose: false,
|
scope: $scope,
|
||||||
hardwareBackButtonClose: false
|
backdropClickToClose: false,
|
||||||
}).then(function(modal) {
|
hardwareBackButtonClose: false
|
||||||
$scope.BackupNeededModal = modal;
|
}).then(function(modal) {
|
||||||
$scope.BackupNeededModal.show();
|
$scope.BackupNeededModal = modal;
|
||||||
});
|
$scope.BackupNeededModal.show();
|
||||||
|
});
|
||||||
|
}, 100);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.close = function() {
|
$scope.close = function() {
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,10 @@ angular.module('copayApp.controllers').controller('tabsController', function($ro
|
||||||
'tabs.addressbook',
|
'tabs.addressbook',
|
||||||
'tabs.addressbook.add',
|
'tabs.addressbook.add',
|
||||||
'tabs.addressbook.view',
|
'tabs.addressbook.view',
|
||||||
|
'tabs.preferences.backupWarning',
|
||||||
|
'tabs.preferences.backup',
|
||||||
|
'tabs.receive.backupWarning',
|
||||||
|
'tabs.receive.backup',
|
||||||
];
|
];
|
||||||
|
|
||||||
$rootScope.$on('$ionicView.beforeEnter', function() {
|
$rootScope.$on('$ionicView.beforeEnter', function() {
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,8 @@ angular.module('copayApp.services')
|
||||||
});
|
});
|
||||||
|
|
||||||
_showBackupNeededModal(wallet, function(val) {
|
_showBackupNeededModal(wallet, function(val) {
|
||||||
wallet.showBackupNeededModal = val;
|
if (wallet.needsBackup) wallet.showBackupNeededModal = val;
|
||||||
|
else wallet.showBackupNeededModal = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
wallet.removeAllListeners();
|
wallet.removeAllListeners();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue