mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-11 16:19:27 -07:00
feat(core): add Electron runtime, services, and app composition
This commit is contained in:
27
src/main/runtime/jellyfin-setup-window-main-deps.ts
Normal file
27
src/main/runtime/jellyfin-setup-window-main-deps.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { createOpenJellyfinSetupWindowHandler } from './jellyfin-setup-window';
|
||||
|
||||
type OpenJellyfinSetupWindowMainDeps = Parameters<typeof createOpenJellyfinSetupWindowHandler>[0];
|
||||
|
||||
export function createBuildOpenJellyfinSetupWindowMainDepsHandler(
|
||||
deps: OpenJellyfinSetupWindowMainDeps,
|
||||
) {
|
||||
return (): OpenJellyfinSetupWindowMainDeps => ({
|
||||
maybeFocusExistingSetupWindow: () => deps.maybeFocusExistingSetupWindow(),
|
||||
createSetupWindow: () => deps.createSetupWindow(),
|
||||
getResolvedJellyfinConfig: () => deps.getResolvedJellyfinConfig(),
|
||||
buildSetupFormHtml: (defaultServer: string, defaultUser: string) =>
|
||||
deps.buildSetupFormHtml(defaultServer, defaultUser),
|
||||
parseSubmissionUrl: (rawUrl: string) => deps.parseSubmissionUrl(rawUrl),
|
||||
authenticateWithPassword: (server: string, username: string, password: string, clientInfo) =>
|
||||
deps.authenticateWithPassword(server, username, password, clientInfo),
|
||||
getJellyfinClientInfo: () => deps.getJellyfinClientInfo(),
|
||||
saveStoredSession: (session) => deps.saveStoredSession(session),
|
||||
patchJellyfinConfig: (session) => deps.patchJellyfinConfig(session),
|
||||
logInfo: (message: string) => deps.logInfo(message),
|
||||
logError: (message: string, error: unknown) => deps.logError(message, error),
|
||||
showMpvOsd: (message: string) => deps.showMpvOsd(message),
|
||||
clearSetupWindow: () => deps.clearSetupWindow(),
|
||||
setSetupWindow: (window) => deps.setSetupWindow(window),
|
||||
encodeURIComponent: (value: string) => deps.encodeURIComponent(value),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user