diff --git a/packages/nc-gui/assets/style.scss b/packages/nc-gui/assets/style.scss index f1cc42ee0d..37053961ad 100644 --- a/packages/nc-gui/assets/style.scss +++ b/packages/nc-gui/assets/style.scss @@ -60,6 +60,55 @@ main { @apply !rounded-lg !py-2 !px-3 mb-1; } +.nc-input-sm { + @apply !rounded-lg !py-1 !px-3; +} + +.nc-input-shadow { + &.ant-input { + &:not(:hover):not(:focus):not(:disabled) { + @apply shadow-default border-gray-200; + } + + &:hover:not(:focus):not(:disabled) { + @apply border-gray-200 shadow-hover; + } + &:focus { + @apply shadow-selected ring-0; + } + } +} + +.ant-form-item-explain { + @apply !min-h-5; + .ant-form-item-explain-error { + @apply text-sm; + &:first-child { + @apply mt-1; + } + } +} + +.ant-form-item-has-error :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper, +.ant-form-item-has-error + :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:hover, +.ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input, +.ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover, +.ant-form-item-has-error + :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper, +.ant-form-item-has-error + :not(.ant-input-number-affix-wrapper-disabled):not( + .ant-input-number-affix-wrapper-borderless + ).ant-input-number-affix-wrapper:hover { + border-color: var(--ant-error-color) !important; +} + +ant-form-item-explain-error { + &:first-child { + @apply mt-2; + } +} + .mobile { .nc-scrollbar-md, .nc-scrollbar-lg, @@ -266,6 +315,21 @@ a { } } +.ant-form-item:not(.ant-form-item-has-error) + .nc-select-shadow.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) + .ant-select-selector { + @apply !shadow-selected; +} + +.ant-form-item.ant-form-item-has-error + .nc-select-shadow.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input).ant-select-focused + .ant-select-selector, +.ant-form-item.ant-form-item-has-error + .nc-select-shadow.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input).ant-select-open + .ant-select-selector { + @apply !shadow-error; +} + // select dropdown border style .ant-select-dropdown { @apply border-1 border-gray-200 rounded-lg; diff --git a/packages/nc-gui/components/cell/RichText.vue b/packages/nc-gui/components/cell/RichText.vue index bc7d346a2d..27ec64ad08 100644 --- a/packages/nc-gui/components/cell/RichText.vue +++ b/packages/nc-gui/components/cell/RichText.vue @@ -217,7 +217,7 @@ const onFocusWrapper = () => { if (props.syncValueChange) { watch([vModel, editor], () => { - setEditorContent(vModel.value) + setEditorContent(isFormField.value ? (vModel.value || '')?.replace(/(
)+$/g, '') : vModel.value) }) } diff --git a/packages/nc-gui/components/cell/attachment/RenameFile.vue b/packages/nc-gui/components/cell/attachment/RenameFile.vue index c850c5c421..a8480cac05 100644 --- a/packages/nc-gui/components/cell/attachment/RenameFile.vue +++ b/packages/nc-gui/components/cell/attachment/RenameFile.vue @@ -46,28 +46,24 @@ onMounted(() => { - - diff --git a/packages/nc-gui/components/dashboard/TreeView/CreateViewBtn.vue b/packages/nc-gui/components/dashboard/TreeView/CreateViewBtn.vue index 35d3fefbbd..b0a8057426 100644 --- a/packages/nc-gui/components/dashboard/TreeView/CreateViewBtn.vue +++ b/packages/nc-gui/components/dashboard/TreeView/CreateViewBtn.vue @@ -37,6 +37,7 @@ async function onOpenModal({ copyViewId, groupingFieldColumnId, calendarRange, + coverImageColumnId, }: { title?: string type: ViewTypes @@ -46,6 +47,7 @@ async function onOpenModal({ fk_from_column_id: string fk_to_column_id: string | null // for ee only }> + coverImageColumnId?: string }) { if (isViewListLoading.value) return @@ -69,6 +71,7 @@ async function onOpenModal({ 'selectedViewId': copyViewId, calendarRange, groupingFieldColumnId, + coverImageColumnId, 'onUpdate:modelValue': closeDialog, 'onCreated': async (view: ViewType) => { closeDialog() diff --git a/packages/nc-gui/components/dashboard/TreeView/ViewsList.vue b/packages/nc-gui/components/dashboard/TreeView/ViewsList.vue index cc7c890357..a4c90a6db7 100644 --- a/packages/nc-gui/components/dashboard/TreeView/ViewsList.vue +++ b/packages/nc-gui/components/dashboard/TreeView/ViewsList.vue @@ -13,6 +13,7 @@ interface Emits { title?: string copyViewId?: string groupingFieldColumnId?: string + coverImageColumnId?: string }, ): void @@ -337,6 +338,7 @@ function onOpenModal({ copyViewId, groupingFieldColumnId, calendarRange, + coverImageColumnId, }: { title?: string type: ViewTypes @@ -346,6 +348,7 @@ function onOpenModal({ fk_from_column_id: string fk_to_column_id: string | null // for ee only }> + coverImageColumnId?: string }) { const isOpen = ref(true) @@ -358,6 +361,7 @@ function onOpenModal({ groupingFieldColumnId, 'views': views, calendarRange, + coverImageColumnId, 'onUpdate:modelValue': closeDialog, 'onCreated': async (view: ViewType) => { closeDialog() diff --git a/packages/nc-gui/components/dashboard/TreeView/ViewsNode.vue b/packages/nc-gui/components/dashboard/TreeView/ViewsNode.vue index 45a5f1d975..e095e6f70a 100644 --- a/packages/nc-gui/components/dashboard/TreeView/ViewsNode.vue +++ b/packages/nc-gui/components/dashboard/TreeView/ViewsNode.vue @@ -21,7 +21,10 @@ interface Emits { (event: 'delete', view: ViewType): void - (event: 'openModal', data: { type: ViewTypes; title?: string; copyViewId?: string; groupingFieldColumnId?: string }): void + ( + event: 'openModal', + data: { type: ViewTypes; title?: string; copyViewId?: string; groupingFieldColumnId?: string; coverImageColumnId?: string }, + ): void } const props = defineProps() diff --git a/packages/nc-gui/components/dlg/ProjectDelete.vue b/packages/nc-gui/components/dlg/ProjectDelete.vue index cf0e898bd2..7f3eae08f6 100644 --- a/packages/nc-gui/components/dlg/ProjectDelete.vue +++ b/packages/nc-gui/components/dlg/ProjectDelete.vue @@ -51,7 +51,7 @@ const onDelete = async () => {