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
fix calendar widget when hoisted into hidden subtree
zadamc6a05d8853dc
diff --git a/src/public/app/components/note_context.js b/src/public/app/components/note_context.jsindex b616671320..60f790b341 100644--- a/src/public/app/components/note_context.js+++ b/src/public/app/components/note_context.js@@ -39,6 +39,8 @@ class NoteContext extends Component {async setNote(inputNotePath, triggerSwitchEvent = true) {const resolvedNotePath = await this.getResolvedNotePath(inputNotePath);+ console.log("EEEEEE", inputNotePath, resolvedNotePath);+if (!resolvedNotePath) {return;}@@ -67,14 +69,14 @@ class NoteContext extends Component {&& this.notePath.startsWith("root/_hidden")&& !this.note.hasLabel("keepCurrentHoisting")) {- // hidden subtree displays only when hoisted so it doesn't make sense to keep root as hoisted note+ // hidden subtree displays only when hoisted, so it doesn't make sense to keep root as hoisted notelet hoistedNoteId = '_hidden';if (this.note.isLaunchBarConfig()) {hoistedNoteId = '_lbRoot';} else if (this.note.isOptions()) {- hoistedNoteId = 'options';+ hoistedNoteId = '_options';}await this.setHoistedNoteId(hoistedNoteId);diff --git a/src/public/app/services/hoisted_note.js b/src/public/app/services/hoisted_note.jsindex d29d30a1f0..298af0895f 100644--- a/src/public/app/services/hoisted_note.js+++ b/src/public/app/services/hoisted_note.js@@ -54,8 +54,8 @@ async function checkNoteAccess(notePath, noteContext) {const requestedNote = await froca.getNote(treeService.getNoteIdFromNotePath(resolvedNotePath));const hoistedNote = await froca.getNote(hoistedNoteId);- if (hoistedNote.hasAncestor('_hidden')- || !await dialogService.confirm(`Requested note '${requestedNote.title}' is outside of hoisted note '${hoistedNote.title}' subtree and you must unhoist to access the note. Do you want to proceed with unhoisting?`)) {+ if (!hoistedNote.hasAncestor('_hidden')+ && !await dialogService.confirm(`Requested note '${requestedNote.title}' is outside of hoisted note '${hoistedNote.title}' subtree and you must unhoist to access the note. Do you want to proceed with unhoisting?`)) {return false;}