mirror of
https://github.com/zadam/trilium.git
synced 2026-01-06 06:34:25 +01:00
feat(breadcrumb): hide note paths if only one
This commit is contained in:
parent
be923ad2b7
commit
860a903336
@ -332,13 +332,14 @@ function AttributesPane({ note, noteContext, attributesShown, setAttributesShown
|
||||
//#region Note paths
|
||||
function NotePaths({ note, hoistedNoteId, notePath }: StatusBarContext) {
|
||||
const sortedNotePaths = useSortedNotePaths(note, hoistedNoteId);
|
||||
const count = sortedNotePaths?.length ?? 0;
|
||||
|
||||
return (
|
||||
return (count > 1 &&
|
||||
<StatusBarDropdown
|
||||
title={t("status_bar.note_paths_title")}
|
||||
dropdownContainerClassName="dropdown-note-paths"
|
||||
icon="bx bx-directions"
|
||||
text={t("status_bar.note_paths", { count: sortedNotePaths?.length })}
|
||||
text={t("status_bar.note_paths", { count })}
|
||||
>
|
||||
<NotePathsWidget
|
||||
sortedNotePaths={sortedNotePaths}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user