|
|
@ -155,7 +155,7 @@ const rowHeight = inject(RowHeightInj, ref()) |
|
|
|
:style="{ |
|
|
|
:style="{ |
|
|
|
height: isForm ? undefined : `max(${(rowHeight || 1) * 1.8}rem, 41px)`, |
|
|
|
height: isForm ? undefined : `max(${(rowHeight || 1) * 1.8}rem, 41px)`, |
|
|
|
}" |
|
|
|
}" |
|
|
|
class="nc-attachment-cell relative flex color-transition flex items-center" |
|
|
|
class="nc-attachment-cell relative flex color-transition flex items-center w-full" |
|
|
|
:class="{ 'justify-center': !active, 'justify-between': active }" |
|
|
|
:class="{ 'justify-center': !active, 'justify-between': active }" |
|
|
|
> |
|
|
|
> |
|
|
|
<LazyCellAttachmentCarousel /> |
|
|
|
<LazyCellAttachmentCarousel /> |
|
|
@ -184,7 +184,7 @@ const rowHeight = inject(RowHeightInj, ref()) |
|
|
|
<NcTooltip placement="bottom"> |
|
|
|
<NcTooltip placement="bottom"> |
|
|
|
<template #title> Click or drop a file into cell</template> |
|
|
|
<template #title> Click or drop a file into cell</template> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="active || !visibleItems.length" class="flex items-center gap-1"> |
|
|
|
<div v-if="active || !visibleItems.length || (isForm && visibleItems.length)" class="flex items-center gap-1"> |
|
|
|
<MaterialSymbolsAttachFile |
|
|
|
<MaterialSymbolsAttachFile |
|
|
|
class="transform dark:(!text-white) group-hover:(!text-accent scale-120) text-gray-500 text-[0.75rem]" |
|
|
|
class="transform dark:(!text-white) group-hover:(!text-accent scale-120) text-gray-500 text-[0.75rem]" |
|
|
|
/> |
|
|
|
/> |
|
|
@ -227,11 +227,12 @@ const rowHeight = inject(RowHeightInj, ref()) |
|
|
|
> |
|
|
|
> |
|
|
|
<LazyCellAttachmentImage |
|
|
|
<LazyCellAttachmentImage |
|
|
|
:alt="item.title || `#${i}`" |
|
|
|
:alt="item.title || `#${i}`" |
|
|
|
|
|
|
|
class="rounded" |
|
|
|
:class="{ |
|
|
|
:class="{ |
|
|
|
'h-7.5 w-8.8': rowHeight === 1, |
|
|
|
'h-7.5 w-8.8': rowHeight === 1, |
|
|
|
'h-11.5 w-12.8': rowHeight === 2, |
|
|
|
'h-11.5 w-12.8': rowHeight === 2, |
|
|
|
'h-16.8 w-20.8': rowHeight === 4, |
|
|
|
'h-16.8 w-20.8': rowHeight === 4, |
|
|
|
'h-20.8 !w-30': isExpandedForm || rowHeight === 6, |
|
|
|
'h-20.8 !w-30': isForm || isExpandedForm || rowHeight === 6, |
|
|
|
}" |
|
|
|
}" |
|
|
|
:srcs="getPossibleAttachmentSrc(item)" |
|
|
|
:srcs="getPossibleAttachmentSrc(item)" |
|
|
|
/> |
|
|
|
/> |
|
|
@ -252,7 +253,7 @@ const rowHeight = inject(RowHeightInj, ref()) |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div |
|
|
|
<div |
|
|
|
v-if="active" |
|
|
|
v-if="active || (isForm && visibleItems.length)" |
|
|
|
class="h-6 w-5 group cursor-pointer flex gap-1 items-center active:(ring ring-accent ring-opacity-100) rounded border-none p-1 hover:(bg-primary bg-opacity-10) dark:(!bg-slate-500)" |
|
|
|
class="h-6 w-5 group cursor-pointer flex gap-1 items-center active:(ring ring-accent ring-opacity-100) rounded border-none p-1 hover:(bg-primary bg-opacity-10) dark:(!bg-slate-500)" |
|
|
|
> |
|
|
|
> |
|
|
|
<component :is="iconMap.reload" v-if="isLoading" :class="{ 'animate-infinite animate-spin': isLoading }" /> |
|
|
|
<component :is="iconMap.reload" v-if="isLoading" :class="{ 'animate-infinite animate-spin': isLoading }" /> |
|
|
|