Avoid showing dialogs at page load.

This commit is contained in:
Leo Vasanko 2023-11-20 12:42:04 +00:00
parent 7311ffdff1
commit b2188eee68
3 changed files with 2 additions and 5 deletions

View File

@ -41,9 +41,6 @@ defineExpose({ show, close })
watchEffect(() => {
if (dialog.value) show()
})
onMounted(() => {
show()
})
</script>
<style>

View File

@ -1,5 +1,5 @@
<template>
<ModalDialog name=settings title="Settings">
<ModalDialog name=settings2 title="Settings">
<form>
<template v-if="store.user.isLoggedIn">
<h3>Update your authentication</h3>

View File

@ -153,8 +153,8 @@ function handleUpdateMessage(updateData: { update: UpdateEntry[] }) {
function handleError(msg: errorEvent) {
const store = useMainStore()
if (msg.error.code === 401) {
store.user.dialog = 'login'
store.user.isLoggedIn = false
store.dialog = 'login'
return
}
}