UBER-796: fixed AttachmentActions (#3709)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2023-09-18 07:30:37 +03:00 committed by GitHub
parent fe3ef83a72
commit 50660dfecc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,8 @@
export let attachment: Attachment
export let isSaved = false
let download: HTMLAnchorElement
$: saveAttachmentAction = isSaved
? ({
label: attachmentPlugin.string.RemoveAttachmentFromSaved,
@ -67,9 +69,10 @@
class="mr-1"
href={getFileUrl(attachment.file, 'full', attachment.name)}
download={attachment.name}
bind:this={download}
on:click|stopPropagation
>
<ActionIcon icon={FileDownload} size={'small'} action={() => {}} />
<ActionIcon icon={FileDownload} size={'small'} action={() => download.click()} />
</a>
<ActionIcon icon={IconMoreH} size={'small'} action={showMenu} />
</div>