refactor(client/ts): use command names enum in context menu

This commit is contained in:
Elian Doran
2024-12-22 18:33:57 +02:00
parent f4e2973a0c
commit 19652fbbce
5 changed files with 41 additions and 17 deletions

View File

@@ -69,19 +69,40 @@ type CommandMappings = {
notePath: string;
hoistedNoteId: string;
viewScope: ViewScope;
}
},
openNoteInNewTab: CommandData;
openNoteInNewSplit: CommandData;
openNoteInNewWindow: CommandData;
openNoteInSplit: CommandData;
openInTab: CommandData;
insertNoteAfter: CommandData;
insertChildNote: CommandData;
convertNoteToAttachment: CommandData;
copyNotePathToClipboard: CommandData;
executeInActiveNoteDetailWidget: CommandData & {
callback: (value: NoteDetailWidget | PromiseLike<NoteDetailWidget>) => void
};
addTextToActiveEditor: CommandData & {
text: string;
};
/** Works only in the electron context menu. */
replaceMisspelling: CommandData;
importMarkdownInline: CommandData;
showPasswordNotSet: CommandData;
showProtectedSessionPasswordDialog: CommandData;
closeProtectedSessionPasswordDialog: CommandData;
resetLauncher: CommandData;
addNoteLauncher: CommandData;
addScriptLauncher: CommandData;
addWidgetLauncher: CommandData;
addSpacerLauncher: CommandData;
moveLauncherToVisible: CommandData;
moveLauncherToAvailable: CommandData;
duplicateSubtree: CommandData;
deleteNotes: CommandData;
copyImageReferenceToClipboard: CommandData;
copyImageToClipboard: CommandData;
}
type EventMappings = {