UBERF-10567 Enhance attachments view in chat (#8915)
Some checks are pending
CI / hulykvs-build (push) Waiting to run
CI / dist-build (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / uitest-workspaces (push) Waiting to run
CI / docker-build (push) Blocked by required conditions

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov 2025-05-13 23:06:59 +07:00 committed by GitHub
parent 13eb029644
commit d1a338d313
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,7 +16,7 @@
import { Attachment } from '@hcengineering/attachment'
import { Ref, type WithLookup } from '@hcengineering/core'
import { ListSelectionProvider } from '@hcengineering/view-resources'
import { Scroller, updatePopup } from '@hcengineering/ui'
import { updatePopup } from '@hcengineering/ui'
import { AttachmentImageSize } from '../types'
import AttachmentPreview from './AttachmentPreview.svelte'
@ -43,7 +43,7 @@
</script>
{#if attachments.length}
<Scroller contentDirection={'horizontal'} horizontal gap={'gap-3'} scrollSnap>
<div class="gallery">
{#each attachments as attachment}
<AttachmentPreview
value={attachment}
@ -54,5 +54,13 @@
on:open={(res) => (attachmentPopupId = res.detail)}
/>
{/each}
</Scroller>
</div>
{/if}
<style lang="scss">
.gallery {
display: grid;
grid-gap: 0.75rem;
grid-template-columns: repeat(auto-fill, 20rem);
}
</style>