diff --git a/assets/16.png b/assets/16.png deleted file mode 100644 index f43ff68..0000000 Binary files a/assets/16.png and /dev/null differ diff --git a/assets/lang/en_US.json b/assets/lang/en_US.json index 979bc73..03e21bc 100644 --- a/assets/lang/en_US.json +++ b/assets/lang/en_US.json @@ -12,8 +12,8 @@ "no": "No", "next": "Next", "setup_question4": "Select a client mod you want to install:", - "setup_question4_clientmodnotice": "Why not all of them? Having many client mods at the same time can cause issues. If you really want to do it though, check our Discord.", - "settings-theme": "ArmCord theme:", + "setup_question4_clientmodnotice": "Why not all of them? Having many client mods at the same time can cause issues. If you really want to do it though, check our documentation.", + "settings-theme": "ArmCord Theme:", "settings-theme-glasstron": "Glasstron (experimental)", "settings-theme-tabs": "Tabs (experimental)", "settings-theme-default": "Default", @@ -21,12 +21,8 @@ "settings-tray": "Minimize to tray", "settings-patches": "Automatic Patches", "settings-channel": "Discord channel:", - "settings-invitewebsocket": "Invite Websocket", + "settings-invitewebsocket": "discord.gg support", "settings-mod": "Client mod:", - "settings-prfmMode": "Performance mode:", - "settings-prfmMode-performance": "Performance", - "settings-prfmMode-battery": "Battery", - "settings-none": "None", "settings-save": "Save settings", "settings-updater": "Check for updates" } diff --git a/assets/lang/fr-FR.json b/assets/lang/fr-FR.json index 31e09b1..28dbdbd 100644 --- a/assets/lang/fr-FR.json +++ b/assets/lang/fr-FR.json @@ -24,9 +24,5 @@ "settings-theme-glasstron": "Glasstron (experimental)", "settings-theme-native": "Native", "settings-patches": "Automatic Patches", - "settings-invitewebsocket": "discord.gg support", - "settings-prfmMode": "Performance mode:", - "settings-prfmMode-performance": "Performance", - "settings-prfmMode-battery": "Battery", - "settings-none": "None" + "settings-invitewebsocket": "discord.gg support" } diff --git a/assets/lang/id-ID.json b/assets/lang/id-ID.json deleted file mode 100644 index 03f2b4f..0000000 --- a/assets/lang/id-ID.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "loading_screen_start": "Starting ArmCord…", - "loading_screen_offline": "You appear to be offline. Please connect to the Internet and try again.", - "loading_screen_update": "A new version of ArmCord is available. Please update to the latest version.", - "setup_question1": "Select what kind of setup you want to perform:", - "setup_question1_answer1": "Express setup", - "setup_question1_answer2": "Full setup", - "setup_question2": "Choose your Discord channel/instance:", - "setup_offline": "You appear to be offline. Please connect to the Internet and restart the ArmCord setup.", - "setup_question3": "Should ArmCord handle client mods installation?", - "yes": "Yes", - "no": "No", - "next": "Next", - "setup_question4": "Select a client mod you want to install:", - "setup_question4_clientmodnotice": "Why not all of them? Having many client mods at the same time can cause issues. If you really want to do it though, check our documentation.", - "settings-theme": "ArmCord Theme:", - "settings-theme-glasstron": "Glasstron (experimental)", - "settings-theme-tabs": "Tabs (experimental)", - "settings-theme-default": "Default", - "settings-theme-native": "Native", - "settings-tray": "Minimize to tray", - "settings-patches": "Automatic Patches", - "settings-channel": "Discord channel:", - "settings-invitewebsocket": "discord.gg support", - "settings-mod": "Client mod:", - "settings-save": "Save settings", - "settings-updater": "Check for updates", - "settings-prfmMode": "Performance mode:", - "settings-prfmMode-performance": "Performance", - "settings-prfmMode-battery": "Battery", - "settings-none": "None" -} diff --git a/assets/lang/it-IT.json b/assets/lang/it-IT.json index a301d5c..144d221 100644 --- a/assets/lang/it-IT.json +++ b/assets/lang/it-IT.json @@ -24,9 +24,5 @@ "settings-theme-default": "Default", "settings-theme-native": "Native", "settings-patches": "Automatic Patches", - "settings-invitewebsocket": "discord.gg support", - "settings-prfmMode": "Performance mode:", - "settings-prfmMode-performance": "Performance", - "settings-prfmMode-battery": "Battery", - "settings-none": "None" + "settings-invitewebsocket": "discord.gg support" } diff --git a/assets/lang/nb-NO.json b/assets/lang/nb-NO.json index 050af76..41670f2 100644 --- a/assets/lang/nb-NO.json +++ b/assets/lang/nb-NO.json @@ -24,9 +24,5 @@ "settings-theme-default": "Default", "settings-theme-native": "Native", "settings-patches": "Automatic Patches", - "settings-invitewebsocket": "discord.gg support", - "settings-prfmMode": "Performance mode:", - "settings-prfmMode-performance": "Performance", - "settings-prfmMode-battery": "Battery", - "settings-none": "None" + "settings-invitewebsocket": "discord.gg support" } diff --git a/assets/lang/nl-NL.json b/assets/lang/nl-NL.json index bb37188..485d28f 100644 --- a/assets/lang/nl-NL.json +++ b/assets/lang/nl-NL.json @@ -24,9 +24,5 @@ "settings-theme-tabs": "Tabs (experimenteel)", "settings-theme-default": "Standaard", "settings-theme-native": "Native", - "settings-invitewebsocket": "discord.gg support", - "settings-none": "None", - "settings-prfmMode": "Performance mode:", - "settings-prfmMode-performance": "Performance", - "settings-prfmMode-battery": "Battery" + "settings-invitewebsocket": "discord.gg support" } diff --git a/assets/lang/pl-PL.json b/assets/lang/pl-PL.json index 7e06569..979e56b 100644 --- a/assets/lang/pl-PL.json +++ b/assets/lang/pl-PL.json @@ -24,9 +24,5 @@ "settings-theme-default": "Domyślny", "settings-theme-native": "Natywny", "settings-patches": "Automatyczne łatki", - "settings-invitewebsocket": "Wsparcie linków discord.gg", - "settings-prfmMode": "Performance mode:", - "settings-prfmMode-performance": "Performance", - "settings-prfmMode-battery": "Battery", - "settings-none": "None" + "settings-invitewebsocket": "Wsparcie linków discord.gg" } diff --git a/assets/macos.png b/assets/macos.png deleted file mode 100644 index 953ecfa..0000000 Binary files a/assets/macos.png and /dev/null differ diff --git a/package.json b/package.json index 6686ce4..17c7f28 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@types/node": "^17.0.33", "@types/ws": "^8.5.3", "copyfiles": "^2.4.1", - "electron": "^19.0.4", + "electron": "^18.2.4", "electron-builder": "^23.0.3", "husky": "^8.0.1", "prettier": "^2.5.1", diff --git a/src/content/setup.html b/src/content/setup.html index 1783c8f..6ed4c94 100644 --- a/src/content/setup.html +++ b/src/content/setup.html @@ -57,7 +57,7 @@

