mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
chore(ts/Fattachment): add getOwnerId, since ownerId is private
This commit is contained in:
parent
4ddc36f6b8
commit
1e7dee51fc
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user