feat(macos): configuration window + curl-backed macOS updater (#71)

This commit is contained in:
2026-05-17 02:23:44 -07:00
committed by GitHub
parent 6ca5cede3e
commit e84674e3b5
100 changed files with 13890 additions and 235 deletions
+21
View File
@@ -5,6 +5,9 @@ interface SetupWindowConfig {
resizable?: boolean;
minimizable?: boolean;
maximizable?: boolean;
preloadPath?: string;
sandbox?: boolean;
backgroundColor?: string;
}
function createSetupWindowHandler<TWindow>(
@@ -21,9 +24,12 @@ function createSetupWindowHandler<TWindow>(
...(config.resizable === undefined ? {} : { resizable: config.resizable }),
...(config.minimizable === undefined ? {} : { minimizable: config.minimizable }),
...(config.maximizable === undefined ? {} : { maximizable: config.maximizable }),
...(config.backgroundColor === undefined ? {} : { backgroundColor: config.backgroundColor }),
webPreferences: {
nodeIntegration: false,
contextIsolation: true,
...(config.sandbox === undefined ? {} : { sandbox: config.sandbox }),
...(config.preloadPath ? { preload: config.preloadPath } : {}),
},
});
}
@@ -60,3 +66,18 @@ export function createCreateAnilistSetupWindowHandler<TWindow>(deps: {
title: 'Anilist Setup',
});
}
export function createCreateConfigSettingsWindowHandler<TWindow>(deps: {
createBrowserWindow: (options: Electron.BrowserWindowConstructorOptions) => TWindow;
preloadPath: string;
}) {
return createSetupWindowHandler(deps, {
width: 1040,
height: 760,
title: 'SubMiner Configuration',
resizable: true,
preloadPath: deps.preloadPath,
sandbox: false,
backgroundColor: '#24273a',
});
}