Skip to content

Commit

Permalink
fix navigator and transition bug
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilReinking committed Oct 25, 2024
1 parent 74a978f commit b1304ca
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
36 changes: 18 additions & 18 deletions resources/js/forms/classic/layout/FormSubmittedPage.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<template>
<div class="form-message-prose conversation-theme">
<h1>
{{ store.form?.eoc_headline || t("form_submitted") }}
</h1>
<div
v-if="store.form?.eoc_text"
class="mt-2"
v-html="store.form?.eoc_text"
></div>
</div>

<div>
<CallToActionButton
v-if="store.form?.show_cta_link && store.callToActionUrl"
:href="store.callToActionUrl"
:label="store.form?.cta_label ?? t('close')"
/>

<SocialLinks v-if="store.form?.show_social_links" class="mt-8" />
<div class="form-message-prose conversation-theme">
<h1>
{{ store.form?.eoc_headline || t("form_submitted") }}
</h1>
<div
v-if="store.form?.eoc_text"
class="mt-2"
v-html="store.form?.eoc_text"
></div>
</div>
<div>
<CallToActionButton
v-if="store.form?.show_cta_link && store.callToActionUrl"
:href="store.callToActionUrl"
:label="store.form?.cta_label ?? t('close')"
/>
<SocialLinks v-if="store.form?.show_social_links" class="mt-8" />
</div>
</div>
</template>

Expand Down
6 changes: 5 additions & 1 deletion resources/js/forms/classic/layout/Navigator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ const currentPage = computed(() => {
});
const progress = computed(() => {
return Math.round((store.currentBlockIndex / totalPages.value) * 100);
if (store.currentBlockIndex <= 0) {
return 0;
}
return Math.round(((store.currentBlockIndex + 1) / totalPages.value) * 100);
});
</script>

0 comments on commit b1304ca

Please sign in to comment.