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
client: refactor
Adorian Doranf2067d0b12f7
diff --git a/src/public/app/services/tree.js b/src/public/app/services/tree.jsindex 2726036b9f..e367c3586f 100644--- a/src/public/app/services/tree.js+++ b/src/public/app/services/tree.js@@ -272,8 +272,16 @@ async function getNoteTitleWithPathAsSuffix(notePath) {const $titleWithPath = $('<span class="note-title-with-path">').append($('<span class="note-title">').text(title));++ $titleWithPath.append(formatPath(path));++ return $titleWithPath;+}++function formatPath(path) {+ const $notePath = $('<span class="note-path">');+if (path.length > 0) {- const $notePath = $('<span class="note-path">');$notePath.append($(`<span class="path-bracket"> (</span>)`));@@ -286,17 +294,17 @@ async function getNoteTitleWithPathAsSuffix(notePath) {}$notePath.append($(`<span class="path-bracket">)</span>)`));-- $titleWithPath.append($notePath);}-- return $titleWithPath;++ return $notePath;}function isNotePathInHiddenSubtree(notePath) {return notePath?.includes("root/_hidden");}++export default {resolveNotePath,resolveNotePathToSegments,