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
feat(breadcrumb): show root title if it's the one active
Elian Doran1e5fcf635e2e
diff --git a/apps/client/src/widgets/Breadcrumb.tsx b/apps/client/src/widgets/Breadcrumb.tsxindex a624e2e58a..e24704e0ac 100644--- a/apps/client/src/widgets/Breadcrumb.tsx+++ b/apps/client/src/widgets/Breadcrumb.tsx@@ -15,7 +15,7 @@ export default function Breadcrumb() {<div className="breadcrumb">{notePath.map((item, index) => (<Fragment key={item}>- <BreadcrumbItem notePath={item} />+ <BreadcrumbItem notePath={item} activeNotePath={noteContext?.notePath ?? ""} />{(index < notePath.length - 1 || note?.hasChildren()) &&<BreadcrumbSeparator notePath={item} activeNotePath={notePath[index+1]} noteContext={noteContext} />}</Fragment>@@ -24,13 +24,13 @@ export default function Breadcrumb() {)}-function BreadcrumbItem({ notePath }: { notePath: string }) {+function BreadcrumbItem({ notePath, activeNotePath }: { notePath: string, activeNotePath: string }) {const isRootNote = (notePath === "root");return (<NoteLinknotePath={notePath}noPreview- title={isRootNote ? "" : undefined}+ title={isRootNote && activeNotePath !== "root" ? "" : undefined}showNoteIcon={isRootNote}/>)