Merge pull request #387 from standardnotes/clear-password-field

Clear password/passcode field
This commit is contained in:
Mo Bitar
2020-03-11 09:18:49 -05:00
committed by GitHub
3 changed files with 12 additions and 4 deletions

View File

@@ -59,6 +59,7 @@ class LockScreenCtrl {
this.formData.passcode,
(success) => {
if(!success) {
this.formData.passcode = null;
this.alertManager.alert({
text: "Invalid passcode. Please try again.",
onClose: () => {

View File

@@ -168,6 +168,7 @@ class AccountMenuCtrl extends PureCtrl {
this.syncManager.unlockSyncing();
await this.setFormDataState({
status: null,
user_password: null
});
const error = response
? response.error
@@ -507,6 +508,15 @@ class AccountMenuCtrl extends PureCtrl {
}
}
hidePasswordForm() {
this.setFormDataState({
showLogin: false,
showRegister: false,
user_password: null,
password_conf: null
});
}
hasPasscode() {
return this.passcodeManager.hasPasscode();
}

View File

@@ -338,10 +338,7 @@
.sk-panel-row
.sk-p.left.neutral.faded {{self.state.appVersion}}
a.sk-a.right(
ng-click=`
self.state.formData.showLogin = false;
self.state.formData.showRegister = false;
`,
ng-click='self.hidePasswordForm()',
ng-if='self.state.formData.showLogin || self.state.formData.showRegister'
)
| Cancel