File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed
sprinkle-account/app/assets/interfaces
theme-pink-cupcake/src/components/Pages/Account Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import type { UserDataInterface } from './'
99export interface LoginRequest {
1010 user_name : string
1111 password : string
12+ rememberme ?: boolean
1213}
1314
1415export interface LoginResponse {
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ const loading = ref(false)
1010const error = ref <AlertInterface | null >()
1111let form: LoginRequest = {
1212 user_name: ' ' ,
13- password: ' '
13+ password: ' ' ,
14+ rememberme: false
1415}
1516
1617// Form action
@@ -27,12 +28,6 @@ async function sendLogin() {
2728 pos: ' top-right' ,
2829 timeout: 4000
2930 })
30-
31- // If a redirect is set, redirect to it
32- // TODO : Dilemma, should we redirect using VueRouter or not?
33- // if (response.redirect) {
34- // window.location.href = response.redirect
35- // }
3631 })
3732 .catch ((err : AlertInterface ) => {
3833 error .value = err
@@ -71,6 +66,17 @@ async function sendLogin() {
7166 v-model =" form.password" />
7267 </div >
7368 </div >
69+ <div class =" uk-margin" >
70+ <label class =" uk-inline uk-width-1-1" >
71+ <input
72+ class =" uk-checkbox"
73+ type =" checkbox"
74+ aria-label =" Remember Me"
75+ data-test =" rememberme"
76+ v-model =" form.rememberme" />
77+ {{ $t('REMEMBER_ME') }}
78+ </label >
79+ </div >
7480 <div class =" uk-text-center" >
7581 <button class =" uk-button uk-button-primary" :disabled =" loading" data-test =" submit" >
7682 {{ $t('LOGIN') }}
You can’t perform that action at this time.
0 commit comments