forked from AkkomaGang/akkoma-fe
Merge branch 'fix-mfa' into 'develop'
fix MFA crashing on user-settings page See merge request pleroma/pleroma-fe!834
This commit is contained in:
commit
8d2e63a8e4
2 changed files with 4 additions and 1 deletions
|
@ -7,6 +7,7 @@ import { mapState } from 'vuex'
|
||||||
const Mfa = {
|
const Mfa = {
|
||||||
data: () => ({
|
data: () => ({
|
||||||
settings: { // current settings of MFA
|
settings: { // current settings of MFA
|
||||||
|
available: false,
|
||||||
enabled: false,
|
enabled: false,
|
||||||
totp: false
|
totp: false
|
||||||
},
|
},
|
||||||
|
@ -139,7 +140,9 @@ const Mfa = {
|
||||||
// fetch settings from server
|
// fetch settings from server
|
||||||
async fetchSettings () {
|
async fetchSettings () {
|
||||||
let result = await this.backendInteractor.fetchSettingsMFA()
|
let result = await this.backendInteractor.fetchSettingsMFA()
|
||||||
|
if (result.error) return
|
||||||
this.settings = result.settings
|
this.settings = result.settings
|
||||||
|
this.settings.available = true
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="setting-item mfa-settings" v-if="readyInit">
|
<div class="setting-item mfa-settings" v-if="readyInit && settings.available">
|
||||||
|
|
||||||
<div class="mfa-heading">
|
<div class="mfa-heading">
|
||||||
<h2>{{$t('settings.mfa.title')}}</h2>
|
<h2>{{$t('settings.mfa.title')}}</h2>
|
||||||
|
|
Loading…
Reference in a new issue