Why not all of them? Having many client mods at the same time can cause issues. If you really - want to do it though, check our Discord ;) + want to do it though, check our documentation ;)

@@ -101,7 +101,6 @@ automaticPatches: false, mods: "cumcord", inviteWebsocket: true, - performanceMode: "none", blurType: "acrylic" }); setTimeout(() => window.armcordinternal.restart(), 5000); @@ -131,7 +130,6 @@ autoLaunch: true, minimizeToTray: true, automaticPatches: false, - performanceMode: "none", mods: options.mod, inviteWebsocket: true, blurType: "acrylic" @@ -147,7 +145,6 @@ automaticPatches: false, autoLaunch: true, mods: "none", - performanceMode: "none", inviteWebsocket: true, blurType: "acrylic" }); diff --git a/src/main.ts b/src/main.ts index 8d1abb9..ec61b77 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,7 @@ // Modules to control application life and create native browser window import {app, BrowserWindow, session, dialog} from "electron"; import "v8-compile-cache"; -import {getConfig, setup, checkIfConfigExists, injectElectronFlags} from "./utils"; +import {getConfig, setup, checkIfConfigExists} from "./utils"; import "./extensions/mods"; import "./extensions/plugin"; import "./tray"; @@ -12,7 +12,6 @@ export var settings: any; export var customTitlebar: boolean; export var tabs: boolean; - if (process.platform == "linux") { if (process.env.$XDG_SESSION_TYPE == "wayland") { console.log("Wayland specific patches applied."); @@ -25,7 +24,7 @@ if (process.platform == "linux") { } } checkIfConfigExists(); -injectElectronFlags(); + app.whenReady().then(async () => { switch (await getConfig("windowStyle")) { case "default": diff --git a/src/settings/settings.html b/src/settings/settings.html index c57151c..7d723c5 100644 --- a/src/settings/settings.html +++ b/src/settings/settings.html @@ -58,14 +58,7 @@

Client mod:

-
- -

Performance mode:

