From 6276c9287af0a587490d7db4f6b837f6de0e2d85 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Sat, 9 Sep 2023 13:16:33 +0530 Subject: [PATCH] refactor: change placeholder text Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- packages/nc-gui/components/cell/Currency.vue | 2 +- packages/nc-gui/components/cell/Decimal.vue | 2 +- packages/nc-gui/components/cell/Duration.vue | 2 +- packages/nc-gui/components/cell/Email.vue | 2 +- packages/nc-gui/components/cell/Float.vue | 2 +- packages/nc-gui/components/cell/Integer.vue | 2 +- packages/nc-gui/components/cell/Percent.vue | 2 +- packages/nc-gui/components/cell/PhoneNumber.vue | 2 +- packages/nc-gui/components/cell/Text.vue | 2 +- packages/nc-gui/components/cell/TextArea.vue | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/nc-gui/components/cell/Currency.vue b/packages/nc-gui/components/cell/Currency.vue index be170ec3b3..fc67d9274a 100644 --- a/packages/nc-gui/components/cell/Currency.vue +++ b/packages/nc-gui/components/cell/Currency.vue @@ -79,7 +79,7 @@ onMounted(() => { v-model="vModel" type="number" class="w-full h-full text-sm border-none rounded-md outline-none" - :placeholder="isEditColumn ? 'Enter default value (Optional)' : ''" + :placeholder="isEditColumn ? '(Optional)' : ''" @blur="submitCurrency" @keydown.down.stop @keydown.left.stop diff --git a/packages/nc-gui/components/cell/Decimal.vue b/packages/nc-gui/components/cell/Decimal.vue index 669f9d3af1..547f14a227 100644 --- a/packages/nc-gui/components/cell/Decimal.vue +++ b/packages/nc-gui/components/cell/Decimal.vue @@ -97,7 +97,7 @@ watch(isExpandedFormOpen, () => { class="outline-none !py-2 !px-1 border-none rounded-md w-full h-full !text-sm" type="number" :step="precision" - :placeholder="isEditColumn ? 'Enter default value (Optional)' : ''" + :placeholder="isEditColumn ? '(Optional)' : ''" style="letter-spacing: 0.06rem" @blur="editEnabled = false" @keydown.down.stop="onKeyDown" diff --git a/packages/nc-gui/components/cell/Duration.vue b/packages/nc-gui/components/cell/Duration.vue index 5f894753c9..75e96b03c8 100644 --- a/packages/nc-gui/components/cell/Duration.vue +++ b/packages/nc-gui/components/cell/Duration.vue @@ -40,7 +40,7 @@ const isEditColumn = inject(EditColumnInj, ref(false)) const durationType = computed(() => parseProp(column?.value?.meta)?.duration || 0) const durationPlaceholder = computed(() => - isEditColumn.value ? 'Enter default value (Optional)' : durationOptions[durationType.value].title, + isEditColumn.value ? '(Optional)' : durationOptions[durationType.value].title, ) const localState = computed({ diff --git a/packages/nc-gui/components/cell/Email.vue b/packages/nc-gui/components/cell/Email.vue index 8d53cbf177..58a704e247 100644 --- a/packages/nc-gui/components/cell/Email.vue +++ b/packages/nc-gui/components/cell/Email.vue @@ -71,7 +71,7 @@ watch( :ref="focus" v-model="vModel" class="w-full outline-none text-sm px-1 py-2" - :placeholder="isEditColumn ? 'Enter default value (Optional)' : ''" + :placeholder="isEditColumn ? '(Optional)' : ''" @blur="editEnabled = false" @keydown.down.stop @keydown.left.stop diff --git a/packages/nc-gui/components/cell/Float.vue b/packages/nc-gui/components/cell/Float.vue index 39e2aa1d89..a9c8f41001 100644 --- a/packages/nc-gui/components/cell/Float.vue +++ b/packages/nc-gui/components/cell/Float.vue @@ -51,7 +51,7 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && !isEditColumn.value class="outline-none px-1 border-none w-full h-full text-sm" type="number" step="0.1" - :placeholder="isEditColumn ? 'Enter default value (Optional)' : ''" + :placeholder="isEditColumn ? '(Optional)' : ''" @blur="editEnabled = false" @keydown.down.stop @keydown.left.stop diff --git a/packages/nc-gui/components/cell/Integer.vue b/packages/nc-gui/components/cell/Integer.vue index 9c36b6a209..477232670a 100644 --- a/packages/nc-gui/components/cell/Integer.vue +++ b/packages/nc-gui/components/cell/Integer.vue @@ -88,7 +88,7 @@ function onKeyDown(e: any) { class="outline-none py-2 px-1 border-none w-full h-full text-sm" type="number" style="letter-spacing: 0.06rem" - :placeholder="isEditColumn ? 'Enter default value (Optional)' : ''" + :placeholder="isEditColumn ? '(Optional)' : ''" @blur="editEnabled = false" @keydown="onKeyDown" @keydown.down.stop diff --git a/packages/nc-gui/components/cell/Percent.vue b/packages/nc-gui/components/cell/Percent.vue index 6083e82733..5fec5b0412 100644 --- a/packages/nc-gui/components/cell/Percent.vue +++ b/packages/nc-gui/components/cell/Percent.vue @@ -42,7 +42,7 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && !isEditColumn.value class="w-full !text-sm !border-none !outline-none focus:ring-0 text-base p-1" :class="{ '!px-2': editEnabled }" type="number" - :placeholder="isEditColumn ? 'Enter default value (Optional)' : ''" + :placeholder="isEditColumn ? '(Optional)' : ''" @blur="editEnabled = false" @keydown.down.stop @keydown.left.stop diff --git a/packages/nc-gui/components/cell/PhoneNumber.vue b/packages/nc-gui/components/cell/PhoneNumber.vue index 920d002f3f..42f2f37f25 100644 --- a/packages/nc-gui/components/cell/PhoneNumber.vue +++ b/packages/nc-gui/components/cell/PhoneNumber.vue @@ -61,7 +61,7 @@ watch( :ref="focus" v-model="vModel" class="w-full outline-none text-sm px-1 py-2" - :placeholder="isEditColumn ? 'Enter default value (Optional)' : ''" + :placeholder="isEditColumn ? '(Optional)' : ''" @blur="editEnabled = false" @keydown.down.stop @keydown.left.stop diff --git a/packages/nc-gui/components/cell/Text.vue b/packages/nc-gui/components/cell/Text.vue index ce10a94160..9fc0b9209e 100644 --- a/packages/nc-gui/components/cell/Text.vue +++ b/packages/nc-gui/components/cell/Text.vue @@ -33,7 +33,7 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && !isEditColumn.value :ref="focus" v-model="vModel" class="h-full w-full outline-none p-2 bg-transparent" - :placeholder="isEditColumn ? 'Enter default value (Optional)' : ''" + :placeholder="isEditColumn ? '(Optional)' : ''" @blur="editEnabled = false" @keydown.down.stop @keydown.left.stop diff --git a/packages/nc-gui/components/cell/TextArea.vue b/packages/nc-gui/components/cell/TextArea.vue index 8434e9508f..bec6ea61e4 100644 --- a/packages/nc-gui/components/cell/TextArea.vue +++ b/packages/nc-gui/components/cell/TextArea.vue @@ -81,7 +81,7 @@ onClickOutside(inputWrapperRef, (e) => { :style="{ minHeight: `${height}px`, }" - :placeholder="isEditColumn ? 'Enter default value (Optional)' : ''" + :placeholder="isEditColumn ? '(Optional)' : ''" @blur="editEnabled = false" @keydown.alt.enter.stop @keydown.shift.enter.stop