wip attachment widget

This commit is contained in:
zadam
2023-04-01 23:55:04 +02:00
parent 53aebf1448
commit 2bc78ccafb
12 changed files with 268 additions and 92 deletions

View File

@@ -23,6 +23,8 @@ export default class LoadResults {
this.contentNoteIdToComponentId = [];
this.options = [];
this.attachments = [];
}
getEntity(entityName, entityId) {
@@ -116,6 +118,14 @@ export default class LoadResults {
return this.options.includes(name);
}
addAttachment(attachment) {
this.attachments.push(attachment);
}
getAttachments() {
return this.attachments;
}
/**
* @returns {boolean} true if there are changes which could affect the attributes (including inherited ones)
* notably changes in note itself should not have any effect on attributes
@@ -132,7 +142,8 @@ export default class LoadResults {
&& this.noteReorderings.length === 0
&& this.noteRevisions.length === 0
&& this.contentNoteIdToComponentId.length === 0
&& this.options.length === 0;
&& this.options.length === 0
&& this.attachments.length === 0;
}
isEmptyForTree() {