mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-25 00:11:26 -07:00
feat(core): add Electron runtime, services, and app composition
This commit is contained in:
23
src/main/runtime/initial-args-main-deps.ts
Normal file
23
src/main/runtime/initial-args-main-deps.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { CliArgs } from '../../cli/args';
|
||||
|
||||
export function createBuildHandleInitialArgsMainDepsHandler(deps: {
|
||||
getInitialArgs: () => CliArgs | null;
|
||||
isBackgroundMode: () => boolean;
|
||||
ensureTray: () => void;
|
||||
isTexthookerOnlyMode: () => boolean;
|
||||
hasImmersionTracker: () => boolean;
|
||||
getMpvClient: () => { connected: boolean; connect: () => void } | null;
|
||||
logInfo: (message: string) => void;
|
||||
handleCliCommand: (args: CliArgs, source: 'initial') => void;
|
||||
}) {
|
||||
return () => ({
|
||||
getInitialArgs: () => deps.getInitialArgs(),
|
||||
isBackgroundMode: () => deps.isBackgroundMode(),
|
||||
ensureTray: () => deps.ensureTray(),
|
||||
isTexthookerOnlyMode: () => deps.isTexthookerOnlyMode(),
|
||||
hasImmersionTracker: () => deps.hasImmersionTracker(),
|
||||
getMpvClient: () => deps.getMpvClient(),
|
||||
logInfo: (message: string) => deps.logInfo(message),
|
||||
handleCliCommand: (args: CliArgs, source: 'initial') => deps.handleCliCommand(args, source),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user