mirror of
https://github.com/zadam/trilium.git
synced 2025-11-15 09:45:52 +01:00
renamed attachment's parentId to more fitting ownerId
This commit is contained in:
@@ -126,7 +126,7 @@ export default class AttachmentDetailWidget extends BasicWidget {
|
||||
|
||||
if (!this.isFullDetail) {
|
||||
this.$wrapper.find('.attachment-title').append(
|
||||
await linkService.createLink(this.attachment.parentId, {
|
||||
await linkService.createLink(this.attachment.ownerId, {
|
||||
title: this.attachment.title,
|
||||
viewScope: {
|
||||
viewMode: 'attachments',
|
||||
@@ -174,7 +174,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.parentId, {
|
||||
const $link = await linkService.createLink(this.attachment.ownerId, {
|
||||
referenceLink: true,
|
||||
viewScope: {
|
||||
viewMode: 'attachments',
|
||||
|
||||
@@ -121,7 +121,7 @@ export default class NoteActionsWidget extends NoteContextAwareWidget {
|
||||
|
||||
toastService.showMessage(`Note '${newAttachment.title}' has been converted to attachment.`);
|
||||
await ws.waitForMaxKnownEntityChangeId();
|
||||
await appContext.tabManager.getActiveContext().setNote(newAttachment.parentId, {
|
||||
await appContext.tabManager.getActiveContext().setNote(newAttachment.ownerId, {
|
||||
viewScope: {
|
||||
viewMode: 'attachments',
|
||||
attachmentId: newAttachment.attachmentId
|
||||
|
||||
@@ -60,7 +60,7 @@ export default class AbstractTextTypeWidget extends TypeWidget {
|
||||
const attachment = await froca.getAttachment(attachmentId);
|
||||
|
||||
return {
|
||||
noteId: attachment.parentId,
|
||||
noteId: attachment.ownerId,
|
||||
viewScope: {
|
||||
viewMode: 'attachments',
|
||||
attachmentId: attachmentId
|
||||
|
||||
Reference in New Issue
Block a user