reset state after leaving 2fa setting tab

This commit is contained in:
MaysWind
2023-07-01 23:10:49 +08:00
parent 88b6ecc557
commit 153e0035ba
2 changed files with 23 additions and 1 deletions
@@ -116,6 +116,9 @@ import {
} from '@mdi/js';
export default {
expose: [
'reset'
],
data() {
return {
status: null,
@@ -165,6 +168,18 @@ export default {
}
},
methods: {
reset() {
this.new2FASecret = '';
this.new2FAQRCode = '';
this.currentPassword = '';
this.isCurrentPasswordVisible = false;
this.currentPasscode = '';
this.currentBackupCode = '';
this.enabling = false;
this.enableConfirming = false;
this.disabling = false;
this.regenerating = false;
},
enable() {
const self = this;