Make invite websocket togglable

This commit is contained in:
smartfrigde 2022-04-19 19:59:52 +02:00
parent 37966b985a
commit 7a7dd05163
4 changed files with 18 additions and 6 deletions

View file

@ -46,7 +46,9 @@
minimizeToTray: true, minimizeToTray: true,
automaticPatches: false, automaticPatches: false,
mods: "cumcord", mods: "cumcord",
blurType: "acrylic" blurType: "acrylic",
inviteWebsocket: true,
doneSetup: true
}); });
fade(document.getElementById("setup")); fade(document.getElementById("setup"));
setTimeout(function () { setTimeout(function () {
@ -98,7 +100,9 @@
minimizeToTray: true, minimizeToTray: true,
automaticPatches: false, automaticPatches: false,
mods: mod, mods: mod,
blurType: "acrylic" blurType: "acrylic",
inviteWebsocket: true,
doneSetup: true
}); });
fade(document.getElementById("setup")); fade(document.getElementById("setup"));
setTimeout(function () { setTimeout(function () {
@ -113,7 +117,9 @@
minimizeToTray: true, minimizeToTray: true,
automaticPatches: false, automaticPatches: false,
mods: "none", mods: "none",
blurType: "acrylic" blurType: "acrylic",
inviteWebsocket: true,
doneSetup: true
}); });
fade(document.getElementById("setup")); fade(document.getElementById("setup"));
setTimeout(function () { setTimeout(function () {

View file

@ -74,7 +74,9 @@
minimizeToTray: document.getElementById("tray").checked, minimizeToTray: document.getElementById("tray").checked,
automaticPatches: document.getElementById("patches").checked, automaticPatches: document.getElementById("patches").checked,
mods: document.getElementById("mod").value, mods: document.getElementById("mod").value,
blurType: "acrylic" blurType: "acrylic",
inviteWebsocket: true,
doneSetup: true
}); });
}); });
</script> </script>

View file

@ -41,6 +41,7 @@ export function setup() {
automaticPatches: false, automaticPatches: false,
mods: "cumcord", mods: "cumcord",
blurType: "acrylic", blurType: "acrylic",
inviteWebsocket: true,
doneSetup: false doneSetup: false
}; };
setConfigBulk({ setConfigBulk({
@ -72,6 +73,7 @@ export interface Settings {
automaticPatches: boolean; automaticPatches: boolean;
mods: string; mods: string;
blurType: string; blurType: string;
inviteWebsocket: boolean;
doneSetup: boolean; doneSetup: boolean;
} }
export async function getConfig(object: string) { export async function getConfig(object: string) {

View file

@ -17,7 +17,7 @@ contextMenu({
showSearchWithGoogle: true showSearchWithGoogle: true
}); });
function doAfterDefiningTheWindow() { async function doAfterDefiningTheWindow() {
checkIfConfigIsBroken(); checkIfConfigIsBroken();
registerIpc(); registerIpc();
mainWindow.webContents.userAgent = mainWindow.webContents.userAgent =
@ -40,7 +40,9 @@ function doAfterDefiningTheWindow() {
} }
}); });
console.log(contentPath); console.log(contentPath);
startServer() if (await getConfig("inviteWebsocket") == true) {
startServer()
}
try { try {
mainWindow.loadFile(contentPath); mainWindow.loadFile(contentPath);
} catch (e) { } catch (e) {