Merge pull request #13338 from Budibase/feature/nps-posthog
Feature/nps posthog
This commit is contained in:
commit
6bd6ee779b
|
@ -107,3 +107,4 @@ budibase-component
|
|||
budibase-datasource
|
||||
|
||||
*.iml
|
||||
.nx
|
|
@ -32,10 +32,14 @@
|
|||
import TourWrap from "components/portal/onboarding/TourWrap.svelte"
|
||||
import { TOUR_STEP_KEYS } from "components/portal/onboarding/tours.js"
|
||||
import { goto } from "@roxi/routify"
|
||||
import { onMount } from "svelte"
|
||||
import PosthogClient from "../../analytics/PosthogClient"
|
||||
|
||||
export let application
|
||||
export let loaded
|
||||
|
||||
const posthog = new PosthogClient(process.env.POSTHOG_TOKEN)
|
||||
|
||||
let unpublishModal
|
||||
let updateAppModal
|
||||
let revertModal
|
||||
|
@ -44,6 +48,7 @@
|
|||
let appActionPopoverOpen = false
|
||||
let appActionPopoverAnchor
|
||||
let publishing = false
|
||||
let showNpsSurvey = false
|
||||
let lastOpened
|
||||
|
||||
$: filteredApps = $appsStore.apps.filter(app => app.devId === application)
|
||||
|
@ -98,6 +103,7 @@
|
|||
type: "success",
|
||||
icon: "GlobeCheck",
|
||||
})
|
||||
showNpsSurvey = true
|
||||
await completePublish()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
|
@ -148,6 +154,10 @@
|
|||
notifications.error("Error refreshing app")
|
||||
}
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
posthog.init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
|
@ -345,6 +355,10 @@
|
|||
<RevertModal bind:this={revertModal} />
|
||||
<VersionModal hideIcon bind:this={versionModal} />
|
||||
|
||||
{#if showNpsSurvey}
|
||||
<div class="nps-survey" />
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.app-action-popover-content {
|
||||
padding: var(--spacing-xl);
|
||||
|
|
Loading…
Reference in New Issue