mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
Merge remote-tracking branch 'origin/stable'
# Conflicts: # src/services/note_cache/entities/note.js
This commit is contained in:
@@ -152,6 +152,14 @@ class Note {
|
||||
&& (!value || attr.value.toLowerCase() === value));
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@@ -294,6 +302,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