mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 07:46:30 +01:00
refactor(command_palette): separate model for keyboard shortcuts
This commit is contained in:
@@ -98,9 +98,12 @@ const enum KeyboardActionNamesEnum {
|
||||
|
||||
export type KeyboardActionNames = keyof typeof KeyboardActionNamesEnum;
|
||||
|
||||
export interface KeyboardShortcut {
|
||||
separator?: string;
|
||||
actionName?: KeyboardActionNames;
|
||||
export interface KeyboardShortcutSeparator {
|
||||
separator: string;
|
||||
}
|
||||
|
||||
export interface KeyboardShortcutBase {
|
||||
actionName: KeyboardActionNames;
|
||||
description?: string;
|
||||
defaultShortcuts?: string[];
|
||||
effectiveShortcuts?: string[];
|
||||
@@ -115,6 +118,8 @@ export interface KeyboardShortcut {
|
||||
scope?: "window" | "note-tree" | "text-detail" | "code-detail";
|
||||
}
|
||||
|
||||
type KeyboardShortcut = KeyboardShortcutBase | KeyboardShortcutSeparator;
|
||||
|
||||
export interface KeyboardShortcutWithRequiredActionName extends KeyboardShortcut {
|
||||
actionName: KeyboardActionNames;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user