mirror of
https://github.com/zadam/trilium.git
synced 2025-12-12 10:24:23 +01:00
feat(breadcrumb): hide root icon
This commit is contained in:
parent
adc356eff3
commit
bedca9f82c
@ -99,7 +99,7 @@ async function createLink(notePath: string | undefined, options: CreateLinkOptio
|
|||||||
const viewMode = viewScope.viewMode || "default";
|
const viewMode = viewScope.viewMode || "default";
|
||||||
let linkTitle = options.title;
|
let linkTitle = options.title;
|
||||||
|
|
||||||
if (!linkTitle) {
|
if (linkTitle === undefined) {
|
||||||
if (viewMode === "attachments" && viewScope.attachmentId) {
|
if (viewMode === "attachments" && viewScope.attachmentId) {
|
||||||
const attachment = await froca.getAttachment(viewScope.attachmentId);
|
const attachment = await froca.getAttachment(viewScope.attachmentId);
|
||||||
|
|
||||||
|
|||||||
@ -24,10 +24,13 @@ export default function Breadcrumb() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function BreadcrumbItem({ notePath }: { notePath: string }) {
|
function BreadcrumbItem({ notePath }: { notePath: string }) {
|
||||||
|
const isRootNote = (notePath === "root");
|
||||||
return (
|
return (
|
||||||
<NoteLink
|
<NoteLink
|
||||||
notePath={notePath}
|
notePath={notePath}
|
||||||
noPreview
|
noPreview
|
||||||
|
title={isRootNote ? "" : undefined}
|
||||||
|
showNoteIcon={isRootNote}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user