prematurely 2fa switched before 2fa was set fix

This commit is contained in:
Čarodej
2022-03-08 08:51:31 +01:00
parent 08175d4dba
commit c0ca83193f
3 changed files with 9 additions and 7 deletions

View File

@@ -18,7 +18,7 @@
<script>
export default {
name: 'SwitchInput',
props: ['label', 'name', 'state', 'info', 'input'],
props: ['label', 'name', 'state', 'info', 'input', 'isDisabled'],
data() {
return {
isSwitched: undefined,
@@ -26,6 +26,8 @@ export default {
},
methods: {
changeState() {
if (this.isDisabled) return
this.isSwitched = !this.isSwitched
this.$emit('input', this.isSwitched)
},