From c6b757d67ca68a3d2b48f2f4c478f41b76c19db8 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Wed, 18 May 2022 07:05:29 +0300 Subject: [PATCH] Telegram: latest messages below. Update AttachmentPreview layout. (#1768) --- .../src/components/AttachmentActions.svelte | 18 +-- .../src/components/AttachmentList.svelte | 10 +- .../src/components/AttachmentPreview.svelte | 104 ++++++++++-------- .../src/components/Chat.svelte | 2 +- 4 files changed, 68 insertions(+), 66 deletions(-) diff --git a/plugins/attachment-resources/src/components/AttachmentActions.svelte b/plugins/attachment-resources/src/components/AttachmentActions.svelte index f5ab9ae83dd..e61acd98289 100644 --- a/plugins/attachment-resources/src/components/AttachmentActions.svelte +++ b/plugins/attachment-resources/src/components/AttachmentActions.svelte @@ -15,7 +15,7 @@ -
- - + - - diff --git a/plugins/attachment-resources/src/components/AttachmentList.svelte b/plugins/attachment-resources/src/components/AttachmentList.svelte index ab6ffbd6a34..1d1d4ad9b2a 100644 --- a/plugins/attachment-resources/src/components/AttachmentList.svelte +++ b/plugins/attachment-resources/src/components/AttachmentList.svelte @@ -22,17 +22,11 @@ {#if attachments.length} -
+
{#each attachments as attachment} -
+
{/each}
{/if} - - diff --git a/plugins/attachment-resources/src/components/AttachmentPreview.svelte b/plugins/attachment-resources/src/components/AttachmentPreview.svelte index 57a9ac26556..b08b11172b4 100644 --- a/plugins/attachment-resources/src/components/AttachmentPreview.svelte +++ b/plugins/attachment-resources/src/components/AttachmentPreview.svelte @@ -28,63 +28,81 @@ $: type = getType(value.type) -
- {#if type === 'image'} -
{ - closeTooltip() - showPopup(PDFViewer, { file: value.file, name: value.name, contentType: value.type }, 'right') - }} - > - {value.name} -
- -
+{#if type === 'image'} +
{ + closeTooltip() + showPopup(PDFViewer, { file: value.file, name: value.name, contentType: value.type }, 'right') + }} + > + {value.name} +
+
- {:else if type === 'audio'} -
- -
- -
+
+{:else if type === 'audio'} +
+ +
+
- {:else if type === 'video'} -
- -
- +
+{:else if type === 'video'} +
+ +
+
- {:else} -
- -
- -
+
+{:else} +
+ +
+
- {/if} -
+
+{/if}