From 5ff412038a9b879dd34748c07b13039112981879 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Wed, 3 Aug 2022 12:35:28 +0200 Subject: [PATCH 01/25] chore(gui-v2): apply theme scrollbar on ant modal --- packages/nc-gui-v2/assets/style-v2.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/nc-gui-v2/assets/style-v2.scss b/packages/nc-gui-v2/assets/style-v2.scss index c94a2803ff..462ee5f05b 100644 --- a/packages/nc-gui-v2/assets/style-v2.scss +++ b/packages/nc-gui-v2/assets/style-v2.scss @@ -104,3 +104,7 @@ html { .nc-active-btn > .ant-btn{ @apply bg-primary/20; } + +.ant-modal-wrap { + @apply !scrollbar-thin-primary; +} From 1cb745160dac1828a34485ae79a6a4c8a349ddbf Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 5 Aug 2022 16:14:16 +0800 Subject: [PATCH 02/25] fix(gui-v2): rating select object value issue --- .../smartsheet-column/RatingOptions.vue | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui-v2/components/smartsheet-column/RatingOptions.vue b/packages/nc-gui-v2/components/smartsheet-column/RatingOptions.vue index 7907a710e6..b5d4bf9640 100644 --- a/packages/nc-gui-v2/components/smartsheet-column/RatingOptions.vue +++ b/packages/nc-gui-v2/components/smartsheet-column/RatingOptions.vue @@ -35,7 +35,8 @@ const picked = ref(formState.value.meta.color || enumColor.light[0]) // set default value formState.value.meta = { - icons: { + iconIdx: 0, + icon: { full: 'mdi-star', empty: 'mdi-star-outline', }, @@ -43,22 +44,36 @@ formState.value.meta = { max: 5, ...formState.value.meta, } + +// antdv doesn't support object as value +// use iconIdx as value and update back in watch +const iconIdx = iconList.findIndex( + (ele) => ele.full === formState.value.meta.icon.full && ele.empty === formState.value.meta.icon.empty, +) + +formState.value.meta.iconIdx = iconIdx === -1 ? 0 : iconIdx + +watch( + () => formState.value.meta.iconIdx, + (v) => { + formState.value.meta.icon = iconList[v] + }, +) diff --git a/packages/nc-gui-v2/components/virtual-cell/HasMany.vue b/packages/nc-gui-v2/components/virtual-cell/HasMany.vue index 19c291bea1..d90fe2d953 100644 --- a/packages/nc-gui-v2/components/virtual-cell/HasMany.vue +++ b/packages/nc-gui-v2/components/virtual-cell/HasMany.vue @@ -6,10 +6,16 @@ import { useHasMany } from '#imports' const column = inject(ColumnInj) const value = inject(ValueInj) -const active = false +const row = inject(RowInj) -const { childMeta, loadChildMeta, primaryValueProp } = useHasMany(column as ColumnType) -await loadChildMeta() +const listItemsDlg = ref(false) +const childListDlg = ref(false) + +const { relatedTableMeta, loadRelatedTableMeta, relatedTablePrimaryValueProp, unlink } = useProvideLTARStore( + column as Required, + row, +) +await loadRelatedTableMeta() /* // import ApiFactory from '@/components/project/spreadsheet/apis/apiFactory' import { RelationTypes, UITypes, isSystemColumn } from 'nocodb-sdk' @@ -373,11 +379,11 @@ export default { -
- - more... -
- - - - - - - - - - - - - - - - - - +
+ +
+ +