mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 17:26:38 +01:00
add frontend API method openTabWithNote, #1645
This commit is contained in:
@@ -50,6 +50,8 @@ class Attribute {
|
||||
this.position = row.position;
|
||||
/** @param {boolean} isInheritable */
|
||||
this.isInheritable = !!row.isInheritable;
|
||||
/** @param {boolean} */
|
||||
this.isDeleted = !!row.isDeleted;
|
||||
}
|
||||
|
||||
/** @returns {NoteShort} */
|
||||
@@ -114,6 +116,17 @@ class Attribute {
|
||||
getDefinition() {
|
||||
return promotedAttributeDefinitionParser.parse(this.value);
|
||||
}
|
||||
|
||||
isDefinitionFor(attr) {
|
||||
return this.type === 'label' && this.name === `${attr.type}:${attr.name}`;
|
||||
}
|
||||
|
||||
get dto() {
|
||||
const dto = Object.assign({}, this);
|
||||
delete dto.treeCache;
|
||||
|
||||
return dto;
|
||||
}
|
||||
}
|
||||
|
||||
export default Attribute;
|
||||
|
||||
Reference in New Issue
Block a user