Skip to content

Build your personal knowledge base with Trilium Notes

basic ExtClones integration. Other "clones" are now marked as bold when their clone is activated

azivner4e0d83e9de6c
diff --git a/public/javascripts/note_tree.js b/public/javascripts/note_tree.js
index b3b420f3c4..c299e6a220 100644
--- a/public/javascripts/note_tree.js
+++ b/public/javascripts/note_tree.js
@@ -123,6 +123,7 @@ const noteTree = (function() {
}
note.key = counter++ + ""; // key needs to be string
+ note.refKey = note.note_id;
note.expanded = note.is_expanded;
noteTreeIdToKey[noteTreeId] = note.key;
@@ -325,7 +326,7 @@ const noteTree = (function() {
treeEl.fancytree({
autoScroll: true,
- extensions: ["hotkeys", "filter", "dnd"],
+ extensions: ["hotkeys", "filter", "dnd", "clones"],
source: noteTree,
scrollParent: $("#tree"),
activate: (event, data) => {
@@ -336,6 +337,7 @@ const noteTree = (function() {
noteEditor.switchToNote(node.note_id);
showParentList(node.note_id, data.node);
+ return false;
},
expand: (event, data) => {
setExpandedToServer(getNoteTreeIdFromKey(data.node.key), true);
@@ -417,6 +419,9 @@ const noteTree = (function() {
const node = data.node.data;
data.result = prepareNoteTreeInner(node.note_id);
+ },
+ clones: {
+ highlightActiveClones: true
}
});
diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css
index b0abf0ad68..2c27a9efc3 100644
--- a/public/stylesheets/style.css
+++ b/public/stylesheets/style.css
@@ -78,6 +78,10 @@ span.fancytree-node.multiple-parents .fancytree-title {
text-decoration: underline dashed;
}
+span.fancytree-node.fancytree-active-clone:not(.fancytree-active) .fancytree-title {
+ font-weight: bold;
+}
+
.ui-autocomplete {
max-height: 300px;
overflow-y: auto;