Started to refactor pages

This commit is contained in:
Julien Nahum 2023-12-09 17:02:23 +01:00
parent 12778fad34
commit 6ee56ac4cc
10 changed files with 48 additions and 33 deletions

View File

@ -23,6 +23,7 @@
<transition name="page" mode="out-in"> <transition name="page" mode="out-in">
<NuxtLayout> <NuxtLayout>
<NuxtLoadingIndicator color="#2563eb"/>
<NuxtPage/> <NuxtPage/>
</NuxtLayout> </NuxtLayout>
</transition> </transition>

View File

@ -119,7 +119,7 @@
Login Login
</router-link> </router-link>
<v-button v-track.nav_create_form_click size="small" :to="{ name: 'forms.create.guest' }" color="outline-blue" :arrow="true"> <v-button v-track.nav_create_form_click size="small" :to="{ name: 'forms-create-guest' }" color="outline-blue" :arrow="true">
Create a form Create a form
</v-button> </v-button>
</div> </div>

View File

@ -279,7 +279,7 @@ export default {
] ]
}, },
init () { init () {
if (this.$route.name === 'forms.create' || this.$route.name === 'forms.create.guest') { // Set Default fields if (this.$route.name === 'forms.create' || this.$route.name === 'forms-create-guest') { // Set Default fields
this.formFields = (this.form.properties.length > 0) ? clonedeep(this.form.properties) : this.getDefaultFields() this.formFields = (this.form.properties.length > 0) ? clonedeep(this.form.properties) : this.getDefaultFields()
} else { } else {
this.formFields = clonedeep(this.form.properties).map((field) => { this.formFields = clonedeep(this.form.properties).map((field) => {

View File

@ -64,7 +64,7 @@
</ul> </ul>
<div class="mt-6 sm:mt-8 flex text-center justify-center lg:justify-start"> <div class="mt-6 sm:mt-8 flex text-center justify-center lg:justify-start">
<!-- <v-button v-if="!authenticated" class="mr-2 block" :to="{ name: 'forms.create.guest' }" :arrow="true">--> <!-- <v-button v-if="!authenticated" class="mr-2 block" :to="{ name: 'forms-create-guest' }" :arrow="true">-->
<!-- Get started for free--> <!-- Get started for free-->
<!-- </v-button>--> <!-- </v-button>-->
<!-- <v-button v-else class="mr-2 block" :to="{ name: 'forms.create' }" :arrow="true">--> <!-- <v-button v-else class="mr-2 block" :to="{ name: 'forms.create' }" :arrow="true">-->

View File

@ -1,5 +1,5 @@
<template> <template>
<iframe v-if="!isDarkMode" id="testimonialto-carousel-all-notionforms" <iframe v-if="!isDark" id="testimonialto-carousel-all-notionforms"
loading="lazy" loading="lazy"
src="https://embed.testimonial.to/carousel/all/notionforms?theme=light&autoplay=on&showmore=on&one-row=on&same-height=off" src="https://embed.testimonial.to/carousel/all/notionforms?theme=light&autoplay=on&showmore=on&one-row=on&same-height=off"
frameBorder="0" scrolling="no" width="100%" frameBorder="0" scrolling="no" width="100%"
@ -8,6 +8,8 @@
</template> </template>
<script> <script>
import {useDark} from "@vueuse/core";
export default { export default {
props: { props: {
@ -18,9 +20,10 @@ export default {
}, },
data: () => ({}), data: () => ({}),
computed: { setup () {
isDarkMode () { const isDark = useDark()
return window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches return {
isDark
} }
}, },

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="main-layout min-h-screen flex flex-col"> <div class="main-layout min-h-screen flex flex-col">
<!-- <Navbar />--> <Navbar />
<slot class="flex-grow"> <slot class="flex-grow">
</slot> </slot>

View File

@ -29,5 +29,16 @@ export default defineNuxtConfig({
}, },
sentry: { sentry: {
dsn: opnformConfig.sentry_dsn, dsn: opnformConfig.sentry_dsn,
},
routeRules: {
'/ai-form-builder': {
swr: 60*60
},
'/privacy-policy': {
swr: 60*60
},
'/terms-conditions': {
swr: 60*60
},
} }
}) })

View File

@ -19,7 +19,7 @@
</p> </p>
<div class="mt-8 flex justify-center"> <div class="mt-8 flex justify-center">
<v-button v-if="!authenticated" class="mr-1" :to="{ name: 'forms.create.guest' }" :arrow="true"> <v-button v-if="!authenticated" class="mr-1" :to="{ name: 'forms-create-guest' }" :arrow="true">
Get started for free Get started for free
</v-button> </v-button>
<v-button v-else class="mr-1" :to="{ name: 'forms.create' }" :arrow="true"> <v-button v-else class="mr-1" :to="{ name: 'forms.create' }" :arrow="true">
@ -270,7 +270,7 @@
<!--&lt;!&ndash; </p>&ndash;&gt;--> <!--&lt;!&ndash; </p>&ndash;&gt;-->
<!--&lt;!&ndash; <div class="mt-8 flex justify-center">&ndash;&gt;--> <!--&lt;!&ndash; <div class="mt-8 flex justify-center">&ndash;&gt;-->
<!--&lt;!&ndash; <v-button v-if="!authenticated" class="mr-1" :to="{ name: 'forms.create.guest' }" :arrow="true">&ndash;&gt;--> <!--&lt;!&ndash; <v-button v-if="!authenticated" class="mr-1" :to="{ name: 'forms-create-guest' }" :arrow="true">&ndash;&gt;-->
<!--&lt;!&ndash; Get started for free&ndash;&gt;--> <!--&lt;!&ndash; Get started for free&ndash;&gt;-->
<!--&lt;!&ndash; </v-button>&ndash;&gt;--> <!--&lt;!&ndash; </v-button>&ndash;&gt;-->
<!--&lt;!&ndash; <v-button v-else class="mr-1" :to="{ name: 'forms.create' }" :arrow="true">&ndash;&gt;--> <!--&lt;!&ndash; <v-button v-else class="mr-1" :to="{ name: 'forms.create' }" :arrow="true">&ndash;&gt;-->
@ -443,7 +443,7 @@
</p> </p>
<div class="mt-8 flex justify-center"> <div class="mt-8 flex justify-center">
<v-button v-if="!authenticated" class="mr-1" :to="{ name: 'forms.create.guest' }" :arrow="true"> <v-button v-if="!authenticated" class="mr-1" :to="{ name: 'forms-create-guest' }" :arrow="true">
Get started for free Get started for free
</v-button> </v-button>
<v-button v-else class="mr-1" :to="{ name: 'forms.create' }" :arrow="true"> <v-button v-else class="mr-1" :to="{ name: 'forms.create' }" :arrow="true">

View File

@ -26,13 +26,13 @@
<script> <script>
import { computed } from 'vue' import { computed } from 'vue'
import Form from 'vform' import Form from 'vform'
import { useTemplatesStore } from '../../stores/templates' import { useTemplatesStore } from '../../../stores/templates.js'
import { useWorkingFormStore } from '../../stores/working_form' import { useWorkingFormStore } from '../../../stores/working_form.js'
import { useWorkspacesStore } from '../../stores/workspaces' import { useWorkspacesStore } from '../../../stores/workspaces.js'
import QuickRegister from '~/components/pages/auth/components/QuickRegister.vue' import QuickRegister from '~/components/pages/auth/components/QuickRegister.vue'
import initForm from '../../mixins/form_editor/initForm.js' import initForm from '../../../mixins/form_editor/initForm.js'
import SeoMeta from '../../mixins/seo-meta.js' import SeoMeta from '../../../mixins/seo-meta.js'
import CreateFormBaseModal from '../../components/pages/forms/create/CreateFormBaseModal.vue' import CreateFormBaseModal from '../../../components/pages/forms/create/CreateFormBaseModal.vue'
const loadTemplates = function () { const loadTemplates = function () {
const templatesStore = useTemplatesStore() const templatesStore = useTemplatesStore()

View File

@ -44,12 +44,12 @@
</p> </p>
<div class="mt-8 flex justify-center"> <div class="mt-8 flex justify-center">
<!-- <v-button v-if="!authenticated" class="mr-1" :to="{ name: 'forms.create.guest' }" :arrow="true">--> <v-button v-if="!authenticated" class="mr-1" :to="{ name: 'forms-create-guest' }" :arrow="true">
<!-- Create a form for FREE--> Create a form for FREE
<!-- </v-button>--> </v-button>
<!-- <v-button v-else class="mr-1" :to="{ name: 'forms.create' }" :arrow="true">--> <v-button v-else class="mr-1" :to="{ name: 'forms.create' }" :arrow="true">
<!-- Create a form for FREE--> Create a form for FREE
<!-- </v-button>--> </v-button>
</div> </div>
<div class="justify-center flex gap-2 mt-10"> <div class="justify-center flex gap-2 mt-10">
@ -118,13 +118,13 @@
</template> </template>
</pricing-table> </pricing-table>
<!-- <div class="pt-20 pb-5 text-center bg-white dark:bg-notion-dark-light">--> <!-- <div class="pt-20 pb-5 text-center bg-white dark:bg-notion-dark-light">-->
<!-- <h3 class="font-semibold text-3xl">See what people are saying</h3>--> <!-- <h3 class="font-semibold text-3xl">See what people are saying</h3>-->
<!-- <p class="w-full mt-2 mb-8">--> <!-- <p class="w-full mt-2 mb-8">-->
<!-- These are the stories of our customers who have joined us with great pleasure when using this crazy feature.--> <!-- These are the stories of our customers who have joined us with great pleasure when using this crazy feature.-->
<!-- </p>--> <!-- </p>-->
<!-- <testimonials/>--> <!-- <testimonials/>-->
<!-- </div>--> <!-- </div>-->
<!-- <templates-slider class="max-w-full mb-12"/>--> <!-- <templates-slider class="max-w-full mb-12"/>-->
@ -136,9 +136,9 @@
Generous, unlimited free plan. Generous, unlimited free plan.
</p> </p>
<div class="mt-6 flex justify-center"> <div class="mt-6 flex justify-center">
<!-- <v-button v-track.welcome_create_form_click :to="{ name: 'forms.create.guest' }" :arrow="true" color="blue">--> <v-button v-track.welcome_create_form_click :to="{ name: 'forms-create-guest' }" :arrow="true" color="blue">
<!-- Create a form for FREE--> Create a form for FREE
<!-- </v-button>--> </v-button>
</div> </div>
<div class="flex justify-center mt-6"> <div class="flex justify-center mt-6">
<a target="_blank" :href="configLinks.twitter" class="mr-4"> <a target="_blank" :href="configLinks.twitter" class="mr-4">