mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-11 14:01:38 -06:00
feat(ribbon): context menu for root item
This commit is contained in:
parent
7377e4e34d
commit
6b059a9a75
@ -11,6 +11,7 @@ import { FormListItem } from "./react/FormList";
|
|||||||
import { useChildNotes, useNoteContext, useNoteLabel, useNoteProperty } from "./react/hooks";
|
import { useChildNotes, useNoteContext, useNoteLabel, useNoteProperty } from "./react/hooks";
|
||||||
import Icon from "./react/Icon";
|
import Icon from "./react/Icon";
|
||||||
import NoteLink from "./react/NoteLink";
|
import NoteLink from "./react/NoteLink";
|
||||||
|
import link_context_menu from "../menus/link_context_menu";
|
||||||
|
|
||||||
const COLLAPSE_THRESHOLD = 5;
|
const COLLAPSE_THRESHOLD = 5;
|
||||||
const INITIAL_ITEMS = 2;
|
const INITIAL_ITEMS = 2;
|
||||||
@ -67,6 +68,10 @@ function BreadcrumbRoot({ noteContext }: { noteContext: NoteContext | undefined
|
|||||||
icon={note.getIcon()}
|
icon={note.getIcon()}
|
||||||
text={title ?? ""}
|
text={title ?? ""}
|
||||||
onClick={() => noteContext?.setNote("root")}
|
onClick={() => noteContext?.setNote("root")}
|
||||||
|
onContextMenu={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
link_context_menu.openContextMenu(note.noteId, e);
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user