Clean metaInfo SEO (#40)
* Clean metaInfo SEO * fix path Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
@@ -29,6 +29,7 @@ import Form from 'vform'
|
||||
import {mapState, mapActions} from 'vuex'
|
||||
import QuickRegister from '../auth/components/QuickRegister'
|
||||
import initForm from "../../mixins/form_editor/initForm"
|
||||
import SeoMeta from '../../mixins/seo-meta'
|
||||
|
||||
const loadTemplates = function () {
|
||||
store.commit('open/templates/startLoading')
|
||||
@@ -39,17 +40,13 @@ const loadTemplates = function () {
|
||||
|
||||
export default {
|
||||
name: 'CreateFormGuest',
|
||||
mixins: [initForm],
|
||||
mixins: [initForm, SeoMeta],
|
||||
components: {
|
||||
QuickRegister
|
||||
},
|
||||
|
||||
middleware: 'guest',
|
||||
|
||||
metaInfo() {
|
||||
return {title: 'Create a new Form as Guest'}
|
||||
},
|
||||
|
||||
beforeRouteEnter(to, from, next) {
|
||||
loadTemplates()
|
||||
next()
|
||||
@@ -57,6 +54,7 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
metaTitle: 'Create a new Form as Guest',
|
||||
stateReady: false,
|
||||
loading: false,
|
||||
error: '',
|
||||
|
||||
@@ -22,6 +22,7 @@ import store from '~/store'
|
||||
import Form from 'vform'
|
||||
import {mapState, mapActions} from 'vuex'
|
||||
import initForm from "../../mixins/form_editor/initForm";
|
||||
import SeoMeta from '../../mixins/seo-meta'
|
||||
|
||||
const loadTemplates = function () {
|
||||
store.commit('open/templates/startLoading')
|
||||
@@ -33,13 +34,9 @@ const loadTemplates = function () {
|
||||
export default {
|
||||
name: 'CreateForm',
|
||||
|
||||
mixins: [initForm],
|
||||
mixins: [initForm, SeoMeta],
|
||||
components: {},
|
||||
|
||||
metaInfo() {
|
||||
return {title: 'Create a new Form'}
|
||||
},
|
||||
|
||||
beforeRouteEnter(to, from, next) {
|
||||
loadTemplates()
|
||||
next()
|
||||
@@ -49,6 +46,7 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
metaTitle: 'Create a new Form',
|
||||
stateReady: false,
|
||||
loading: false,
|
||||
error: '',
|
||||
|
||||
@@ -20,10 +20,9 @@
|
||||
import axios from 'axios'
|
||||
import store from '~/store'
|
||||
import Breadcrumb from '../../components/common/Breadcrumb'
|
||||
|
||||
import Form from 'vform'
|
||||
|
||||
import { mapState } from 'vuex'
|
||||
import SeoMeta from '../../mixins/seo-meta'
|
||||
|
||||
const loadForms = function () {
|
||||
store.commit('open/forms/startLoading')
|
||||
@@ -43,6 +42,7 @@ export default {
|
||||
next()
|
||||
},
|
||||
middleware: 'auth',
|
||||
mixins: [SeoMeta],
|
||||
|
||||
data () {
|
||||
return {
|
||||
@@ -70,7 +70,10 @@ export default {
|
||||
},
|
||||
pageLoaded () {
|
||||
return !this.loading && this.updatedForm !== null
|
||||
}
|
||||
},
|
||||
metaTitle () {
|
||||
return 'Edit ' + (this.form ? this.form.title : 'Your Form')
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
@@ -94,11 +97,7 @@ export default {
|
||||
this.updatedForm = new Form(this.form)
|
||||
}
|
||||
},
|
||||
|
||||
metaInfo () {
|
||||
return { title: 'Edit ' + (this.form ? this.form.title : 'Your Form') }
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* Compute max height of editor
|
||||
|
||||
@@ -9,23 +9,25 @@
|
||||
|
||||
<script>
|
||||
import FormStats from '../../../components/open/forms/components/FormStats'
|
||||
import SeoMeta from '../../../mixins/seo-meta'
|
||||
|
||||
export default {
|
||||
components: {FormStats},
|
||||
props: {
|
||||
form: { type: Object, required: true }
|
||||
},
|
||||
|
||||
metaInfo() {
|
||||
return {title: (this.form) ? 'Form Analytics - '+this.form.title : 'Form Analytics'}
|
||||
},
|
||||
mixins: [SeoMeta],
|
||||
|
||||
data: () => ({
|
||||
}),
|
||||
|
||||
mounted() {},
|
||||
|
||||
computed: {},
|
||||
computed: {
|
||||
metaTitle() {
|
||||
return (this.form) ? 'Form Analytics - '+this.form.title : 'Form Analytics'
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ import {mapGetters, mapState} from 'vuex'
|
||||
import ProTag from '../../../components/common/ProTag'
|
||||
import VButton from "../../../components/common/Button";
|
||||
import ExtraMenu from '../../../components/pages/forms/show/ExtraMenu'
|
||||
import SeoMeta from '../../../mixins/seo-meta'
|
||||
|
||||
const loadForms = function () {
|
||||
store.commit('open/forms/startLoading')
|
||||
@@ -122,6 +123,7 @@ export default {
|
||||
ProTag,
|
||||
ExtraMenu
|
||||
},
|
||||
mixins: [SeoMeta],
|
||||
|
||||
beforeRouteEnter(to, from, next) {
|
||||
loadForms()
|
||||
@@ -136,6 +138,7 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
metaTitle: 'Home',
|
||||
tabsList: [
|
||||
{
|
||||
name: 'Submissions',
|
||||
@@ -204,11 +207,7 @@ export default {
|
||||
this.workingForm = new Form(this.form)
|
||||
}
|
||||
},
|
||||
|
||||
metaInfo() {
|
||||
return {title: this.$t('home')}
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
openCrisp() {
|
||||
window.$crisp.push(['do', 'chat:show'])
|
||||
|
||||
@@ -17,6 +17,7 @@ import ShareLink from '../../../components/pages/forms/show/ShareLink'
|
||||
import EmbedCode from '../../../components/pages/forms/show/EmbedCode'
|
||||
import UrlFormPrefill from '../../../components/pages/forms/show/UrlFormPrefill'
|
||||
import RegenerateFormLink from '../../../components/pages/forms/show/RegenerateFormLink'
|
||||
import SeoMeta from '../../../mixins/seo-meta'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -28,17 +29,18 @@ export default {
|
||||
props: {
|
||||
form: { type: Object, required: true }
|
||||
},
|
||||
|
||||
metaInfo() {
|
||||
return {title: (this.form) ? 'Form Share - '+this.form.title : 'Form Share'}
|
||||
},
|
||||
mixins: [SeoMeta],
|
||||
|
||||
data: () => ({
|
||||
}),
|
||||
|
||||
mounted() {},
|
||||
|
||||
computed: {},
|
||||
computed: {
|
||||
metaTitle() {
|
||||
return (this.form) ? 'Form Share - '+this.form.title : 'Form Share'
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
|
||||
@@ -6,23 +6,25 @@
|
||||
|
||||
<script>
|
||||
import FormSubmissions from '../../../components/open/forms/components/FormSubmissions'
|
||||
import SeoMeta from '../../../mixins/seo-meta'
|
||||
|
||||
export default {
|
||||
components: {FormSubmissions},
|
||||
props: {
|
||||
form: { type: Object, required: true }
|
||||
},
|
||||
|
||||
metaInfo() {
|
||||
return {title: (this.form) ? 'Form Submissions - '+this.form.title : 'Form Submissions'}
|
||||
},
|
||||
mixins: [SeoMeta],
|
||||
|
||||
data: () => ({
|
||||
}),
|
||||
|
||||
mounted() {},
|
||||
|
||||
computed: {},
|
||||
computed: {
|
||||
metaTitle() {
|
||||
return (this.form) ? 'Form Submissions - '+this.form.title : 'Form Submissions'
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user