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

@@ -32,6 +32,9 @@ export class UserPreferences {
@Column("boolean", { default: false })
preferQuitInsteadOfHiding: boolean;
@Column("boolean", { default: false })
runAtStartup: boolean;
@CreateDateColumn()
createdAt: Date;

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",
});

View File

@@ -26,7 +26,7 @@ export class WindowManager {
}
}
public static async createMainWindow() {
public static createMainWindow() {
// Create the browser window.
this.mainWindow = new BrowserWindow({
width: 1200,