mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 01:34:24 +08:00
reset state after leaving 2fa setting tab
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
</v-window-item>
|
</v-window-item>
|
||||||
|
|
||||||
<v-window-item value="twoFactorSetting">
|
<v-window-item value="twoFactorSetting">
|
||||||
<user-two-factor-auth-setting-tab/>
|
<user-two-factor-auth-setting-tab ref="twoFactorSettingTab"/>
|
||||||
</v-window-item>
|
</v-window-item>
|
||||||
|
|
||||||
<v-window-item value="dataManagementSetting">
|
<v-window-item value="dataManagementSetting">
|
||||||
@@ -69,6 +69,13 @@ export default {
|
|||||||
dataManagementSetting: mdiDatabaseCogOutline
|
dataManagementSetting: mdiDatabaseCogOutline
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'activeTab': function (newValue, oldValue) {
|
||||||
|
if (oldValue === 'twoFactorSetting' && newValue !== 'twoFactorSetting') {
|
||||||
|
this.$refs.twoFactorSettingTab.reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -116,6 +116,9 @@ import {
|
|||||||
} from '@mdi/js';
|
} from '@mdi/js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
expose: [
|
||||||
|
'reset'
|
||||||
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
status: null,
|
status: null,
|
||||||
@@ -165,6 +168,18 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
enable() {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user