mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
fix/improve behavior of "sorted" attribute
This commit is contained in:
@@ -133,6 +133,14 @@ class Note {
|
||||
return !!this.attributes.find(attr => attr.type === type && attr.name === name);
|
||||
}
|
||||
|
||||
hasLabel(name) {
|
||||
return this.hasAttribute('label', name);
|
||||
}
|
||||
|
||||
hasRelation(name) {
|
||||
return this.hasAttribute('relation', name);
|
||||
}
|
||||
|
||||
getLabelValue(name) {
|
||||
const label = this.attributes.find(attr => attr.type === 'label' && attr.name === name);
|
||||
|
||||
@@ -275,6 +283,11 @@ class Note {
|
||||
return arr.flat();
|
||||
}
|
||||
|
||||
/** @return {String[]} */
|
||||
get subtreeNoteIds() {
|
||||
return this.subtreeNotes.map(note => note.noteId);
|
||||
}
|
||||
|
||||
get parentCount() {
|
||||
return this.parents.length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user