feat(notifications): add overlay notifications with position config (#110)

This commit is contained in:
2026-06-10 22:46:52 -07:00
committed by GitHub
parent c09d009a3e
commit 7be1843c41
177 changed files with 7524 additions and 440 deletions
+6
View File
@@ -106,6 +106,7 @@ export interface CliCommandServiceDeps {
hasMainWindow: () => boolean;
getMultiCopyTimeoutMs: () => number;
showMpvOsd: (text: string) => void;
showPlaybackFeedback?: (text: string) => void;
log: (message: string) => void;
logDebug: (message: string) => void;
warn: (message: string) => void;
@@ -128,6 +129,7 @@ interface MpvCliRuntime {
setSocketPath: (socketPath: string) => void;
getClient: () => MpvClientLike | null;
showOsd: (text: string) => void;
showPlaybackFeedback?: (text: string) => void;
}
interface TexthookerCliRuntime {
@@ -295,6 +297,7 @@ export function createCliCommandDepsRuntime(
hasMainWindow: options.app.hasMainWindow,
getMultiCopyTimeoutMs: options.getMultiCopyTimeoutMs,
showMpvOsd: options.mpv.showOsd,
showPlaybackFeedback: options.mpv.showPlaybackFeedback,
log: options.log,
logDebug: options.logDebug,
warn: options.warn,
@@ -546,6 +549,9 @@ export function handleCliCommand(
'shiftSubDelayNextLine',
'Shift subtitle delay failed',
);
} else if (args.playbackFeedback) {
const showFeedback = deps.showPlaybackFeedback ?? deps.showMpvOsd;
showFeedback(args.playbackFeedback);
} else if (args.cycleRuntimeOptionId !== undefined) {
dispatchCliSessionAction(
{