feat: automatically focus username field on login page

This commit is contained in:
Oleg Lobanov 2022-05-04 00:44:32 +04:00
parent e5fa96b666
commit 596c73288f
No known key found for this signature in database
GPG Key ID: 65FF3DB864FE3D2A

View File

@ -9,6 +9,7 @@
class="input input--block"
type="text"
autocapitalize="off"
ref="username"
v-model="username"
:placeholder="$t('login.username')"
/>
@ -70,6 +71,8 @@ export default {
};
},
mounted() {
this.focusUsername();
if (!recaptcha) return;
window.grecaptcha.ready(function () {
@ -79,6 +82,9 @@ export default {
});
},
methods: {
focusUsername() {
this.$refs.username.focus();
},
toggleMode() {
this.createMode = !this.createMode;
},