Added enter to log in

pull/237/head
Beaudan 6 years ago
parent 3e66b515de
commit f906cbfd50

@ -15,6 +15,7 @@
className: 'password full-screen-flow standalone-fullscreen',
templateName: 'password',
events: {
keyup: 'onKeyup',
'click #unlock-button': 'onLogin',
'click #reset-button': 'onReset',
},
@ -30,6 +31,16 @@
showReset: this.errorCount >= MIN_LOGIN_TRIES,
};
},
onKeyup(event) {
switch (event.key) {
case 'Enter':
this.onLogin();
break;
default:
return;
}
event.preventDefault();
},
async onLogin() {
const passPhrase = this.$('#passPhrase').val();
const trimmed = passPhrase ? passPhrase.trim() : passPhrase;

Loading…
Cancel
Save