mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 11:30:12 +08:00
feat: formbricks edit
This commit is contained in:
1 parent
4c90793fc6
commit
634464065d
1 file changed
+17
-4
@@ -1,12 +1,25 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useToast } from 'vue-toastification'
|
import { useToast } from 'vue-toastification'
|
||||||
import { ref } from 'vue'
|
import { ref} from 'vue'
|
||||||
import { Vue3Lottie } from 'vue3-lottie'
|
import { Vue3Lottie } from 'vue3-lottie'
|
||||||
// import { surveyUrl } from '../config'
|
// import { surveyUrl } from '../config'
|
||||||
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>
|
||||||
|
|||||||
Reference in new issue
Block a user