diff --git a/package.json b/package.json index 9725e75..34bac84 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@typescript-eslint/eslint-plugin": "^5.59.2", "@typescript-eslint/parser": "^5.59.2", "copyfiles": "^2.4.1", - "electron": "26.0.0", + "electron": "26.1.0", "electron-builder": "^24.6.3", "eslint": "^8.40.0", "eslint-config-dmitmel": "github:dmitmel/eslint-config-dmitmel", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 05b2a4e..f93b0dc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,8 +41,8 @@ devDependencies: specifier: ^2.4.1 version: 2.4.1 electron: - specifier: 26.0.0 - version: 26.0.0 + specifier: 26.1.0 + version: 26.1.0 electron-builder: specifier: ^24.6.3 version: 24.6.3 @@ -1027,8 +1027,8 @@ packages: - supports-color dev: true - /electron@26.0.0: - resolution: {integrity: sha512-x57bdCaDvgnlc41VOm/UWihJCCiI3OxJKiBgB/e5F7Zd6avo+61mO6IzQS7Bu/k/a1KPjou25EUORR6UPKznBQ==} + /electron@26.1.0: + resolution: {integrity: sha512-qEh19H09Pysn3ibms5nZ0haIh5pFoOd7/5Ww7gzmAwDQOulRi8Sa2naeueOyIb1GKpf+6L4ix3iceYRAuA5r5Q==} engines: {node: '>= 12.20.55'} hasBin: true requiresBuild: true diff --git a/src/menu.ts b/src/menu.ts index bd8994b..22f22a3 100644 --- a/src/menu.ts +++ b/src/menu.ts @@ -61,10 +61,7 @@ export async function setMenu(): Promise { }, { label: "Fullscreen", - accelerator: "F11", - click() { - mainWindow.fullScreen = !mainWindow.fullScreen; - } + role: "togglefullscreen" }, { label: "Reload", diff --git a/src/utils.ts b/src/utils.ts index 8833c4d..0bf6261 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -343,23 +343,27 @@ async function updateModBundle(): Promise { //waiting } let name: string = await getConfig("mods"); - const clientMods = { - vencord: "https://github.com/Vendicated/Vencord/releases/download/devbuild/browser.js", - cordwood: "https://raw.githubusercontent.com/Cordwood/builds/master/index.js", - shelter: "https://raw.githubusercontent.com/uwu/shelter-builds/main/shelter.js", - custom: await getConfig("customJsBundle") - }; - const clientModsCss = { - vencord: "https://github.com/Vendicated/Vencord/releases/download/devbuild/browser.css", - cordwood: "https://armcord.app/placeholder.css", - shelter: "https://armcord.app/placeholder.css", - custom: await getConfig("customCssBundle") - }; - console.log(clientMods[name as keyof typeof clientMods]); - let bundle: string = await (await fetch(clientMods[name as keyof typeof clientMods])).text(); - fs.writeFileSync(`${distFolder}bundle.js`, bundle, "utf-8"); - let css: string = await (await fetch(clientModsCss[name as keyof typeof clientModsCss])).text(); - fs.writeFileSync(`${distFolder}bundle.css`, css, "utf-8"); + if (name == "custom") { + // aspy fix + let bundle: string = await (await fetch(await getConfig("customJsBundle"))).text(); + fs.writeFileSync(`${distFolder}bundle.js`, bundle, "utf-8"); + let css: string = await (await fetch(await getConfig("customCssBundle"))).text(); + fs.writeFileSync(`${distFolder}bundle.css`, css, "utf-8"); + } else { + const clientMods = { + vencord: "https://github.com/Vendicated/Vencord/releases/download/devbuild/browser.js", + shelter: "https://raw.githubusercontent.com/uwu/shelter-builds/main/shelter.js" + }; + const clientModsCss = { + vencord: "https://github.com/Vendicated/Vencord/releases/download/devbuild/browser.css", + shelter: "https://armcord.app/placeholder.css" + }; + console.log(clientMods[name as keyof typeof clientMods]); + let bundle: string = await (await fetch(clientMods[name as keyof typeof clientMods])).text(); + fs.writeFileSync(`${distFolder}bundle.js`, bundle, "utf-8"); + let css: string = await (await fetch(clientModsCss[name as keyof typeof clientModsCss])).text(); + fs.writeFileSync(`${distFolder}bundle.css`, css, "utf-8"); + } } catch (e) { console.log("[Mod loader] Failed to install mods"); console.error(e);