|
| 1 | +<template> |
| 2 | + <modal |
| 3 | + :show="show" |
| 4 | + compact-header |
| 5 | + backdrop-blur="sm" |
| 6 | + @close="$emit('close')" |
| 7 | + > |
| 8 | + <template #title> |
| 9 | + <h2 class="text-xl font-medium"> |
| 10 | + 🎉 Your first submission! Congratulations! |
| 11 | + </h2> |
| 12 | + </template> |
| 13 | + <div class=""> |
| 14 | + <div class="text-sm text-gray-500"> |
| 15 | + Congratulations on creating your form and receiving your first submission! Your form is now live and ready for action. You can now <span class="font-semibold">share your form</span> with others, or <span class="font-semibold">open your Notion database</span> to view the submitted data. |
| 16 | + </div> |
| 17 | + |
| 18 | + <div class="flex gap-2 items-center max-w-full"> |
| 19 | + <ShareFormUrl |
| 20 | + class="flex-grow my-4" |
| 21 | + :form="form" |
| 22 | + /> |
| 23 | + <UButton |
| 24 | + v-track.form_first_submission_modal_open_db_click |
| 25 | + color="white" |
| 26 | + icon="i-logos-notion-icon" |
| 27 | + :to="form.notion_database_url" |
| 28 | + target="_blank" |
| 29 | + > |
| 30 | + See Notion database |
| 31 | + </UButton> |
| 32 | + </div> |
| 33 | + |
| 34 | + <p class="text-gray-500 font-medium text-sm text-center my-4"> |
| 35 | + What's next? |
| 36 | + </p> |
| 37 | + <div class="grid grid-cols-2 gap-2"> |
| 38 | + <div |
| 39 | + v-for="(item, i) in helpLinks" |
| 40 | + :key="i" |
| 41 | + role="button" |
| 42 | + class="bg-white shadow border border-gray-200 rounded-lg p-4 pb-2 items-center justify-center flex flex-col relative hover:bg-gray-50 group transition-colors" |
| 43 | + @click="item.action" |
| 44 | + > |
| 45 | + <div class="flex justify-center"> |
| 46 | + <div class="h-8 w-8 text-gray-600 group-hover:text-gray-800 transition-colors flex items-center"> |
| 47 | + <Icon |
| 48 | + :name="item.icon" |
| 49 | + class="" |
| 50 | + size="40px" |
| 51 | + /> |
| 52 | + </div> |
| 53 | + </div> |
| 54 | + |
| 55 | + <p class="text-gray-500 font-medium text-xs text-center my-2"> |
| 56 | + {{ item.label }} |
| 57 | + </p> |
| 58 | + </div> |
| 59 | + </div> |
| 60 | + </div> |
| 61 | + </modal> |
| 62 | +</template> |
| 63 | + |
| 64 | +<script setup> |
| 65 | +import ShareFormUrl from '~/components/notion/forms/components/ShareFormUrl.vue' |
| 66 | +
|
| 67 | +const props = defineProps({ |
| 68 | + show: { type: Boolean, required: true }, |
| 69 | + form: { type: Object, required: true } |
| 70 | +}) |
| 71 | +
|
| 72 | +const emit = defineEmits(['close']) |
| 73 | +const confetti = useConfetti() |
| 74 | +const crisp = useCrisp() |
| 75 | +
|
| 76 | +watch(() => props.show, () => { |
| 77 | + if (props.show) { |
| 78 | + confetti.play() |
| 79 | + useAmplitude().logEvent('form_first_submission_modal_viewed') |
| 80 | + } |
| 81 | +}) |
| 82 | +
|
| 83 | +const helpLinks = computed(() => { |
| 84 | + return [ |
| 85 | + { |
| 86 | + 'label': 'Embed form on your website', |
| 87 | + 'icon': 'heroicons:code-bracket', |
| 88 | + 'action': () => crisp.openHelpdeskArticle('how-to-embed-your-form-on-your-website-yqa6i') |
| 89 | + }, |
| 90 | + { |
| 91 | + 'label': 'Embed form in Notion', |
| 92 | + 'icon': 'ri:notion-fill', |
| 93 | + 'action': () => crisp.openHelpdeskArticle('can-i-embed-my-form-in-a-notion-page-or-site-11iroj9') |
| 94 | + }, |
| 95 | + { |
| 96 | + 'label': 'Help Center', |
| 97 | + 'icon': 'heroicons:book-open', |
| 98 | + 'action': () => crisp.openHelpdesk() |
| 99 | + }, |
| 100 | + { |
| 101 | + 'label': 'Contact Us', |
| 102 | + 'icon': 'heroicons:chat-bubble-left-right', |
| 103 | + 'action': () => { crisp.openAndShowChat() } |
| 104 | + }, |
| 105 | + ] |
| 106 | +}) |
| 107 | +
|
| 108 | +</script> |
0 commit comments