feat: formbricks edit

This commit is contained in:
RayGur authored and wancat committed 2024-08-02 14:44:28 +08:00
1 parent 4c90793fc6
commit 634464065d
1 file changed
+16 -3
+16 -3
View File
@@ -7,6 +7,19 @@ import { Vue3Lottie } from 'vue3-lottie'
import CompleteAnimation from '../../img/complete-animation.json' import CompleteAnimation from '../../img/complete-animation.json'
import formbricks from "@formbricks/js/website"; import formbricks from "@formbricks/js/website";
formbricks.init({
environmentId: "clyffbuq50bbxwh63thlfs1lb",
apiHost: "https://app.formbricks.com",
attributes: {
language: "zh", // optional
},
});
const showModal = ref(true) // Controls whether the modal is visible or not
const router = useRouter()
const toast = useToast()
if (typeof window !== "undefined") { if (typeof window !== "undefined") {
formbricks.init({ formbricks.init({
environmentId: "clyffbuq50bbxwh63thlfs1lb", environmentId: "clyffbuq50bbxwh63thlfs1lb",
@@ -14,12 +27,10 @@ if (typeof window !== "undefined") {
}); });
} }
const showModal = ref(true) // Controls whether the modal is visible or not
const router = useRouter()
const toast = useToast()
const closeModal = () => { const closeModal = () => {
showModal.value = false showModal.value = false
} }
const defineComponent = () => ({ const defineComponent = () => ({
components: { components: {
Vue3Lottie, Vue3Lottie,
@@ -30,6 +41,7 @@ const defineComponent = () => ({
} }
}, },
}) })
const backtoMap = async () => { const backtoMap = async () => {
try { try {
router.push({ name: 'map' }) router.push({ name: 'map' })
@@ -43,6 +55,7 @@ const backtoMap = async () => {
setTimeout(() => { setTimeout(() => {
showModal.value = true showModal.value = true
}, 5000) // Show modal after 5 seconds }, 5000) // Show modal after 5 seconds
</script> </script>
<template> <template>