diff --git a/src/content/setup.html b/src/content/setup.html index cdca768..22f3f98 100644 --- a/src/content/setup.html +++ b/src/content/setup.html @@ -46,7 +46,9 @@ minimizeToTray: true, automaticPatches: false, mods: "cumcord", - blurType: "acrylic" + blurType: "acrylic", + inviteWebsocket: true, + doneSetup: true }); fade(document.getElementById("setup")); setTimeout(function () { @@ -98,7 +100,9 @@ minimizeToTray: true, automaticPatches: false, mods: mod, - blurType: "acrylic" + blurType: "acrylic", + inviteWebsocket: true, + doneSetup: true }); fade(document.getElementById("setup")); setTimeout(function () { @@ -113,7 +117,9 @@ minimizeToTray: true, automaticPatches: false, mods: "none", - blurType: "acrylic" + blurType: "acrylic", + inviteWebsocket: true, + doneSetup: true }); fade(document.getElementById("setup")); setTimeout(function () { diff --git a/src/settings/settings.html b/src/settings/settings.html index 2b8151f..b74d94f 100644 --- a/src/settings/settings.html +++ b/src/settings/settings.html @@ -74,7 +74,9 @@ minimizeToTray: document.getElementById("tray").checked, automaticPatches: document.getElementById("patches").checked, mods: document.getElementById("mod").value, - blurType: "acrylic" + blurType: "acrylic", + inviteWebsocket: true, + doneSetup: true }); }); diff --git a/src/utils.ts b/src/utils.ts index 7e48a87..6b12f38 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -41,6 +41,7 @@ export function setup() { automaticPatches: false, mods: "cumcord", blurType: "acrylic", + inviteWebsocket: true, doneSetup: false }; setConfigBulk({ @@ -72,6 +73,7 @@ export interface Settings { automaticPatches: boolean; mods: string; blurType: string; + inviteWebsocket: boolean; doneSetup: boolean; } export async function getConfig(object: string) { diff --git a/src/window.ts b/src/window.ts index cd1c59d..c5e4b9c 100644 --- a/src/window.ts +++ b/src/window.ts @@ -17,7 +17,7 @@ contextMenu({ showSearchWithGoogle: true }); -function doAfterDefiningTheWindow() { +async function doAfterDefiningTheWindow() { checkIfConfigIsBroken(); registerIpc(); mainWindow.webContents.userAgent = @@ -40,7 +40,9 @@ function doAfterDefiningTheWindow() { } }); console.log(contentPath); - startServer() + if (await getConfig("inviteWebsocket") == true) { + startServer() + } try { mainWindow.loadFile(contentPath); } catch (e) {