From 6fb01b6b0955c08cdf9ac0d7fd90e1ef0a989c56 Mon Sep 17 00:00:00 2001 From: coderkk Date: Tue, 15 Dec 2020 08:13:18 +0800 Subject: [PATCH] Copy the attachment name in attachment page --- src/components/organisms/AttachmentList.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/organisms/AttachmentList.tsx b/src/components/organisms/AttachmentList.tsx index 493d1263f3..14812a924a 100644 --- a/src/components/organisms/AttachmentList.tsx +++ b/src/components/organisms/AttachmentList.tsx @@ -7,6 +7,7 @@ import { values } from '../../lib/db/utils' import { downloadBlob } from '../../lib/download' import { openNew } from '../../lib/platform' import { openContextMenu } from '../../lib/electronOnly' +import copy from 'copy-to-clipboard' const ListContainer = styled.div` display: flex; @@ -85,6 +86,13 @@ const AttachmentListItem = ({ openNew(data.src) }, }, + { + type: 'normal', + label: 'Copy Attachment Name', + click: () => { + copy(attachment.name); + }, + }, { type: 'normal', label: 'Remove Attachment',