Feat: Remove book a demo page (#5123)
This commit is contained in:
@@ -28,17 +28,10 @@
|
||||
import { useForm } from 'vee-validate'
|
||||
import type { OnboardingRole, OnboardingPlan, OnboardingSource } from '@speckle/shared'
|
||||
import { useProcessOnboarding } from '~~/lib/auth/composables/onboarding'
|
||||
import { homeRoute, bookDemoRoute } from '~/lib/common/helpers/route'
|
||||
import { useBreakpoints } from '@vueuse/core'
|
||||
import { TailwindBreakpoints } from '~~/lib/common/helpers/tailwind'
|
||||
import { homeRoute } from '~/lib/common/helpers/route'
|
||||
|
||||
const isOnboardingForced = useIsOnboardingForced()
|
||||
const isWorkspacesEnabled = useIsWorkspacesEnabled()
|
||||
const breakpoints = useBreakpoints(TailwindBreakpoints)
|
||||
const isMobile = breakpoints.smaller('sm')
|
||||
|
||||
const { setUserOnboardingComplete, setMixpanelSegments } = useProcessOnboarding()
|
||||
|
||||
const { handleSubmit, meta, isSubmitting, values } = useForm({
|
||||
initialValues: {
|
||||
role: undefined as OnboardingRole | undefined,
|
||||
@@ -57,11 +50,11 @@ const onSubmit = handleSubmit(async () => {
|
||||
source: values.source
|
||||
})
|
||||
|
||||
navigateTo(!isMobile.value && isWorkspacesEnabled.value ? bookDemoRoute : homeRoute)
|
||||
navigateTo(homeRoute)
|
||||
})
|
||||
|
||||
const onSkip = () => {
|
||||
setUserOnboardingComplete()
|
||||
navigateTo(!isMobile.value && isWorkspacesEnabled.value ? bookDemoRoute : homeRoute)
|
||||
navigateTo(homeRoute)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -19,7 +19,6 @@ export const tutorialsRoute = '/tutorials'
|
||||
export const docsPageUrl = 'https://docs.speckle.systems/'
|
||||
export const forumPageUrl = 'https://speckle.community/'
|
||||
export const guideBillingUrl = 'https://docs.speckle.systems/workspaces/billing'
|
||||
export const bookDemoRoute = '/book-a-demo'
|
||||
export const onboardingRoute = '/onboarding'
|
||||
|
||||
export const settingsUserRoutes = {
|
||||
|
||||
@@ -13,8 +13,7 @@ import {
|
||||
workspaceCreateRoute,
|
||||
workspaceJoinRoute,
|
||||
projectsRoute,
|
||||
workspaceRoute,
|
||||
bookDemoRoute
|
||||
workspaceRoute
|
||||
} from '~/lib/common/helpers/route'
|
||||
import { mainServerInfoDataQuery } from '~/lib/core/composables/server'
|
||||
import { activeUserQuery } from '~~/lib/auth/composables/activeUser'
|
||||
@@ -30,8 +29,7 @@ import { useNavigation } from '~/lib/navigation/composables/navigation'
|
||||
export default defineNuxtRouteMiddleware(async (to) => {
|
||||
const isAuthPage = to.path.startsWith('/authn/')
|
||||
const isSSOPath = to.path.includes('/sso/')
|
||||
const isBookDemoPage = to.path === bookDemoRoute
|
||||
if (isAuthPage || isSSOPath || isBookDemoPage) return
|
||||
if (isAuthPage || isSSOPath) return
|
||||
|
||||
const client = useApolloClientFromNuxt()
|
||||
const {
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
<template>
|
||||
<HeaderWithEmptyPage empty-header>
|
||||
<template #header-left>
|
||||
<HeaderLogoBlock no-link />
|
||||
</template>
|
||||
<template #header-right>
|
||||
<div class="flex gap-2 items-center">
|
||||
<FormButton
|
||||
class="opacity-70 hover:opacity-100 p-1"
|
||||
size="sm"
|
||||
color="subtle"
|
||||
@click="navigateTo(homeRoute)"
|
||||
>
|
||||
Skip
|
||||
</FormButton>
|
||||
<FormButton color="outline" size="sm" @click="logout({ skipRedirect: false })">
|
||||
Sign out
|
||||
</FormButton>
|
||||
</div>
|
||||
</template>
|
||||
<div class="flex flex-col items-center justify-center p-4 relative">
|
||||
<h1 class="text-heading-xl text-foreground mb-3">
|
||||
<template v-if="!showEmbed">Do you want a personal onboarding call?</template>
|
||||
<template v-else>Find a time</template>
|
||||
</h1>
|
||||
<template v-if="!showEmbed">
|
||||
<p class="text-body-sm text-foreground-2">
|
||||
Get started like our most successful users
|
||||
</p>
|
||||
<div class="flex flex-col gap-3 w-full md:max-w-96 mt-8">
|
||||
<FormRadioGroup v-model="bookDemoSelected" :options="options" is-stacked />
|
||||
</div>
|
||||
</template>
|
||||
<div v-else class="w-full mt-8 mb-6">
|
||||
<CalWidget />
|
||||
</div>
|
||||
<div class="flex flex-col gap-3 mt-4 w-full md:max-w-96">
|
||||
<div
|
||||
v-if="!showEmbed"
|
||||
v-tippy="!bookDemoSelected ? 'Please select an option' : ''"
|
||||
class="w-full"
|
||||
>
|
||||
<FormButton
|
||||
size="lg"
|
||||
submit
|
||||
full-width
|
||||
:disabled="!bookDemoSelected"
|
||||
@click="onCtaClick"
|
||||
>
|
||||
Continue
|
||||
</FormButton>
|
||||
</div>
|
||||
<FormButton v-else size="lg" full-width @click="navigateTo(homeRoute)">
|
||||
Continue
|
||||
</FormButton>
|
||||
</div>
|
||||
</div>
|
||||
</HeaderWithEmptyPage>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useAuthManager } from '~/lib/auth/composables/auth'
|
||||
import { homeRoute } from '~/lib/common/helpers/route'
|
||||
import { useMixpanel } from '~~/lib/core/composables/mp'
|
||||
|
||||
type BookDemoSelect = 'yes' | 'no'
|
||||
|
||||
definePageMeta({
|
||||
middleware: ['auth'],
|
||||
layout: 'empty'
|
||||
})
|
||||
|
||||
const { logout } = useAuthManager()
|
||||
const mixpanel = useMixpanel()
|
||||
|
||||
const bookDemoSelected = ref<BookDemoSelect | undefined>(undefined)
|
||||
const showEmbed = ref(false)
|
||||
|
||||
const options = computed(() => [
|
||||
{
|
||||
value: 'yes',
|
||||
title: `Yes, help me get started`,
|
||||
subtitle: 'Schedule your 15 minute call in the next step'
|
||||
},
|
||||
{
|
||||
value: 'no',
|
||||
title: 'No, I will pass for now'
|
||||
}
|
||||
])
|
||||
|
||||
const onCtaClick = () => {
|
||||
if (bookDemoSelected.value === 'yes') {
|
||||
showEmbed.value = true
|
||||
mixpanel.track('Booking Calendar Triggered', {
|
||||
location: 'book-a-demo-page'
|
||||
})
|
||||
} else {
|
||||
mixpanel.track('Book a Demo Skipped')
|
||||
navigateTo(homeRoute)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
mixpanel.track('Book A Demo Page Viewed')
|
||||
})
|
||||
</script>
|
||||
@@ -34,9 +34,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useProcessOnboarding } from '~~/lib/auth/composables/onboarding'
|
||||
import { useAuthManager } from '~/lib/auth/composables/auth'
|
||||
import { homeRoute, bookDemoRoute } from '~/lib/common/helpers/route'
|
||||
import { useBreakpoints } from '@vueuse/core'
|
||||
import { TailwindBreakpoints } from '~~/lib/common/helpers/tailwind'
|
||||
import { homeRoute } from '~/lib/common/helpers/route'
|
||||
|
||||
useHead({
|
||||
title: 'Welcome to Speckle'
|
||||
@@ -48,14 +46,11 @@ definePageMeta({
|
||||
})
|
||||
|
||||
const isOnboardingForced = useIsOnboardingForced()
|
||||
const isWorkspacesEnabled = useIsWorkspacesEnabled()
|
||||
const { setUserOnboardingComplete } = useProcessOnboarding()
|
||||
const { logout } = useAuthManager()
|
||||
const breakpoints = useBreakpoints(TailwindBreakpoints)
|
||||
const isMobile = breakpoints.smaller('sm')
|
||||
|
||||
const onSkip = () => {
|
||||
setUserOnboardingComplete()
|
||||
navigateTo(!isMobile.value && isWorkspacesEnabled.value ? bookDemoRoute : homeRoute)
|
||||
navigateTo(homeRoute)
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user