Skip to content

Commit

Permalink
Started to refactor pages
Browse files Browse the repository at this point in the history
  • Loading branch information
JhumanJ committed Dec 9, 2023
1 parent 12778fa commit 6ee56ac
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 33 deletions.
1 change: 1 addition & 0 deletions client/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

<transition name="page" mode="out-in">
<NuxtLayout>
<NuxtLoadingIndicator color="#2563eb"/>
<NuxtPage/>
</NuxtLayout>
</transition>
Expand Down
2 changes: 1 addition & 1 deletion client/components/global/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
Login
</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
</v-button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export default {
]
},
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()
} else {
this.formFields = clonedeep(this.form.properties).map((field) => {
Expand Down
2 changes: 1 addition & 1 deletion client/components/pages/welcome/AiFeature.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</ul>

<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-->
<!-- </v-button>-->
<!-- <v-button v-else class="mr-2 block" :to="{ name: 'forms.create' }" :arrow="true">-->
Expand Down
11 changes: 7 additions & 4 deletions client/components/pages/welcome/Testimonials.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<iframe v-if="!isDarkMode" id="testimonialto-carousel-all-notionforms"
<iframe v-if="!isDark" id="testimonialto-carousel-all-notionforms"
loading="lazy"
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%"
Expand All @@ -8,6 +8,8 @@
</template>

<script>
import {useDark} from "@vueuse/core";
export default {
props: {
Expand All @@ -18,9 +20,10 @@ export default {
},
data: () => ({}),
computed: {
isDarkMode () {
return window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
setup () {
const isDark = useDark()
return {
isDark
}
},
Expand Down
2 changes: 1 addition & 1 deletion client/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="main-layout min-h-screen flex flex-col">
<!-- <Navbar />-->
<Navbar />

<slot class="flex-grow">
</slot>
Expand Down
11 changes: 11 additions & 0 deletions client/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,16 @@ export default defineNuxtConfig({
},
sentry: {
dsn: opnformConfig.sentry_dsn,
},
routeRules: {
'/ai-form-builder': {
swr: 60*60
},
'/privacy-policy': {
swr: 60*60
},
'/terms-conditions': {
swr: 60*60
},
}
})
6 changes: 3 additions & 3 deletions client/pages/ai-form-builder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</p>

<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
</v-button>
<v-button v-else class="mr-1" :to="{ name: 'forms.create' }" :arrow="true">
Expand Down Expand Up @@ -270,7 +270,7 @@
<!--&lt;!&ndash; </p>&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; </v-button>&ndash;&gt;-->
<!--&lt;!&ndash; <v-button v-else class="mr-1" :to="{ name: 'forms.create' }" :arrow="true">&ndash;&gt;-->
Expand Down Expand Up @@ -443,7 +443,7 @@
</p>

<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
</v-button>
<v-button v-else class="mr-1" :to="{ name: 'forms.create' }" :arrow="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
<script>
import { computed } from 'vue'
import Form from 'vform'
import { useTemplatesStore } from '../../stores/templates'
import { useWorkingFormStore } from '../../stores/working_form'
import { useWorkspacesStore } from '../../stores/workspaces'
import { useTemplatesStore } from '../../../stores/templates.js'
import { useWorkingFormStore } from '../../../stores/working_form.js'
import { useWorkspacesStore } from '../../../stores/workspaces.js'
import QuickRegister from '~/components/pages/auth/components/QuickRegister.vue'
import initForm from '../../mixins/form_editor/initForm.js'
import SeoMeta from '../../mixins/seo-meta.js'
import CreateFormBaseModal from '../../components/pages/forms/create/CreateFormBaseModal.vue'
import initForm from '../../../mixins/form_editor/initForm.js'
import SeoMeta from '../../../mixins/seo-meta.js'
import CreateFormBaseModal from '../../../components/pages/forms/create/CreateFormBaseModal.vue'
const loadTemplates = function () {
const templatesStore = useTemplatesStore()
Expand Down
32 changes: 16 additions & 16 deletions client/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@
</p>

<div class="mt-8 flex justify-center">
<!-- <v-button v-if="!authenticated" class="mr-1" :to="{ name: 'forms.create.guest' }" :arrow="true">-->
<!-- Create a form for FREE-->
<!-- </v-button>-->
<!-- <v-button v-else class="mr-1" :to="{ name: 'forms.create' }" :arrow="true">-->
<!-- Create a form for FREE-->
<!-- </v-button>-->
<v-button v-if="!authenticated" class="mr-1" :to="{ name: 'forms-create-guest' }" :arrow="true">
Create a form for FREE
</v-button>
<v-button v-else class="mr-1" :to="{ name: 'forms.create' }" :arrow="true">
Create a form for FREE
</v-button>
</div>

<div class="justify-center flex gap-2 mt-10">
Expand Down Expand Up @@ -118,13 +118,13 @@
</template>
</pricing-table>

<!-- <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>-->
<!-- <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.-->
<!-- </p>-->
<!-- <testimonials/>-->
<!-- </div>-->
<!-- <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>-->
<!-- <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.-->
<!-- </p>-->
<!-- <testimonials/>-->
<!-- </div>-->

<!-- <templates-slider class="max-w-full mb-12"/>-->

Expand All @@ -136,9 +136,9 @@
Generous, unlimited free plan.
</p>
<div class="mt-6 flex justify-center">
<!-- <v-button v-track.welcome_create_form_click :to="{ name: 'forms.create.guest' }" :arrow="true" color="blue">-->
<!-- Create a form for FREE-->
<!-- </v-button>-->
<v-button v-track.welcome_create_form_click :to="{ name: 'forms-create-guest' }" :arrow="true" color="blue">
Create a form for FREE
</v-button>
</div>
<div class="flex justify-center mt-6">
<a target="_blank" :href="configLinks.twitter" class="mr-4">
Expand Down

0 comments on commit 6ee56ac

Please sign in to comment.