mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-11 16:19:27 -07:00
feat: wire session bindings through main, ipc, and cli runtime
This commit is contained in:
@@ -5,6 +5,11 @@ import type {
|
||||
KikuMergePreviewResponse,
|
||||
} from './anki';
|
||||
import type { ResolvedConfig, ShortcutsConfig } from './config';
|
||||
import type {
|
||||
CompiledSessionBinding,
|
||||
SessionActionId,
|
||||
SessionActionPayload,
|
||||
} from './session-bindings';
|
||||
import type {
|
||||
JimakuApiResponse,
|
||||
JimakuDownloadQuery,
|
||||
@@ -321,11 +326,17 @@ export interface ClipboardAppendResult {
|
||||
|
||||
export interface ConfigHotReloadPayload {
|
||||
keybindings: Keybinding[];
|
||||
sessionBindings: CompiledSessionBinding[];
|
||||
subtitleStyle: SubtitleStyleConfig | null;
|
||||
subtitleSidebar: Required<SubtitleSidebarConfig>;
|
||||
secondarySubMode: SecondarySubMode;
|
||||
}
|
||||
|
||||
export interface SessionActionDispatchRequest {
|
||||
actionId: SessionActionId;
|
||||
payload?: SessionActionPayload;
|
||||
}
|
||||
|
||||
export type ResolvedControllerConfig = ResolvedConfig['controller'];
|
||||
|
||||
export interface ElectronAPI {
|
||||
@@ -349,7 +360,9 @@ export interface ElectronAPI {
|
||||
setMecabEnabled: (enabled: boolean) => void;
|
||||
sendMpvCommand: (command: (string | number)[]) => void;
|
||||
getKeybindings: () => Promise<Keybinding[]>;
|
||||
getSessionBindings: () => Promise<CompiledSessionBinding[]>;
|
||||
getConfiguredShortcuts: () => Promise<Required<ShortcutsConfig>>;
|
||||
dispatchSessionAction: (actionId: SessionActionId, payload?: SessionActionPayload) => Promise<void>;
|
||||
getStatsToggleKey: () => Promise<string>;
|
||||
getMarkWatchedKey: () => Promise<string>;
|
||||
markActiveVideoWatched: () => Promise<boolean>;
|
||||
|
||||
Reference in New Issue
Block a user