diff --git a/src/public/app/widgets/type_widgets/attachment_list.ts b/src/public/app/widgets/type_widgets/attachment_list.ts index f39f7782c..937efb9d8 100644 --- a/src/public/app/widgets/type_widgets/attachment_list.ts +++ b/src/public/app/widgets/type_widgets/attachment_list.ts @@ -59,18 +59,22 @@ export default class AttachmentListTypeWidget extends TypeWidget { const noteLink = await linkService.createLink(this.noteId); // do separately to avoid race condition between empty() and .append() noteLink.addClass("use-tn-links"); + const $uploadButton = $(` + + `); + + $uploadButton.on("click", () => { + if (this.noteId) { + this.triggerCommand("showUploadAttachmentsDialog", { noteId: this.noteId }); + } + }) + this.$linksWrapper.empty().append( $("
").append(t("attachment_list.owning_note"), noteLink), - $(`
`).append( - $('