Skip to content

Commit

Permalink
When form is focused mode make cover image screen
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragchhatrala committed Dec 10, 2024
1 parent 61143fc commit 9a19502
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions client/pages/forms/[slug]/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
<div v-if="form.cover_picture">
<div
id="cover-picture"
class="max-h-56 w-full overflow-hidden flex items-center justify-center"
class="w-full overflow-hidden flex items-center justify-center"
:class="{'h-screen': isFocused, 'max-h-56': !isFocused}"
>
<img
alt="Form Cover Picture"
:src="form.cover_picture"
class="w-full"
:class="{'h-screen object-cover': isFocused}"
>
</div>
</div>
Expand Down Expand Up @@ -59,14 +61,16 @@
<loader class="h-6 w-6 text-nt-blue mx-auto" />
</p>
</div>
<OpenCompleteForm
v-show="!recordLoading"
ref="openCompleteForm"
:form="form"
class="mb-10"
:dark-mode="darkMode"
@password-entered="passwordEntered"
/>
<div :class="{'absolute inset-0 flex items-center justify-center': isFocused}">
<OpenCompleteForm
v-show="!recordLoading"
ref="openCompleteForm"
:form="form"
class="mb-10"
:dark-mode="darkMode"
@password-entered="passwordEntered"
/>
</div>
</template>
</div>
</div>
Expand Down Expand Up @@ -95,6 +99,8 @@ const slug = useRoute().params.slug
const form = computed(() => formsStore.getByKey(slug))
const $t = useI18n()
const isFocused = computed(() => form.value.format === 'focused')
const openCompleteForm = ref(null)
const passwordEntered = function (password) {
Expand Down

0 comments on commit 9a19502

Please sign in to comment.