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
export root note fix, #2346
zadam6dce13bc3407
diff --git a/src/public/app/menus/tree_context_menu.js b/src/public/app/menus/tree_context_menu.jsindex 98ebebadc0..52300b9623 100644--- a/src/public/app/menus/tree_context_menu.js+++ b/src/public/app/menus/tree_context_menu.js@@ -32,7 +32,7 @@ export default class TreeContextMenu {const isHoisted = note.noteId === appContext.tabManager.getActiveContext().hoistedNoteId;const parentNote = isNotRoot ? await froca.getNote(branch.parentNoteId) : null;- // some actions don't support multi-note so they are disabled when notes are selected+ // some actions don't support multi-note, so they are disabled when notes are selected// the only exception is when the only selected note is the one that was right-clicked, then// it's clear what the user meant to do.const selNodes = this.treeWidget.getSelectedNodes();diff --git a/src/public/app/services/froca.js b/src/public/app/services/froca.jsindex 2526c648b4..0019b0bd86 100644--- a/src/public/app/services/froca.js+++ b/src/public/app/services/froca.js@@ -216,7 +216,7 @@ class Froca {getNotesFromCache(noteIds, silentNotFoundError = false) {return noteIds.map(noteId => {if (!this.notes[noteId] && !silentNotFoundError) {- console.trace(`Can't find note "${noteId}"`);+ console.trace(`Can't find note '${noteId}'`);return null;}@@ -235,7 +235,7 @@ class Froca {return noteIds.map(noteId => {if (!this.notes[noteId] && !silentNotFoundError) {- console.trace(`Can't find note "${noteId}"`);+ console.trace(`Can't find note '${noteId}'`);return null;} else {@@ -285,7 +285,7 @@ class Froca {getBranch(branchId, silentNotFoundError = false) {if (!(branchId in this.branches)) {if (!silentNotFoundError) {- logError(`Not existing branch ${branchId}`);+ logError(`Not existing branch '${branchId}'`);}}else {@@ -295,13 +295,13 @@ class Froca {async getBranchId(parentNoteId, childNoteId) {if (childNoteId === 'root') {- return 'root';+ return 'none_root';}const child = await this.getNote(childNoteId);if (!child) {- logError(`Could not find branchId for parent=${parentNoteId}, child=${childNoteId} since child does not exist`);+ logError(`Could not find branchId for parent '${parentNoteId}', child '${childNoteId}' since child does not exist`);return null;}@@ -318,9 +318,9 @@ class Froca {.then(row => new NoteComplement(row)).catch(e => console.error(`Cannot get note complement for note '${noteId}'`));- // we don't want to keep large payloads forever in memory so we clean that up quite quickly+ // we don't want to keep large payloads forever in memory, so we clean that up quite quickly// this cache is more meant to share the data between different components within one business transaction (e.g. loading of the note into the tab context and all the components)- // this is also a work around for missing invalidation after change+ // this is also a workaround for missing invalidation after changethis.noteComplementPromises[noteId].then(() => setTimeout(() => this.noteComplementPromises[noteId] = null, 1000));diff --git a/src/routes/api/export.js b/src/routes/api/export.jsindex 365c7e1857..6294f2f257 100644--- a/src/routes/api/export.js+++ b/src/routes/api/export.js@@ -13,7 +13,7 @@ function exportBranch(req, res) {const branch = becca.getBranch(branchId);if (!branch) {- const message = `Cannot export branch ${branchId} since it does not exist.`;+ const message = `Cannot export branch '${branchId}' since it does not exist.`;log.error(message);res.setHeader("Content-Type", "text/plain")