mirror of
https://github.com/zadam/trilium.git
synced 2025-12-21 06:44:24 +01:00
feat(layout): keyboard shortcut for similar notes
This commit is contained in:
parent
998a16ab87
commit
db51198449
@ -216,7 +216,7 @@ interface NoteInfoContext extends StatusBarContext {
|
|||||||
setSimilarNotesShown: (value: boolean) => void;
|
setSimilarNotesShown: (value: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function NoteInfoBadge({ note, setSimilarNotesShown }: NoteInfoContext) {
|
export function NoteInfoBadge({ note, similarNotesShown, setSimilarNotesShown }: NoteInfoContext) {
|
||||||
const dropdownRef = useRef<BootstrapDropdown>(null);
|
const dropdownRef = useRef<BootstrapDropdown>(null);
|
||||||
const { metadata, ...sizeProps } = useNoteMetadata(note);
|
const { metadata, ...sizeProps } = useNoteMetadata(note);
|
||||||
const [ originalFileName ] = useNoteLabel(note, "originalFileName");
|
const [ originalFileName ] = useNoteLabel(note, "originalFileName");
|
||||||
@ -226,6 +226,7 @@ export function NoteInfoBadge({ note, setSimilarNotesShown }: NoteInfoContext) {
|
|||||||
|
|
||||||
// Keyboard shortcut.
|
// Keyboard shortcut.
|
||||||
useTriliumEvent("toggleRibbonTabNoteInfo", () => enabled && dropdownRef.current?.show());
|
useTriliumEvent("toggleRibbonTabNoteInfo", () => enabled && dropdownRef.current?.show());
|
||||||
|
useTriliumEvent("toggleRibbonTabSimilarNotes", () => setSimilarNotesShown(!similarNotesShown));
|
||||||
|
|
||||||
return (enabled &&
|
return (enabled &&
|
||||||
<StatusBarDropdown
|
<StatusBarDropdown
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user