Skip to content

Commit

Permalink
Use keyup.enter to navigate login/signup form (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
camdenmoors committed Oct 2, 2020
1 parent 3d11482 commit e2f8e5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/frontend/src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
prepend-icon="mdi-account"
type="text"
required
@keyup.enter="$refs.password.focus"
@blur="$v.email.$touch()"
/>
<v-text-field
id="password_field"
ref="password"
v-model="password"
:error-messages="passwordErrors"
name="password"
Expand All @@ -34,6 +36,7 @@
:type="showPassword ? 'text' : 'password'"
:append-icon="showPassword ? 'mdi-eye' : 'mdi-eye-off'"
@click:append="showPassword = !showPassword"
@keyup.enter="login"
@blur="$v.password.$touch()"
/>
<v-btn
Expand Down
5 changes: 5 additions & 0 deletions apps/frontend/src/views/Signup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
label="Email"
prepend-icon="mdi-account"
type="text"
@keyup.enter="$refs.password.focus"
@blur="$v.email.$touch()"
/>
<br />
<v-text-field
id="password"
ref="password"
v-model="password"
:error-messages="passwordErrors"
prepend-icon="mdi-lock"
Expand All @@ -34,6 +36,7 @@
:type="showPassword ? 'text' : 'password'"
:append-icon="showPassword ? 'mdi-eye' : 'mdi-eye-off'"
loading
@keyup.enter="$refs.passwordConfirmation.focus"
@click:append="showPassword = !showPassword"
@blur="$v.password.$touch()"
>
Expand All @@ -49,12 +52,14 @@
<br />
<v-text-field
id="passwordConfirmation"
ref="passwordConfirmation"
v-model="passwordConfirmation"
name="passwordConfirmation"
:error-messages="passwordConfirmationErrors"
label="Confirm Password"
prepend-icon="mdi-lock-alert"
type="password"
@keyup.enter="register"
@blur="$v.passwordConfirmation.$touch()"
/>
<br />
Expand Down

0 comments on commit e2f8e5a

Please sign in to comment.