Skip to content

Build your personal knowledge base with Trilium Notes

feat(breadcrumb): hide root icon

Elian Doranbedca9f82c92
diff --git a/apps/client/src/services/link.ts b/apps/client/src/services/link.ts
index a596e71366..79bc18c2ac 100644
--- a/apps/client/src/services/link.ts
+++ b/apps/client/src/services/link.ts
@@ -99,7 +99,7 @@ async function createLink(notePath: string | undefined, options: CreateLinkOptio
const viewMode = viewScope.viewMode || "default";
let linkTitle = options.title;
- if (!linkTitle) {
+ if (linkTitle === undefined) {
if (viewMode === "attachments" && viewScope.attachmentId) {
const attachment = await froca.getAttachment(viewScope.attachmentId);
diff --git a/apps/client/src/widgets/Breadcrumb.tsx b/apps/client/src/widgets/Breadcrumb.tsx
index 945f55e643..18ec9e8456 100644
--- a/apps/client/src/widgets/Breadcrumb.tsx
+++ b/apps/client/src/widgets/Breadcrumb.tsx
@@ -24,10 +24,13 @@ export default function Breadcrumb() {
}
function BreadcrumbItem({ notePath }: { notePath: string }) {
+ const isRootNote = (notePath === "root");
return (
<NoteLink
notePath={notePath}
noPreview
+ title={isRootNote ? "" : undefined}
+ showNoteIcon={isRootNote}
/>
)
}