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