chore: telemetry fixes
This commit is contained in:
Submodule frappe-ui updated: 175be05a92...fd5252663b
@@ -9,16 +9,19 @@
|
||||
<script setup>
|
||||
import { FrappeUIProvider } from 'frappe-ui'
|
||||
import { Dialogs } from '@/utils/dialogs'
|
||||
import { computed, onUnmounted, ref } from 'vue'
|
||||
import { computed, onUnmounted, ref, watch } from 'vue'
|
||||
import { useScreenSize } from './utils/composables'
|
||||
import DesktopLayout from './components/DesktopLayout.vue'
|
||||
import MobileLayout from './components/MobileLayout.vue'
|
||||
import NoSidebarLayout from './components/NoSidebarLayout.vue'
|
||||
import { usersStore } from '@/stores/user'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { posthogSettings } from '@/telemetry'
|
||||
|
||||
const screenSize = useScreenSize()
|
||||
const router = useRouter()
|
||||
const noSidebar = ref(false)
|
||||
const { userResource } = usersStore()
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.query.fromLesson || to.path === '/persona') {
|
||||
@@ -44,4 +47,10 @@ onUnmounted(() => {
|
||||
noSidebar.value = false
|
||||
stopSession()
|
||||
})
|
||||
|
||||
watch(userResource, () => {
|
||||
if (userResource.data) {
|
||||
posthogSettings.reload()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -6,12 +6,14 @@ declare global {
|
||||
posthog: any
|
||||
}
|
||||
}
|
||||
|
||||
type PosthogSettings = {
|
||||
posthog_project_id: string
|
||||
posthog_host: string
|
||||
enable_telemetry: boolean
|
||||
telemetry_site_age: number
|
||||
}
|
||||
|
||||
interface CaptureOptions {
|
||||
data: {
|
||||
user: string
|
||||
|
||||
Reference in New Issue
Block a user