From b8ebb1df043e139730468110b3747991505fdcae Mon Sep 17 00:00:00 2001 From: Yoones Khoshghadam Date: Thu, 5 Dec 2024 04:04:08 +0000 Subject: [PATCH] fix (nc-gui): polished attachment cell item sizing and positioning --- .../components/cell/attachment/index.vue | 82 ++++++++----------- 1 file changed, 32 insertions(+), 50 deletions(-) diff --git a/packages/nc-gui/components/cell/attachment/index.vue b/packages/nc-gui/components/cell/attachment/index.vue index 5617e5d759..b582582dc3 100644 --- a/packages/nc-gui/components/cell/attachment/index.vue +++ b/packages/nc-gui/components/cell/attachment/index.vue @@ -320,13 +320,7 @@ defineExpose({
@@ -346,14 +340,14 @@ defineExpose({
- + @@ -362,11 +356,11 @@ defineExpose({ type="secondary" size="xsmall" data-testid="attachment-cell-file-picker-button" - class="!px-2 !h-5.5 !min-w-[fit-content]" + class="!px-2 !h-7 !min-w-[fit-content]" @click.stop="open" > -
- +
+ {{ $t('activity.addFiles') }} @@ -380,54 +374,42 @@ defineExpose({ ref="sortableRef" :class="{ 'justify-center': !isGallery && !isKanban, - 'py-1': rowHeight === 1, - 'py-1.5 !gap-4 ': rowHeight !== 1, }" - class="nc-attachment-wrapper flex cursor-pointer w-full items-center flex-wrap gap-3 nc-scrollbar-thin mt-0 items-start px-[1px]" + class="nc-attachment-wrapper flex cursor-pointer w-full items-center flex-wrap gap-2 mt-0 items-start overflow-y-auto nc-scrollbar-thin" :style="{ - maxHeight: `max(100%, ${isGrid ? '22px' : '32px'})`, + height: `max(${!rowHeight || rowHeight === 1 ? rowHeightInPx['1']: rowHeightInPx[`${rowHeight}`] - 17}px, ${isGrid ? 22 : 32}px)`, + paddingTop: !rowHeight || rowHeight === 1 ? '4px !important' : undefined, + paddingBottom: !rowHeight || rowHeight === 1 ? '4px !important' : undefined, }" > - +
+