-
+ @@ -78,7 +71,6 @@ document.getElementById("mod").value = await settings.get("mods"); document.getElementById("channel").value = await settings.get("channel"); document.getElementById("theme").value = await settings.get("windowStyle"); - document.getElementById("performanceMode").value = await settings.get("performanceMode"); } loadSettings(); document.getElementById("save").addEventListener("click", function () { @@ -92,7 +84,6 @@ mods: document.getElementById("mod").value, blurType: "acrylic", inviteWebsocket: document.getElementById("websocket").checked, - performanceMode: document.getElementById("prfmMode").value, doneSetup: true }); }); diff --git a/src/utils.ts b/src/utils.ts index 2a42ff8..e331a96 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,7 +1,6 @@ import * as fs from "fs"; import {app, dialog} from "electron"; import path from "path"; -import { defaultMaxListeners } from "events"; export var firstRun: boolean; export var isSetup: boolean; export var contentPath: string; @@ -43,7 +42,6 @@ export function setup() { automaticPatches: false, mods: "cumcord", blurType: "acrylic", - performanceMode: "none", inviteWebsocket: true, doneSetup: false }; @@ -65,45 +63,7 @@ export async function injectJS(inject: string) { document.body.appendChild(el); } -export async function injectElectronFlags() { - // MIT License - // Copyright (c) 2022 GooseNest - - // Permission is hereby granted, free of charge, to any person obtaining a copy - // of this software and associated documentation files (the "Software"), to deal - // in the Software without restriction, including without limitation the rights - // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - // copies of the Software, and to permit persons to whom the Software is - // furnished to do so, subject to the following conditions: - - // The above copyright notice and this permission notice shall be included in all - // copies or substantial portions of the Software. - - // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - // SOFTWARE. - const presets = { - 'performance': `--enable-gpu-rasterization --enable-zero-copy --ignore-gpu-blocklist --enable-hardware-overlays=single-fullscreen,single-on-top,underlay --enable-features=EnableDrDc,CanvasOopRasterization,BackForwardCache:TimeToLiveInBackForwardCacheInSeconds/300/should_ignore_blocklists/true/enable_same_site/true,ThrottleDisplayNoneAndVisibilityHiddenCrossOriginIframes,UseSkiaRenderer,WebAssemblyLazyCompilation --disable-features=Vulkan --force_high_performance_gpu`, // Performance - 'battery': '--enable-features=TurnOffStreamingMediaCachingOnBattery --force_low_power_gpu' // Known to have better battery life for Chromium? - }; - switch (await getConfig("performanceMode")) { - case "performance": - console.log("Performance mode enabled"); - app.commandLine.appendSwitch(presets.performance); - break; - case "battery": - console.log("Battery mode enabled"); - app.commandLine.appendSwitch(presets.battery); - break; - default: - console.log("No performance modes set"); - } -} //ArmCord Settings/Storage manager export interface Settings { @@ -113,7 +73,6 @@ export interface Settings { minimizeToTray: boolean; automaticPatches: boolean; mods: string; - performanceMode: string, blurType: string; inviteWebsocket: boolean; doneSetup: boolean; diff --git a/src/window.ts b/src/window.ts index 9b6acf2..7445fe7 100644 --- a/src/window.ts +++ b/src/window.ts @@ -119,7 +119,7 @@ export function createCustomWindow() { height: 350, title: "ArmCord", darkTheme: true, - icon: path.join(__dirname, "../", "/assets/ac_icon_transparent.png"), + icon: path.join(__dirname, "/assets/icon_transparent.png"), frame: false, autoHideMenuBar: true, webPreferences: { @@ -135,7 +135,7 @@ export function createNativeWindow() { height: 350, title: "ArmCord", darkTheme: true, - icon: path.join(__dirname, "../", "/assets/ac_icon_transparent.png"), + icon: path.join(__dirname, "/assets/icon_transparent.png"), frame: true, autoHideMenuBar: true, webPreferences: { @@ -157,7 +157,7 @@ export function createTabsHost() { height: 350, title: "ArmCord", darkTheme: true, - icon: path.join(__dirname, "../", "/assets/ac_icon_transparent.png"), + icon: path.join(__dirname, "/assets/icon_transparent.png"), frame: true, autoHideMenuBar: true, webPreferences: { @@ -186,7 +186,7 @@ export function createTabsGuest(number: number) { height: 600, title: "ArmCord Guest Window " + number, darkTheme: true, - icon: path.join(__dirname, "../", "/assets/ac_icon_transparent.png"), + icon: path.join(__dirname, "/assets/icon_transparent.png"), frame: true, autoHideMenuBar: true, webPreferences: { @@ -223,7 +223,7 @@ export function createInviteWindow() { height: 600, title: "ArmCord Invite Manager", darkTheme: true, - icon: path.join(__dirname, "../", "/assets/ac_icon_transparent.png"), + icon: path.join(__dirname, "/assets/icon_transparent.png"), frame: true, autoHideMenuBar: true, webPreferences: {