mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-21 00:11:27 -07:00
Overlay 2.0 (#12)
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
} from './dependencies';
|
||||
|
||||
export interface CliCommandRuntimeServiceContext {
|
||||
setLogLevel?: (level: NonNullable<CliArgs['logLevel']>) => void;
|
||||
getSocketPath: () => string;
|
||||
setSocketPath: (socketPath: string) => void;
|
||||
getClient: CliCommandRuntimeServiceDepsParams['mpv']['getClient'];
|
||||
@@ -17,9 +18,7 @@ export interface CliCommandRuntimeServiceContext {
|
||||
isOverlayInitialized: () => boolean;
|
||||
initializeOverlay: () => void;
|
||||
toggleVisibleOverlay: () => void;
|
||||
toggleInvisibleOverlay: () => void;
|
||||
setVisibleOverlay: (visible: boolean) => void;
|
||||
setInvisibleOverlay: (visible: boolean) => void;
|
||||
copyCurrentSubtitle: () => void;
|
||||
startPendingMultiCopy: (timeoutMs: number) => void;
|
||||
mineSentenceCard: () => Promise<void>;
|
||||
@@ -57,6 +56,7 @@ function createCliCommandDepsFromContext(
|
||||
context: CliCommandRuntimeServiceContext & CliCommandRuntimeServiceContextHandlers,
|
||||
): CliCommandRuntimeServiceDepsParams {
|
||||
return {
|
||||
setLogLevel: context.setLogLevel,
|
||||
mpv: {
|
||||
getSocketPath: context.getSocketPath,
|
||||
setSocketPath: context.setSocketPath,
|
||||
@@ -74,9 +74,7 @@ function createCliCommandDepsFromContext(
|
||||
isInitialized: context.isOverlayInitialized,
|
||||
initialize: context.initializeOverlay,
|
||||
toggleVisible: context.toggleVisibleOverlay,
|
||||
toggleInvisible: context.toggleInvisibleOverlay,
|
||||
setVisible: context.setVisibleOverlay,
|
||||
setInvisible: context.setInvisibleOverlay,
|
||||
},
|
||||
mining: {
|
||||
copyCurrentSubtitle: context.copyCurrentSubtitle,
|
||||
|
||||
Reference in New Issue
Block a user