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): allow creating notes from separator menu
Elian Doran3a4cff6529d0
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex f6f1679963..db876bee0e 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -2148,7 +2148,8 @@"hoisted_badge": "Hoisted","hoisted_badge_title": "Unhoist","workspace_badge": "Workspace",- "scroll_to_top_title": "Jump to the beginning of the note"+ "scroll_to_top_title": "Jump to the beginning of the note",+ "create_new_note": "Create new child note"},"breadcrumb_badges": {"read_only_explicit": "Read-only",diff --git a/apps/client/src/widgets/layout/Breadcrumb.tsx b/apps/client/src/widgets/layout/Breadcrumb.tsxindex aa7e484dcc..aeb0d8d233 100644--- a/apps/client/src/widgets/layout/Breadcrumb.tsx+++ b/apps/client/src/widgets/layout/Breadcrumb.tsx@@ -23,7 +23,7 @@ import tree from "../../services/tree";import ActionButton from "../react/ActionButton";import { Badge } from "../react/Badge";import Dropdown from "../react/Dropdown";-import { FormListItem } from "../react/FormList";+import { FormDropdownDivider, FormListItem } from "../react/FormList";import { useActiveNoteContext, useChildNotes, useNote, useNoteColorClass, useNoteIcon, useNoteLabel, useNoteLabelBoolean, useNoteProperty, useStaticTooltip } from "../react/hooks";import Icon from "../react/Icon";import { NewNoteLink } from "../react/NoteLink";@@ -208,6 +208,12 @@ function BreadcrumbSeparatorDropdownContent({ notePath, noteContext, activeNoteP</FormListItem></li>;})}++ <FormDropdownDivider />+ <FormListItem+ icon="bx bx-plus"+ onClick={() => note_create.createNote(notePath, { activate: true })}+ >{t("breadcrumb.create_new_note")}</FormListItem></ul>);}