Hide crisp chat on form public pages

This commit is contained in:
Julien Nahum 2024-01-16 18:46:05 +01:00
parent e1e3fdee9c
commit 184096a348
1 changed files with 7 additions and 7 deletions

View File

@ -68,12 +68,6 @@ const submitted = ref(false)
const openCompleteForm = ref(null)
crisp.hideChat()
onBeforeRouteLeave((to, from) => {
crisp.showChat()
disableDarkMode()
})
const passwordEntered = function (password) {
const cookie = useCookie('password-' + slug, {
maxAge: 60 * 60 * 7,
@ -125,14 +119,20 @@ const loadForm = async (setup=false) => {
if (!isIframe) focusOnFirstFormElement()
}
await loadForm(true)
onMounted(() => {
crisp.hideChat()
if (form.value) {
handleDarkMode(form.value?.dark_mode)
handleTransparentMode(form.value?.transparent_background)
}
})
await loadForm(true)
onBeforeRouteLeave((to, from) => {
crisp.showChat()
disableDarkMode()
})
useOpnSeoMeta({
title: () => {