mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 18:22:42 -08:00
refactor: extract shortcut ui runtime deps
This commit is contained in:
@@ -5,14 +5,18 @@ export interface GlobalShortcutConfig {
|
||||
toggleInvisibleOverlayGlobal: string | null | undefined;
|
||||
}
|
||||
|
||||
export function registerGlobalShortcutsService(options: {
|
||||
export interface RegisterGlobalShortcutsServiceOptions {
|
||||
shortcuts: GlobalShortcutConfig;
|
||||
onToggleVisibleOverlay: () => void;
|
||||
onToggleInvisibleOverlay: () => void;
|
||||
onOpenYomitanSettings: () => void;
|
||||
isDev: boolean;
|
||||
getMainWindow: () => BrowserWindow | null;
|
||||
}): void {
|
||||
}
|
||||
|
||||
export function registerGlobalShortcutsService(
|
||||
options: RegisterGlobalShortcutsServiceOptions,
|
||||
): void {
|
||||
const visibleShortcut = options.shortcuts.toggleVisibleOverlayGlobal;
|
||||
const invisibleShortcut = options.shortcuts.toggleInvisibleOverlayGlobal;
|
||||
const normalizedVisible = visibleShortcut?.replace(/\s+/g, "").toLowerCase();
|
||||
|
||||
Reference in New Issue
Block a user