mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-13 16:36:40 +02:00
Fix Error modal closing
This commit is contained in:
parent
27f3145740
commit
6ed54d79bb
@ -5,7 +5,7 @@
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const showModal = true
|
const showModal = ref(true)
|
||||||
const showDebug = computed(() => process.env.NODE_ENV === 'development')
|
const showDebug = computed(() => process.env.NODE_ENV === 'development')
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -15,8 +15,19 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch(showModal, (val) => {
|
||||||
|
if (val == false) {
|
||||||
|
exit()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exits the error view
|
||||||
|
*/
|
||||||
function exit() {
|
function exit() {
|
||||||
window.history.length > 1 && route.name !== '404' ? router.go(-1) : router.push({ name: 'accounts' })
|
window.history.length > 1 && route.name !== '404' && route.name !== 'notFound'
|
||||||
|
? router.go(-1)
|
||||||
|
: router.push({ name: 'accounts' })
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user