(feat): add hotkeys
This commit is contained in:
parent
915568f739
commit
85633a1c81
27 changed files with 1014 additions and 33 deletions
|
|
@ -487,6 +487,7 @@ export interface Storage extends SettingsStorageDefaults {
|
|||
height: number;
|
||||
} | null;
|
||||
reactions: Record<string, number>;
|
||||
hotkey_overrides: Record<string, string | null>;
|
||||
}
|
||||
|
||||
export const storageDefaults: Storage = {
|
||||
|
|
@ -577,6 +578,7 @@ export const storageDefaults: Storage = {
|
|||
":fire:": 2,
|
||||
":white_check_mark:": 1,
|
||||
},
|
||||
hotkey_overrides: {},
|
||||
};
|
||||
|
||||
// User Status
|
||||
|
|
|
|||
|
|
@ -38,6 +38,13 @@ type ElectronDesktopApi = {
|
|||
iconDataUrl?: string;
|
||||
}) => Promise<void>;
|
||||
};
|
||||
hotkeys?: {
|
||||
setBindings?: (
|
||||
bindings: Array<{ id: string; accelerator: string }>,
|
||||
) => Promise<Record<string, boolean>>;
|
||||
setSuspended?: (suspended: boolean) => Promise<Record<string, boolean>>;
|
||||
onTriggered?: (callback: (id: string) => void) => () => void;
|
||||
};
|
||||
secureStorage?: {
|
||||
getStatus?: () => Promise<{ available: boolean; backend: string | null }>;
|
||||
load?: (key: string) => Promise<string | null>;
|
||||
|
|
|
|||
Loading…
Reference in a new issue