104a6 simpler submit transition (#576)
* better submit transition * transition --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
parent
33ad2d41b8
commit
47ae11bc58
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<transition
|
<transition
|
||||||
v-if="name == 'slideInUp'"
|
v-if="name === 'slideInUp'"
|
||||||
enter-active-class="linear duration-300 overflow-hidden"
|
enter-active-class="linear duration-300 overflow-hidden"
|
||||||
enter-from-class="max-h-0"
|
enter-from-class="max-h-0"
|
||||||
enter-to-class="max-h-screen"
|
enter-to-class="max-h-screen"
|
||||||
|
|
@ -10,11 +10,25 @@
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</transition>
|
</transition>
|
||||||
|
<transition
|
||||||
|
v-else-if="name === 'fade'"
|
||||||
|
mode="out-in"
|
||||||
|
enter-active-class="transition-opacity duration-300"
|
||||||
|
enter-from-class="opacity-0"
|
||||||
|
enter-to-class="opacity-100"
|
||||||
|
leave-active-class="transition-opacity duration-300"
|
||||||
|
leave-from-class="opacity-100"
|
||||||
|
leave-to-class="opacity-0"
|
||||||
|
>
|
||||||
|
<slot />
|
||||||
|
</transition>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
export default {
|
const props = defineProps({
|
||||||
name: "VTransition",
|
name: {
|
||||||
props: { name: {type: String, default: "slideInUp" } },
|
type: String,
|
||||||
|
default: "slideInUp"
|
||||||
}
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<v-transition>
|
<v-transition name="fade">
|
||||||
<div
|
<div
|
||||||
v-if="!form.is_password_protected && form.password && !hidePasswordDisabledMsg"
|
v-if="!form.is_password_protected && form.password && !hidePasswordDisabledMsg"
|
||||||
class="border shadow-sm p-2 my-4 flex items-center rounded-md bg-yellow-100 dark:bg-yellow-600/20 border-yellow-500 dark:border-yellow-500/20"
|
class="border shadow-sm p-2 my-4 flex items-center rounded-md bg-yellow-100 dark:bg-yellow-600/20 border-yellow-500 dark:border-yellow-500/20"
|
||||||
|
|
@ -100,16 +100,7 @@
|
||||||
:specify-form-owner="true"
|
:specify-form-owner="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<transition
|
<v-transition name="fade">
|
||||||
v-if="!form.is_password_protected && (!isPublicFormPage || (!form.is_closed && !form.max_number_of_submissions_reached && form.visibility!='closed'))"
|
|
||||||
enter-active-class="duration-500 ease-out"
|
|
||||||
enter-from-class="translate-x-full opacity-0"
|
|
||||||
enter-to-class="translate-x-0 opacity-100"
|
|
||||||
leave-active-class="duration-500 ease-in"
|
|
||||||
leave-from-class="translate-x-0 opacity-100"
|
|
||||||
leave-to-class="translate-x-full opacity-0"
|
|
||||||
mode="out-in"
|
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
v-if="!submitted"
|
v-if="!submitted"
|
||||||
key="form"
|
key="form"
|
||||||
|
|
@ -193,7 +184,7 @@
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</v-transition>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue