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
small fixes
zadam7147cc267e50
diff --git a/src/public/app/components/tab_manager.js b/src/public/app/components/tab_manager.jsindex 7cc0f45301..be910ffa77 100644--- a/src/public/app/components/tab_manager.js+++ b/src/public/app/components/tab_manager.js@@ -80,8 +80,10 @@ export default class TabManager extends Component {}if (filteredTabs.length === 0) {+ const [notePath] = treeService.getHashValueFromAddress();+filteredTabs.push({- notePath: glob.extraHoistedNoteId || 'root',+ notePath: notePath || 'root',active: true,hoistedNoteId: glob.extraHoistedNoteId || 'root'});@@ -98,7 +100,7 @@ export default class TabManager extends Component {});// if there's notePath in the URL, make sure it's open and active- // (useful, among others, for opening clipped notes from clipper)+ // (useful, for e.g. opening clipped notes from clipper or opening link in an extra window)if (treeService.isNotePathInAddress()) {const [notePath, ntxId] = treeService.getHashValueFromAddress();@@ -106,7 +108,7 @@ export default class TabManager extends Component {}}catch (e) {- logError(`Loading tabs '${options.get('openTabs')}' failed: ${e.message}`);+ logError(`Loading tabs '${options.get('openTabs')}' failed: ${e.message} ${e.stack}`);// try to recoverawait this.openEmptyTab();diff --git a/src/public/app/services/hoisted_note.js b/src/public/app/services/hoisted_note.jsindex 0e9b99b5c9..d29d30a1f0 100644--- a/src/public/app/services/hoisted_note.js+++ b/src/public/app/services/hoisted_note.js@@ -51,7 +51,11 @@ async function checkNoteAccess(notePath, noteContext) {const hoistedNoteId = noteContext.hoistedNoteId;if (!resolvedNotePath.includes(hoistedNoteId) && !resolvedNotePath.includes('_hidden')) {- if (!await dialogService.confirm("Requested note is outside of hoisted note subtree and you must unhoist to access the note. Do you want to proceed with unhoisting?")) {+ 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?`)) {return false;}