feat(breadcrumb): hide root icon

This commit is contained in:
Elian Doran 2025-12-08 16:45:26 +02:00
parent adc356eff3
commit bedca9f82c
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View File

@ -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);

View File

@ -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}
/>
)
}