adding security popups for resume
This commit is contained in:
parent
9b21292a68
commit
8dfc2de01c
6 changed files with 42 additions and 106 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('lockSetupController', function($state, $scope, $timeout, $log, configService, gettextCatalog, fingerprintService, profileService, lodash, applicationService) {
|
||||
angular.module('copayApp.controllers').controller('lockSetupController', function($state, $rootScope, $scope, $timeout, $log, configService, gettextCatalog, fingerprintService, profileService, lodash, applicationService) {
|
||||
|
||||
function init() {
|
||||
$scope.options = [
|
||||
|
|
@ -53,7 +53,7 @@ angular.module('copayApp.controllers').controller('lockSetupController', functio
|
|||
o.disabled = false;
|
||||
});
|
||||
|
||||
// HACK: Disable untill we allow to change between methods directly
|
||||
// HACK: Disable until we allow to change between methods directly
|
||||
if (fingerprintService.isAvailable()) {
|
||||
switch (savedMethod) {
|
||||
case 'pin':
|
||||
|
|
@ -121,6 +121,7 @@ angular.module('copayApp.controllers').controller('lockSetupController', functio
|
|||
switch (method) {
|
||||
case 'pin':
|
||||
applicationService.pinModal('disable');
|
||||
initMethodSelector();
|
||||
break;
|
||||
case 'fingerprint':
|
||||
fingerprintService.check('unlockingApp', function(err) {
|
||||
|
|
@ -135,6 +136,7 @@ angular.module('copayApp.controllers').controller('lockSetupController', functio
|
|||
switch (method) {
|
||||
case 'pin':
|
||||
applicationService.pinModal('setup');
|
||||
initMethodSelector();
|
||||
break;
|
||||
case 'fingerprint':
|
||||
saveConfig('fingerprint');
|
||||
|
|
@ -155,4 +157,9 @@ angular.module('copayApp.controllers').controller('lockSetupController', functio
|
|||
initMethodSelector();
|
||||
});
|
||||
};
|
||||
|
||||
$rootScope.$on('pinModalClosed', function() {
|
||||
initMethodSelector();
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ angular.module('copayApp.controllers').controller('pinController', function($sta
|
|||
var ATTEMPT_LOCK_OUT_TIME = 5 * 60;
|
||||
var currentPin;
|
||||
currentPin = $scope.confirmPin = '';
|
||||
console.log("############################11111");
|
||||
|
||||
$scope.match = $scope.error = $scope.disableButtons = false;
|
||||
$scope.currentAttempts = 0;
|
||||
$scope.appName = appConfigService.name;
|
||||
|
||||
configService.whenAvailable(function(config) {
|
||||
if (!config.lock) return;
|
||||
$scope.bannedUntil = config.lock.bannedUntil || null;
|
||||
|
|
@ -104,8 +105,6 @@ angular.module('copayApp.controllers').controller('pinController', function($sta
|
|||
};
|
||||
|
||||
$scope.save = function() {
|
||||
console.log("##################################### CHECKING");
|
||||
console.log($scope.action);
|
||||
if (!$scope.isComplete()) return;
|
||||
var savedMethod = getSavedMethod();
|
||||
|
||||
|
|
@ -123,7 +122,6 @@ angular.module('copayApp.controllers').controller('pinController', function($sta
|
|||
break;
|
||||
case 'check':
|
||||
if (isMatch(currentPin)) {
|
||||
console.log("##################################### CHECKING");
|
||||
applicationService.successfullUnlocked = true;
|
||||
$scope.hideModal();
|
||||
return;
|
||||
|
|
@ -206,15 +204,4 @@ angular.module('copayApp.controllers').controller('pinController', function($sta
|
|||
lockTimeControl(bannedUntil);
|
||||
});
|
||||
};
|
||||
|
||||
// $scope.close = function(delay) {
|
||||
// $timeout(function() {
|
||||
// var shouldReturn = $ionicHistory.viewHistory().backView && $ionicHistory.viewHistory().backView.stateName != 'starting';
|
||||
//
|
||||
// if (shouldReturn)
|
||||
// $ionicHistory.goBack()
|
||||
// else
|
||||
// $state.go('tabs.home');
|
||||
// }, delay || 1);
|
||||
// };
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue