Skip to content

Build your personal knowledge base with Trilium Notes

encrypted notes are distinguished in the tree by shaded icons

azivner07af2de0f59a
diff --git a/static/icons/file-shaded.png b/static/icons/file-shaded.png
new file mode 100644
index 0000000000..3dd43563a0
Binary files /dev/null and b/static/icons/file-shaded.png differ
diff --git a/static/icons/folder-shaded.png b/static/icons/folder-shaded.png
new file mode 100644
index 0000000000..c8eccd7a58
Binary files /dev/null and b/static/icons/folder-shaded.png differ
diff --git a/static/js/note.js b/static/js/note.js
index 72ed0f3122..2b126c392e 100644
--- a/static/js/note.js
+++ b/static/js/note.js
@@ -122,11 +122,12 @@ function createNote(node, parentKey, target, encryption) {
}),
contentType: "application/json",
success: function(result) {
- let newNode = {
+ const newNode = {
title: newNoteName,
key: result.note_id,
note_id: result.note_id,
- encryption: encryption
+ encryption: encryption,
+ extraClasses: encryption ? "encrypted" : ""
};
globalAllNoteIds.push(result.note_id);
diff --git a/static/js/tree.js b/static/js/tree.js
index 3be05eada6..f89c8b1884 100644
--- a/static/js/tree.js
+++ b/static/js/tree.js
@@ -171,6 +171,8 @@ $(function(){
if (note.encryption > 0) {
note.title = "[encrypted]";
+
+ note.extraClasses = "encrypted";
}
else {
note.title = note.note_title;
diff --git a/static/style.css b/static/style.css
index 39d4caca0d..6398abb0e2 100644
--- a/static/style.css
+++ b/static/style.css
@@ -48,6 +48,16 @@ span.fancytree-node.fancytree-folder > span.fancytree-icon {
background-image: url("icons/folder.png");
}
+span.fancytree-node.encrypted > span.fancytree-icon {
+ background-position: 0 0;
+ background-image: url("icons/file-shaded.png");
+}
+
+span.fancytree-node.encrypted.fancytree-folder > span.fancytree-icon {
+ background-position: 0 0;
+ background-image: url("icons/folder-shaded.png");
+}
+
.ui-autocomplete {
max-height: 300px;
overflow-y: auto;