chore: pulling from remote

This commit is contained in:
Hydra
2024-05-07 09:12:48 +01:00
21 changed files with 13093 additions and 23 deletions

View File

@@ -26,6 +26,7 @@ import "./torrenting/resume-game-download";
import "./torrenting/start-game-download";
import "./user-preferences/get-user-preferences";
import "./user-preferences/update-user-preferences";
import "./user-preferences/auto-launch";
ipcMain.handle("ping", () => "pong");
ipcMain.handle("getVersion", () => app.getVersion());

View File

@@ -0,0 +1,21 @@
import { registerEvent } from "../register-event";
import AutoLaunch from "auto-launch";
import { app } from "electron";
const autoLaunch = async (
_event: Electron.IpcMainInvokeEvent,
enabled: boolean
) => {
const appLauncher = new AutoLaunch({
name: app.getName(),
});
if (enabled) {
appLauncher.enable().catch();
} else {
appLauncher.disable().catch();
}
};
registerEvent(autoLaunch, {
name: "autoLaunch",
});