diff --git a/docs/pages/pricing.vue b/docs/pages/pricing.vue index 118e4727..f6388172 100644 --- a/docs/pages/pricing.vue +++ b/docs/pages/pricing.vue @@ -19,6 +19,21 @@ defineOgImageComponent('Docs') const evanTestimonial = computed(() => { return home.value?.testimonials.items.find(item => item.author.name === 'Evan You') }) + +const demoVideoLink = home.value?.deploy?.buttons?.find(link => link.id === 'demo-video') || {} +const videoLink = ref('') +const videoModalOpen = ref(false) + +onMounted(() => { + demoVideoLink.click = (e) => { + if (e.ctrlKey || e.metaKey) { + return + } + e?.preventDefault() + videoLink.value = demoVideoLink.to + videoModalOpen.value = true + } +})