better back/forward navigation WIP

This commit is contained in:
zadam
2020-03-08 11:41:42 +01:00
parent 5114f3f782
commit 5f4d963580
15 changed files with 813 additions and 460 deletions

View File

@@ -73,7 +73,7 @@ class NoteShort {
/** @param {int} */
this.contentLength = row.contentLength;
/** @param {boolean} */
this.isProtected = row.isProtected;
this.isProtected = !!row.isProtected;
/** @param {string} one of 'text', 'code', 'file' or 'render' */
this.type = row.type;
/** @param {string} content-type, e.g. "application/json" */
@@ -131,6 +131,11 @@ class NoteShort {
}
}
/** @returns {string[]} */
getBranchIds() {
return Object.values(this.parentToBranch);
}
/** @returns {Promise<Branch[]>} */
async getBranches() {
const branchIds = Object.values(this.parentToBranch);
@@ -468,6 +473,11 @@ class NoteShort {
return dto;
}
async getCssClass() {
const labels = await this.getLabels('cssClass');
return labels.map(l => l.value).join(' ');
}
}
export default NoteShort;</code></pre>