feat: add remember me style login
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
kolaente 2022-01-08 18:11:32 +01:00
parent 0473c385d6
commit e108b3a2fe
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 11 additions and 1 deletions

View File

@ -50,7 +50,8 @@
"authenticating": "Authenticating…", "authenticating": "Authenticating…",
"openIdStateError": "State does not match, refusing to continue!", "openIdStateError": "State does not match, refusing to continue!",
"openIdGeneralError": "An error occured while authenticating against the third party.", "openIdGeneralError": "An error occured while authenticating against the third party.",
"logout": "Logout" "logout": "Logout",
"remember": "Stay logged in"
}, },
"settings": { "settings": {
"title": "Settings", "title": "Settings",

View File

@ -93,6 +93,7 @@ export default {
const data = { const data = {
username: credentials.username, username: credentials.username,
password: credentials.password, password: credentials.password,
long_token: credentials.longToken,
} }
if (credentials.totpPasscode) { if (credentials.totpPasscode) {

View File

@ -55,6 +55,12 @@
/> />
</div> </div>
</div> </div>
<div class="field">
<label class="label">
<input type="checkbox" v-model="rememberMe" class="mr-1"/>
{{ $t('user.auth.remember') }}
</label>
</div>
<div class="field is-grouped login-buttons"> <div class="field is-grouped login-buttons">
<div class="control is-expanded"> <div class="control is-expanded">
@ -114,6 +120,7 @@ export default {
return { return {
confirmedEmailSuccess: false, confirmedEmailSuccess: false,
errorMessage: '', errorMessage: '',
rememberMe: false,
} }
}, },
beforeMount() { beforeMount() {
@ -186,6 +193,7 @@ export default {
const credentials = { const credentials = {
username: this.$refs.username.value, username: this.$refs.username.value,
password: this.$refs.password.value, password: this.$refs.password.value,
longToken: this.rememberMe,
} }
if (this.needsTotpPasscode) { if (this.needsTotpPasscode) {