mirror of
https://github.com/zadam/trilium.git
synced 2025-01-16 03:58:53 +08:00
fixed frontend update after note deletion
This commit is contained in:
parent
6e7b722bf2
commit
3a78a75afc
5 changed files with 16 additions and 4 deletions
|
@ -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} */
|
||||
|
|
|
@ -21,6 +21,8 @@ class Branch {
|
|||
this.isExpanded = !!row.isExpanded;
|
||||
/** @param {boolean} */
|
||||
this.fromSearchNote = !!row.fromSearchNote;
|
||||
/** @param {boolean} */
|
||||
this.isDeleted = !!row.isDeleted;
|
||||
}
|
||||
|
||||
/** @returns {NoteShort} */
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue