From ac8204008069c9092c98065b9fc06b2c2c77c6cd Mon Sep 17 00:00:00 2001 From: Julien Nahum Date: Tue, 16 Jan 2024 12:58:41 +0100 Subject: [PATCH] Fix show route name - password, navbar etc --- client/components/global/Navbar.vue | 6 +++--- client/components/open/forms/OpenCompleteForm.vue | 2 +- client/components/open/forms/OpenFormField.vue | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/components/global/Navbar.vue b/client/components/global/Navbar.vue index 79607df..f1fa4e9 100644 --- a/client/components/global/Navbar.vue +++ b/client/components/global/Navbar.vue @@ -170,7 +170,7 @@ export default { return this.opnformConfig.links.help_url }, 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 null @@ -182,12 +182,12 @@ export default { return this.config.public.paidPlansEnabled }, showAuth() { - return this.$route.name && !this.$route.name.startsWith('forms.show_public') + return this.$route.name && !this.$route.name.startsWith('forms-slug') }, hasNavbar() { 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 there is a cover, or if branding is hidden remove nav if (this.form.cover_picture || this.form.no_branding) { diff --git a/client/components/open/forms/OpenCompleteForm.vue b/client/components/open/forms/OpenCompleteForm.vue index 204e63a..52337e5 100644 --- a/client/components/open/forms/OpenCompleteForm.vue +++ b/client/components/open/forms/OpenCompleteForm.vue @@ -158,7 +158,7 @@ export default { return this.themes[this.themes.hasOwnProperty(this.form.theme) ? this.form.theme : 'default'] }, isPublicFormPage () { - return this.$route.name === 'forms.show_public' + return this.$route.name === 'forms-slug' }, isHideTitle () { return this.form.hide_title || (process.client && window.location.href.includes('hide_title=true')) diff --git a/client/components/open/forms/OpenFormField.vue b/client/components/open/forms/OpenFormField.vue index a7b11d4..fe8e846 100644 --- a/client/components/open/forms/OpenFormField.vue +++ b/client/components/open/forms/OpenFormField.vue @@ -166,7 +166,7 @@ export default { }[field.type] }, isPublicFormPage () { - return this.$route.name === 'forms.show_public' + return this.$route.name === 'forms-slug' }, isFieldHidden () { return !this.showHidden && this.shouldBeHidden