Forgot passcode lock option
This commit is contained in:
@@ -8,7 +8,7 @@ class LockScreen {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
controller($scope, passcodeManager) {
|
controller($scope, passcodeManager, authManager, syncManager) {
|
||||||
'ngInject';
|
'ngInject';
|
||||||
|
|
||||||
$scope.formData = {};
|
$scope.formData = {};
|
||||||
@@ -23,6 +23,21 @@ class LockScreen {
|
|||||||
$scope.onSuccess()();
|
$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();
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,4 +31,11 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#passcode-reset {
|
||||||
|
margin-top: 18px;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,3 +12,12 @@
|
|||||||
.button-group.stretch.panel-row.form-submit
|
.button-group.stretch.panel-row.form-submit
|
||||||
%button.button.info{"type" => "submit"}
|
%button.button.info{"type" => "submit"}
|
||||||
.label Unlock
|
.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
|
||||||
|
|||||||
Reference in New Issue
Block a user