Fix show route name - password, navbar etc

This commit is contained in:
Julien Nahum 2024-01-16 12:58:41 +01:00
parent b8bbe5bb3e
commit ac82040080
3 changed files with 5 additions and 5 deletions

View File

@ -170,7 +170,7 @@ export default {
return this.opnformConfig.links.help_url return this.opnformConfig.links.help_url
}, },
form() { form() {
if (this.$route.name && this.$route.name.startsWith('forms.show_public')) { if (this.$route.name && this.$route.name.startsWith('forms-slug')) {
return this.formsStore.getByKey(this.$route.params.slug) return this.formsStore.getByKey(this.$route.params.slug)
} }
return null return null
@ -182,12 +182,12 @@ export default {
return this.config.public.paidPlansEnabled return this.config.public.paidPlansEnabled
}, },
showAuth() { showAuth() {
return this.$route.name && !this.$route.name.startsWith('forms.show_public') return this.$route.name && !this.$route.name.startsWith('forms-slug')
}, },
hasNavbar() { hasNavbar() {
if (this.isIframe) return false if (this.isIframe) return false
if (this.$route.name && this.$route.name.startsWith('forms.show_public')) { if (this.$route.name && this.$route.name.startsWith('forms-slug')) {
if (this.form) { if (this.form) {
// If there is a cover, or if branding is hidden remove nav // If there is a cover, or if branding is hidden remove nav
if (this.form.cover_picture || this.form.no_branding) { if (this.form.cover_picture || this.form.no_branding) {

View File

@ -158,7 +158,7 @@ export default {
return this.themes[this.themes.hasOwnProperty(this.form.theme) ? this.form.theme : 'default'] return this.themes[this.themes.hasOwnProperty(this.form.theme) ? this.form.theme : 'default']
}, },
isPublicFormPage () { isPublicFormPage () {
return this.$route.name === 'forms.show_public' return this.$route.name === 'forms-slug'
}, },
isHideTitle () { isHideTitle () {
return this.form.hide_title || (process.client && window.location.href.includes('hide_title=true')) return this.form.hide_title || (process.client && window.location.href.includes('hide_title=true'))

View File

@ -166,7 +166,7 @@ export default {
}[field.type] }[field.type]
}, },
isPublicFormPage () { isPublicFormPage () {
return this.$route.name === 'forms.show_public' return this.$route.name === 'forms-slug'
}, },
isFieldHidden () { isFieldHidden () {
return !this.showHidden && this.shouldBeHidden return !this.showHidden && this.shouldBeHidden