Forgot passcode lock option

This commit is contained in:
Mo Bitar
2018-04-29 12:43:29 -05:00
parent abb9521472
commit 36f27301ea
3 changed files with 32 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ class LockScreen {
};
}
controller($scope, passcodeManager) {
controller($scope, passcodeManager, authManager, syncManager) {
'ngInject';
$scope.formData = {};
@@ -23,6 +23,21 @@ class LockScreen {
$scope.onSuccess()();
})
}
$scope.forgotPasscode = function() {
$scope.formData.showRecovery = true;
}
$scope.beginDeleteData = function() {
if(!confirm("Are you sure you want to clear all local data?")) {
return;
}
authManager.signOut();
syncManager.destroyLocalData(function(){
window.location.reload();
})
}
}
}

View File

@@ -31,4 +31,11 @@
justify-content: center;
}
}
#passcode-reset {
margin-top: 18px;
text-align: center;
width: 100%;
font-size: 13px;
}
}

View File

@@ -12,3 +12,12 @@
.button-group.stretch.panel-row.form-submit
%button.button.info{"type" => "submit"}
.label Unlock
#passcode-reset
%a.default{"ng-if" => "!formData.showRecovery", "ng-click" => "forgotPasscode()"} Forgot Passcode?
%div{"ng-if" => "formData.showRecovery"}
%p
If you forgot your local passcode, your only option is to clear all your local data from this device
and sign back in to your account.
%a.danger{"ng-click" => "beginDeleteData()"} Delete Local Data