mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	style/attachments page: add an icon to the upload button
This commit is contained in:
		| @@ -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() |         const noteLink = await linkService.createLink(this.noteId); // do separately to avoid race condition between empty() and .append() | ||||||
|         noteLink.addClass("use-tn-links"); |         noteLink.addClass("use-tn-links"); | ||||||
|  |  | ||||||
|         this.$linksWrapper.empty().append( |         const $uploadButton = $(` | ||||||
|             $("<div>").append(t("attachment_list.owning_note"), noteLink), |             <button class="btn btn-sm"> | ||||||
|             $(`<div class="attachment-actions-toolbar">`).append( |                 <span class="bx bx-folder-open"></span> | ||||||
|                 $('<button class="btn btn-sm">') |                 ${t("attachment_list.upload_attachments")} | ||||||
|                     .text(t("attachment_list.upload_attachments")) |             </button> | ||||||
|                     .on("click", () => { |         `); | ||||||
|  |  | ||||||
|  |         $uploadButton.on("click", () => { | ||||||
|             if (this.noteId) { |             if (this.noteId) { | ||||||
|                 this.triggerCommand("showUploadAttachmentsDialog", { noteId: this.noteId }); |                 this.triggerCommand("showUploadAttachmentsDialog", { noteId: this.noteId }); | ||||||
|             } |             } | ||||||
|                     }), |         }) | ||||||
|                 $helpButton |  | ||||||
|             ) |         this.$linksWrapper.empty().append( | ||||||
|  |             $("<div>").append(t("attachment_list.owning_note"), noteLink), | ||||||
|  |             $(`<div class="attachment-actions-toolbar">`).append($uploadButton, $helpButton) | ||||||
|         ); |         ); | ||||||
|  |  | ||||||
|         this.$list.empty(); |         this.$list.empty(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user