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 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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user