chore(ts/Fattachment): add getOwnerId, since ownerId is private

This commit is contained in:
Panagiotis Papadopoulos 2025-02-22 19:05:52 +01:00
parent 4ddc36f6b8
commit 1e7dee51fc
2 changed files with 6 additions and 2 deletions

View File

@ -57,6 +57,10 @@ class FAttachment {
return this.froca.notes[this.ownerId]; return this.froca.notes[this.ownerId];
} }
getOwnerId() {
return this.ownerId;
}
async getBlob() { async getBlob() {
return await this.froca.getBlob("attachments", this.attachmentId); return await this.froca.getBlob("attachments", this.attachmentId);
} }

View File

@ -125,7 +125,7 @@ export default class AttachmentDetailWidget extends BasicWidget {
this.$wrapper.addClass(this.isFullDetail ? "full-detail" : "list-view"); this.$wrapper.addClass(this.isFullDetail ? "full-detail" : "list-view");
if (!this.isFullDetail) { if (!this.isFullDetail) {
const $link = await linkService.createLink(this.attachment.ownerId, { const $link = await linkService.createLink(this.attachment.getOwnerId(), {
title: this.attachment.title, title: this.attachment.title,
viewScope: { viewScope: {
viewMode: "attachments", viewMode: "attachments",
@ -175,7 +175,7 @@ export default class AttachmentDetailWidget extends BasicWidget {
if (this.attachment.role === "image") { if (this.attachment.role === "image") {
imageService.copyImageReferenceToClipboard(this.$wrapper.find(".attachment-content-wrapper")); imageService.copyImageReferenceToClipboard(this.$wrapper.find(".attachment-content-wrapper"));
} else if (this.attachment.role === "file") { } else if (this.attachment.role === "file") {
const $link = await linkService.createLink(this.attachment.ownerId, { const $link = await linkService.createLink(this.attachment.getOwnerId(), {
referenceLink: true, referenceLink: true,
viewScope: { viewScope: {
viewMode: "attachments", viewMode: "attachments",