diff --git a/static/icons/file-shaded.png b/static/icons/file-shaded.png new file mode 100644 index 000000000..3dd43563a 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 000000000..c8eccd7a5 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 72ed0f312..2b126c392 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 3be05eada..f89c8b188 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 39d4caca0..6398abb0e 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;