NuxtLink migration (#262)

Co-authored-by: Forms Dev <chirag+new@notionforms.io>
This commit is contained in:
Chirag Chhatrala 2023-12-22 14:54:51 +05:30 committed by GitHub
parent aa38aac626
commit 3d92637ef5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 38 additions and 38 deletions

View File

@ -32,9 +32,9 @@
<p class="text-gray-500 mt-4">
Don't have an account?
<a v-if="isQuick" href="#" class="font-semibold ml-1" @click.prevent="$emit('openRegister')">Sign Up</a>
<router-link v-else :to="{name:'register'}" class="font-semibold ml-1">
<NuxtLink v-else :to="{name:'register'}" class="font-semibold ml-1">
Sign Up
</router-link>
</NuxtLink>
</p>
</form>
</div>

View File

@ -23,11 +23,11 @@
<checkbox-input :form="form" name="agree_terms" :required="true">
<template #label>
I agree with the <router-link :to="{name:'terms-conditions'}" target="_blank">
I agree with the <NuxtLink :to="{name:'terms-conditions'}" target="_blank">
Terms and conditions
</router-link> and <router-link :to="{name:'privacy-policy'}" target="_blank">
</NuxtLink> and <NuxtLink :to="{name:'privacy-policy'}" target="_blank">
Privacy policy
</router-link> of the website and I accept them.
</NuxtLink> of the website and I accept them.
</template>
</checkbox-input>
@ -39,9 +39,9 @@
<p class="text-gray-500 mt-4">
Already have an account?
<a v-if="isQuick" href="#" class="font-semibold ml-1" @click.prevent="$emit('openLogin')">Log In</a>
<router-link v-else :to="{name:'login'}" class="font-semibold ml-1">
<NuxtLink v-else :to="{name:'login'}" class="font-semibold ml-1">
Log In
</router-link>
</NuxtLink>
</p>
</form>
</div>

View File

@ -67,7 +67,7 @@
<p class="font-medium">
Start from a template
</p>
<router-link v-track.select_form_base="{base:'template'}" :to="{name:'templates'}" class="absolute inset-0" />
<NuxtLink v-track.select_form_base="{base:'template'}" :to="{name:'templates'}" class="absolute inset-0" />
</div>
</div>
<div v-else-if="state=='ai'">

View File

@ -21,9 +21,9 @@
<div class="border-t mt-1 p-4 pb-2 -mx-2">
<p class="text-gray-500 text-sm" v-html="cleaningContent" />
<p class="text-gray-500 text-sm mb-4 font-semibold">
<router-link :to="{name:'pricing'}">
<NuxtLink :to="{name:'pricing'}">
{{ form.is_pro ? 'Upgrade your OpnForms plan today' : 'Start your free OpnForms trial' }}
</router-link>
</NuxtLink>
to unlock all of our features and build powerful forms.
</p>
<div class="flex flex-wrap items-end w-full">

View File

@ -32,9 +32,9 @@
<template-tags :template="template"
class="flex mt-4 items-center flex-wrap gap-3"
/>
<router-link :to="{params:{slug:template.slug},name:'templates-slug'}" title="">
<NuxtLink :to="{params:{slug:template.slug},name:'templates-slug'}" title="">
<span class="absolute inset-0" aria-hidden="true" />
</router-link>
</NuxtLink>
</div>
</template>

View File

@ -48,13 +48,13 @@
</div>
<div class="grid grid-cols-1 gap-x-8 gap-y-4 mt-8 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
<router-link v-for="row in types" :key="row.slug"
<NuxtLink v-for="row in types" :key="row.slug"
:to="{params: {slug:row.slug}, name:'templates-types-slug'}"
:title="row.name"
class="text-gray-600 dark:text-gray-400 transition-colors duration-300 hover:text-nt-blue"
>
{{ row.name }}
</router-link>
</NuxtLink>
</div>
</div>
</section>
@ -71,13 +71,13 @@
</div>
<div class="grid grid-cols-1 gap-x-8 gap-y-4 mt-8 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
<router-link v-for="row in industries" :key="row.slug"
<NuxtLink v-for="row in industries" :key="row.slug"
:to="{params:{slug:row.slug}, name:'templates-industries-slug'}"
:title="row.name"
class="text-gray-600 dark:text-gray-400 transition-colors duration-300 hover:text-nt-blue"
>
{{ row.name }}
</router-link>
</NuxtLink>
</div>
</div>
</section>

View File

@ -12,7 +12,7 @@
</p>
</div>
<div class="my-3 flex justify-center">
<router-link :to="{name:'templates'}">
<NuxtLink :to="{name:'templates'}">
See all templates
<svg class="h-4 w-4 inline" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd"
@ -20,7 +20,7 @@
clip-rule="evenodd"
/>
</svg>
</router-link>
</NuxtLink>
</div>
<div v-if="sliderTemplates.length > 0"

View File

@ -9,18 +9,18 @@
{{ success }}
</div>
<router-link :to="{ name: 'login' }" class="btn btn-primary">
<NuxtLink :to="{ name: 'login' }" class="btn btn-primary">
Login
</router-link>
</NuxtLink>
</template>
<template v-else>
<div class="alert alert-danger" role="alert">
{{ error || 'Failed to verify email.' }}
</div>
<router-link :to="{ name: 'verification.resend' }" class="small float-right">
<NuxtLink :to="{ name: 'auth-verification-resend' }" class="small float-right">
Resend Verification Link?
</router-link>
</NuxtLink>
</template>
</div>
</div>

View File

@ -9,9 +9,9 @@
</h1>
<div class="links">
<router-link :to="{ name: 'index' }" class="hover:underline text-gray-700">
<NuxtLink :to="{ name: 'index' }" class="hover:underline text-gray-700">
Go Home
</router-link>
</NuxtLink>
</div>
</div>
</div>

View File

@ -24,9 +24,9 @@
Unfortunately we could not find this form. It may have been deleted by it's author.
</p>
<p class="mb-10 mt-4">
<router-link :to="{name:'index'}">
<NuxtLink :to="{name:'index'}">
Create your form for free with OpnForm
</router-link>
</NuxtLink>
</p>
</div>
<div v-else-if="formLoading">

View File

@ -110,10 +110,10 @@
<pricing-table v-if="paidPlansEnabled" class="pb-20" :home-page="true">
<template #pricing-table>
<li class="flex gap-x-3">
<router-link :to="{name:'pricing'}" class="flex gap-3">
<NuxtLink :to="{name:'pricing'}" class="flex gap-3">
<div class="w-5"/>
Read more about our pricing
</router-link>
</NuxtLink>
</li>
</template>
</pricing-table>

View File

@ -15,12 +15,12 @@
<div class="mt-4 border-b border-gray-200 dark:border-gray-700">
<ul class="flex flex-wrap -mb-px text-sm font-medium text-center">
<li v-for="(tab, i) in tabsList" :key="i+1" class="mr-6">
<router-link :to="{ name: tab.route }"
<NuxtLink :to="{ name: tab.route }"
class="hover:no-underline inline-block py-4 rounded-t-lg border-b-2 text-gray-500 hover:text-gray-600"
active-class="text-blue-600 hover:text-blue-900 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500"
>
{{ tab.name }}
</router-link>
</NuxtLink>
</li>
</ul>
</div>
@ -65,33 +65,33 @@ export default {
const tabs = [
{
name: 'Profile',
route: 'settings.profile'
route: 'settings-profile'
},
{
name: 'Workspace Settings',
route: 'settings.workspaces'
route: 'settings-workspace'
},
{
name: 'Password',
route: 'settings.password'
route: 'settings-password'
},
{
name: 'Delete Account',
route: 'settings.account'
route: 'settings-account'
}
]
if (this.user.is_subscribed) {
tabs.splice(1, 0, {
name: 'Billing',
route: 'settings.billing'
route: 'settings-billing'
})
}
if (this.user.admin) {
tabs.push({
name: 'Admin',
route: 'settings.admin'
route: 'settings-admin'
})
}

View File

@ -156,9 +156,9 @@
Copy the template and change it the way you like
</h5>
<p class="mt-2 text-sm font-normal text-gray-600">
<router-link :to="{path:createFormWithTemplateUrl}">
<NuxtLink :to="{path:createFormWithTemplateUrl}">
Click here to copy this template
</router-link>
</NuxtLink>
and start customizing it. Change the questions, add new ones, choose colors and
more.
</p>