Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fixed frontend update after note deletion
zadam3a78a75afcf5
diff --git a/src/public/app/entities/attribute.js b/src/public/app/entities/attribute.jsindex e1e34cbfb0..e465062b3d 100644--- a/src/public/app/entities/attribute.js+++ b/src/public/app/entities/attribute.js@@ -22,6 +22,8 @@ class Attribute {this.position = row.position;/** @param {boolean} isInheritable */this.isInheritable = !!row.isInheritable;+ /** @param {boolean} */+ this.isDeleted = !!row.isDeleted;}/** @returns {NoteShort} */diff --git a/src/public/app/entities/branch.js b/src/public/app/entities/branch.jsindex 27802623e4..1b346c6267 100644--- a/src/public/app/entities/branch.js+++ b/src/public/app/entities/branch.js@@ -21,6 +21,8 @@ class Branch {this.isExpanded = !!row.isExpanded;/** @param {boolean} */this.fromSearchNote = !!row.fromSearchNote;+ /** @param {boolean} */+ this.isDeleted = !!row.isDeleted;}/** @returns {NoteShort} */diff --git a/src/public/app/entities/note_short.js b/src/public/app/entities/note_short.jsindex 39c0c712ea..0ca35b34ce 100644--- a/src/public/app/entities/note_short.js+++ b/src/public/app/entities/note_short.js@@ -61,6 +61,8 @@ class NoteShort {this.type = row.type;/** @param {string} content-type, e.g. "application/json" */this.mime = row.mime;+ /** @param {boolean} */+ this.isDeleted = !!row.isDeleted;}addParent(parentNoteId, branchId) {diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.jsindex 7e32863b87..a36fa4158f 100644--- a/src/public/app/widgets/note_tree.js+++ b/src/public/app/widgets/note_tree.js@@ -455,6 +455,11 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {}const note = await froca.getNote(node.data.noteId);++ if (!note || note.isDeleted) {+ return;+ }+const activeNoteContext = appContext.tabManager.getActiveContext();const $span = $(node.span);diff --git a/src/public/stylesheets/tree.css b/src/public/stylesheets/tree.cssindex 3c3b9849dc..a8beb93028 100644--- a/src/public/stylesheets/tree.css+++ b/src/public/stylesheets/tree.css@@ -11,7 +11,8 @@ span.fancytree-node.fancytree-hide {}.fancytree-title {- margin-left: 7px !important;+ margin-left: 7px;+ outline: none;}.fancytree-expander {@@ -54,7 +55,7 @@ span.fancytree-node.fancytree-hide {}.fancytree-loading span.fancytree-expander {- background-image: none !important;+ background-image: none;display: inline-block;width: 16px;height: 16px;@@ -119,8 +120,8 @@ span.fancytree-node.muted { opacity: 0.6; }}ul.fancytree-container {- outline: none !important;- background-color: inherit !important;+ outline: none;+ background-color: inherit;}.fancytree-custom-icon {