mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	chore(ts/Fattachment): add getOwnerId, since ownerId is private
This commit is contained in:
		| @@ -57,6 +57,10 @@ class FAttachment { | ||||
|         return this.froca.notes[this.ownerId]; | ||||
|     } | ||||
|  | ||||
|     getOwnerId() { | ||||
|       return this.ownerId; | ||||
|     } | ||||
|  | ||||
|     async getBlob() { | ||||
|         return await this.froca.getBlob("attachments", this.attachmentId); | ||||
|     } | ||||
|   | ||||
| @@ -125,7 +125,7 @@ export default class AttachmentDetailWidget extends BasicWidget { | ||||
|         this.$wrapper.addClass(this.isFullDetail ? "full-detail" : "list-view"); | ||||
|  | ||||
|         if (!this.isFullDetail) { | ||||
|             const $link = await linkService.createLink(this.attachment.ownerId, { | ||||
|             const $link = await linkService.createLink(this.attachment.getOwnerId(), { | ||||
|                 title: this.attachment.title, | ||||
|                 viewScope: { | ||||
|                     viewMode: "attachments", | ||||
| @@ -175,7 +175,7 @@ export default class AttachmentDetailWidget extends BasicWidget { | ||||
|         if (this.attachment.role === "image") { | ||||
|             imageService.copyImageReferenceToClipboard(this.$wrapper.find(".attachment-content-wrapper")); | ||||
|         } else if (this.attachment.role === "file") { | ||||
|             const $link = await linkService.createLink(this.attachment.ownerId, { | ||||
|             const $link = await linkService.createLink(this.attachment.getOwnerId(), { | ||||
|                 referenceLink: true, | ||||
|                 viewScope: { | ||||
|                     viewMode: "attachments", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user