From 13de6c8bf0f1dc427129f7bdc6f7157e2aa1a3a6 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Tue, 19 Sep 2023 10:26:56 +0530 Subject: [PATCH 01/13] fix: gallery card design --- .../nc-gui/components/smartsheet/Gallery.vue | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/Gallery.vue b/packages/nc-gui/components/smartsheet/Gallery.vue index de737f0cc0..6b9a642a90 100644 --- a/packages/nc-gui/components/smartsheet/Gallery.vue +++ b/packages/nc-gui/components/smartsheet/Gallery.vue @@ -274,7 +274,7 @@ watch( @@ -287,13 +287,18 @@ watch(
-
+
- - - + + +
@@ -356,6 +361,10 @@ watch( grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); } +.ant-card-body { + @apply !p-0; +} + :deep(.slick-dots li button) { background-color: black; } From 2dc4665050c31577288e2c11c6937f26f47eb0e6 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Tue, 19 Sep 2023 12:55:38 +0530 Subject: [PATCH 02/13] feat: cleanup gallery view --- packages/nc-gui/components.d.ts | 1 + .../nc-gui/components/smartsheet/Gallery.vue | 72 +++++++++++++------ 2 files changed, 50 insertions(+), 23 deletions(-) diff --git a/packages/nc-gui/components.d.ts b/packages/nc-gui/components.d.ts index 208fef4e85..ec39c7fb6f 100644 --- a/packages/nc-gui/components.d.ts +++ b/packages/nc-gui/components.d.ts @@ -120,6 +120,7 @@ declare module '@vue/runtime-core' { MdiChatProcessingOutline: typeof import('~icons/mdi/chat-processing-outline')['default'] MdiCheck: typeof import('~icons/mdi/check')['default'] MdiChevronDown: typeof import('~icons/mdi/chevron-down')['default'] + MdiChevronLeft: typeof import('~icons/mdi/chevron-left')['default'] MdiChevronRight: typeof import('~icons/mdi/chevron-right')['default'] MdiCircleMedium: typeof import('~icons/mdi/circle-medium')['default'] MdiClose: typeof import('~icons/mdi/close')['default'] diff --git a/packages/nc-gui/components/smartsheet/Gallery.vue b/packages/nc-gui/components/smartsheet/Gallery.vue index 6b9a642a90..9307a02fd2 100644 --- a/packages/nc-gui/components/smartsheet/Gallery.vue +++ b/packages/nc-gui/components/smartsheet/Gallery.vue @@ -59,6 +59,8 @@ provide(IsFormInj, ref(false)) provide(IsGalleryInj, ref(true)) provide(IsGridInj, ref(false)) +provide(RowHeightInj, ref(1 as const)) + const isPublic = inject(IsPublicInj, ref(false)) const fields = inject(FieldsInj, ref([])) @@ -69,7 +71,11 @@ const router = useRouter() const { getPossibleAttachmentSrc } = useAttachment() -const fieldsWithoutCover = computed(() => fields.value.filter((f) => f.id !== galleryData.value?.fk_cover_image_col_id)) +const fieldsWithoutCover = computed(() => + fields.value.filter((f) => f.id !== galleryData.value?.fk_cover_image_col_id && !isPrimary(f)), +) + +const displayField = computed(() => meta.value?.columns?.find((c) => c.pv) ?? meta.value?.columns[0]) const coverImageColumn: any = computed(() => meta.value?.columnsById @@ -229,7 +235,7 @@ watch(
-