mirror of
https://github.com/zadam/trilium.git
synced 2026-01-08 07:34:25 +01:00
feat(layout): keyboard shortcut for note info
This commit is contained in:
parent
1835676d09
commit
4f1c19f1e2
@ -222,8 +222,12 @@ export function NoteInfoBadge({ note, setSimilarNotesShown }: NoteInfoContext) {
|
||||
const [ originalFileName ] = useNoteLabel(note, "originalFileName");
|
||||
const noteType = useNoteProperty(note, "type");
|
||||
const noteTypeMapping = useMemo(() => NOTE_TYPES.find(t => t.type === noteType), [ noteType ]);
|
||||
const enabled = note && noteType && noteTypeMapping;
|
||||
|
||||
return (note && noteType && noteTypeMapping &&
|
||||
// Keyboard shortcut.
|
||||
useTriliumEvent("toggleRibbonTabNoteInfo", () => enabled && dropdownRef.current?.show());
|
||||
|
||||
return (enabled &&
|
||||
<StatusBarDropdown
|
||||
icon="bx bx-info-circle"
|
||||
title={t("status_bar.note_info_title")}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user