add frontend API method openTabWithNote, #1645

This commit is contained in:
zadam
2021-02-17 23:55:51 +01:00
parent 600a312b2a
commit 8e730c6ecf
24 changed files with 855 additions and 387 deletions

View File

@@ -43,18 +43,13 @@ class Entity {
}
}
if ('isDeleted' in this) {
if ('isDeleted' in this && this.constructor.entityName !== 'recent_notes') {
this.isDeleted = !!this.isDeleted;
}
}
beforeSaving() {
this.generateIdIfNecessary();
const origHash = this.hash;
this.hash = this.generateHash();
this.isChanged = origHash !== this.hash;
}
generateIdIfNecessary() {
@@ -73,6 +68,10 @@ class Entity {
return utils.hash(contentToHash).substr(0, 10);
}
getUtcDateChanged() {
return this.utcDateModified;
}
get repository() {
if (!repo) {
repo = require('../services/repository');