From dad8f299faa458a5969ee5f8b388e7c5ab408c6d Mon Sep 17 00:00:00 2001
From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com>
Date: Sat, 2 Mar 2024 07:32:41 +0000
Subject: [PATCH] fix(nc-gui): form view fields input ui changes
---
.../nc-gui/components/smartsheet/Cell.vue | 2 +-
.../nc-gui/components/smartsheet/Form.vue | 37 +++++++++++++------
.../index/[typeOrId]/form/[viewId]/index.vue | 35 ++++--------------
.../[typeOrId]/form/[viewId]/index/index.vue | 9 +----
4 files changed, 36 insertions(+), 47 deletions(-)
diff --git a/packages/nc-gui/components/smartsheet/Cell.vue b/packages/nc-gui/components/smartsheet/Cell.vue
index 1d3d525be2..56165395fc 100644
--- a/packages/nc-gui/components/smartsheet/Cell.vue
+++ b/packages/nc-gui/components/smartsheet/Cell.vue
@@ -202,7 +202,7 @@ onUnmounted(() => {
{
'text-brand-500': isPrimary(column) && !props.virtual && !isForm && !isCalendar,
'nc-grid-numeric-cell-right': isGrid && isNumericField && !isEditColumnMenu && !isForm && !isExpandedFormOpen,
- 'h-10': isForm && !isSurveyForm && !isAttachment(column) && !props.virtual,
+ 'h-10': isForm && !isSurveyForm && !isAttachment(column) && !isTextArea(column) && !isJSON(column) && !props.virtual,
'nc-grid-numeric-cell-left': (isForm && isNumericField && isExpandedFormOpen) || isEditColumnMenu,
'!min-h-30': isTextArea(column) && (isForm || isSurveyForm),
},
diff --git a/packages/nc-gui/components/smartsheet/Form.vue b/packages/nc-gui/components/smartsheet/Form.vue
index f6474bf6c0..392059e066 100644
--- a/packages/nc-gui/components/smartsheet/Form.vue
+++ b/packages/nc-gui/components/smartsheet/Form.vue
@@ -694,18 +694,30 @@ useEventListener(
{{ formViewData.heading }}
-
- {{ formViewData.subheading }}
-
+
+
+
-
+
-
- {{ formViewData.success_msg || $t('msg.successfullySubmittedFormData') }}
-
+
+ {{ $t('msg.successfullySubmittedFormData') }}
@@ -1629,10 +1641,6 @@ useEventListener(
}
&:not(.nc-cell-longtext) {
@apply px-2 py-2;
-
- :deep(textarea) {
- @apply !p-2;
- }
}
&.nc-cell-json {
@@ -1641,6 +1649,13 @@ useEventListener(
@apply w-full;
}
}
+
+ :deep(.ant-picker) {
+ @apply !py-0;
+ }
+ :deep(input.nc-cell-field) {
+ @apply !py-0;
+ }
}
.nc-form-input-label {
diff --git a/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index.vue b/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index.vue
index 0eb912d2ea..fb2e45ff2c 100644
--- a/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index.vue
+++ b/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index.vue
@@ -9,11 +9,6 @@ const route = useRoute()
const router = useRouter()
-// For now dark theme is disabled
-// const onClick = () => {
-// isDark.value = !isDark.value
-// }
-
onMounted(() => {
isDark.value = false
})
@@ -39,16 +34,6 @@ router.afterEach((to) => shouldRedirect(to.name as string))
}"
>
-
-
@@ -153,32 +138,26 @@ p {
& > div {
@apply w-full;
}
- :deep(textarea) {
- @apply !p-2;
- &:focus {
- box-shadow: none !important;
- }
+ textarea {
+ @apply px-3;
}
}
&:not(.nc-cell-longtext) {
@apply p-2;
}
- textarea {
- @apply px-4 py-2 rounded;
-
- &:focus {
- box-shadow: none !important;
- }
- }
-
&.nc-cell-json {
@apply h-auto;
& > div {
@apply w-full;
}
}
+
+ .ant-picker,
+ input.nc-cell-field {
+ @apply !py-0 !px-1;
+ }
}
}
diff --git a/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/index.vue b/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/index.vue
index 70a3e08f76..df37386d8c 100644
--- a/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/index.vue
+++ b/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/index.vue
@@ -111,12 +111,7 @@ const onDecode = async (scannedCodeValue: string) => {
-
+
{
read-only
sync-value-change
/>
- Successfully submitted form data
+ {{ $t('msg.successfullySubmittedFormData') }}