From 5df4488c25d6e2333939b7970ce6fe7fb7e3f485 Mon Sep 17 00:00:00 2001
From: Chirag Chhatrala <60499540+chiragchhatrala@users.noreply.github.com>
Date: Sat, 11 Mar 2023 16:43:21 +0530
Subject: [PATCH] Polish UX (#100)
---
.../js/components/open/forms/OpenForm.vue | 15 +++++---
.../form-components/FormInformation.vue | 2 +-
.../FormBlockLogicEditor.vue | 38 ++++++++++---------
.../GroupControlSlot.vue | 2 +-
4 files changed, 32 insertions(+), 25 deletions(-)
diff --git a/resources/js/components/open/forms/OpenForm.vue b/resources/js/components/open/forms/OpenForm.vue
index 77ed51e..7aee2b8 100644
--- a/resources/js/components/open/forms/OpenForm.vue
+++ b/resources/js/components/open/forms/OpenForm.vue
@@ -22,9 +22,12 @@
class="nf-code w-full px-2 mb-3"
v-html="field.content"
/>
-
+ :key="field.id" class="my-4 w-full px-2"
+ >
Open {{ field.name }}'s block settings to upload image.
@@ -249,7 +252,7 @@ export default {
mounted() {
this.initForm()
- if(window.location.href.includes('auto_submit=true')){
+ if (window.location.href.includes('auto_submit=true')) {
this.isAutoSubmit = true
this.submitForm()
}
@@ -381,7 +384,7 @@ export default {
String(dateObj.getDate()).padStart(2, '0')
if(field.with_time === true){
currentDate += 'T' + String(dateObj.getHours()).padStart(2, '0') + ':' +
- String(dateObj.getMinutes()).padStart(2, '0');
+ String(dateObj.getMinutes()).padStart(2, '0')
}
formData[field.id] = currentDate
} else { // Default prefill if any
@@ -482,17 +485,19 @@ export default {
},
previousPage() {
this.currentFieldGroupIndex -= 1
+ window.scrollTo({ top: 0, behavior: 'smooth' })
return false
},
nextPage() {
this.currentFieldGroupIndex += 1
+ window.scrollTo({ top: 0, behavior: 'smooth' })
return false
}
}
}
-