Implement AI Loading Messages and Enhance Locale Handling in Forms (#737)

- Added a new `AIFormLoadingMessages` component to display dynamic loading messages with emojis during form processing, improving user feedback.
- Enhanced locale handling in `OpenCompleteForm.vue` to default to English if an invalid locale is provided, ensuring better user experience and error handling.

These changes aim to provide clearer loading states and improve localization robustness in form components.

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Chirag Chhatrala
2025-04-01 21:24:10 +05:30
committed by GitHub
parent 7efa8ed9cb
commit efb2aabe0a
3 changed files with 114 additions and 2 deletions

View File

@@ -151,8 +151,14 @@
help="Give us a description of the form you want to build (the more details the better)"
placeholder="A simple contact form, with a name, email and message field"
/>
<div
v-if="loading"
class="my-4"
>
<AIFormLoadingMessages />
</div>
<v-button
class="w-full"
class="w-full mt-4"
:loading="loading"
@click.prevent="generateForm"
>
@@ -166,7 +172,12 @@
</template>
<script>
import AIFormLoadingMessages from "~/components/open/forms/components/AIFormLoadingMessages.vue"
export default {
components: {
AIFormLoadingMessages,
},
props: {
show: { type: Boolean, required: true },
},