Compare commits

..

13 commits

Author SHA1 Message Date
Anonymous
e518c0f04e
Translated using Weblate (Indonesian)
Currently translated at 0.0% (0 of 30 strings)

Translation: ArmCord/ArmCord
Translate-URL: https://hosted.weblate.org/projects/armcord/armcord/id/
2022-06-10 23:22:42 +02:00
Anonymous
113a693603
Translated using Weblate (Polish)
Currently translated at 76.6% (23 of 30 strings)

Translation: ArmCord/ArmCord
Translate-URL: https://hosted.weblate.org/projects/armcord/armcord/pl/
2022-06-10 23:22:41 +02:00
Anonymous
85dea97312
Translated using Weblate (Dutch)
Currently translated at 76.6% (23 of 30 strings)

Translation: ArmCord/ArmCord
Translate-URL: https://hosted.weblate.org/projects/armcord/armcord/nl/
2022-06-10 23:22:41 +02:00
Anonymous
00bf23667b
Translated using Weblate (Norwegian Bokmål)
Currently translated at 76.6% (23 of 30 strings)

Translation: ArmCord/ArmCord
Translate-URL: https://hosted.weblate.org/projects/armcord/armcord/nb_NO/
2022-06-10 23:22:41 +02:00
Anonymous
7f524b1559
Translated using Weblate (Italian)
Currently translated at 76.6% (23 of 30 strings)

Translation: ArmCord/ArmCord
Translate-URL: https://hosted.weblate.org/projects/armcord/armcord/it/
2022-06-10 23:22:41 +02:00
Anonymous
478c2da61a
Translated using Weblate (French)
Currently translated at 76.6% (23 of 30 strings)

Translation: ArmCord/ArmCord
Translate-URL: https://hosted.weblate.org/projects/armcord/armcord/fr/
2022-06-10 23:22:40 +02:00
smartfrigde
b43a992027 Tweak translations a bit 2022-06-10 23:22:32 +02:00
Anonymous
b8b1d04d24
Translated using Weblate (Indonesian)
Currently translated at 100.0% (0 of 0 strings)

Translation: ArmCord/ArmCord
Translate-URL: https://hosted.weblate.org/projects/armcord/armcord/id/
2022-06-10 22:38:33 +02:00
Ufal Salman
465a072e67
Added translation using Weblate (Indonesian) 2022-06-10 22:38:33 +02:00
smartfrigde
0f6f650be2 Add 16x16 icon 2022-06-10 22:38:27 +02:00
smartfrigde
a12463877a Add macOS tray icon potential fix 2022-06-10 22:29:43 +02:00
smartfrigde
98f88f4609 Fix icon loading 2022-06-10 20:46:30 +02:00
smartfrigde
81377d3657 Add performance mode 2022-06-10 20:27:37 +02:00
15 changed files with 128 additions and 18 deletions

BIN
assets/16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -12,8 +12,8 @@
"no": "No", "no": "No",
"next": "Next", "next": "Next",
"setup_question4": "Select a client mod you want to install:", "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.", "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:", "settings-theme": "ArmCord theme:",
"settings-theme-glasstron": "Glasstron (experimental)", "settings-theme-glasstron": "Glasstron (experimental)",
"settings-theme-tabs": "Tabs (experimental)", "settings-theme-tabs": "Tabs (experimental)",
"settings-theme-default": "Default", "settings-theme-default": "Default",
@ -21,8 +21,12 @@
"settings-tray": "Minimize to tray", "settings-tray": "Minimize to tray",
"settings-patches": "Automatic Patches", "settings-patches": "Automatic Patches",
"settings-channel": "Discord channel:", "settings-channel": "Discord channel:",
"settings-invitewebsocket": "discord.gg support", "settings-invitewebsocket": "Invite Websocket",
"settings-mod": "Client mod:", "settings-mod": "Client mod:",
"settings-prfmMode": "Performance mode:",
"settings-prfmMode-performance": "Performance",
"settings-prfmMode-battery": "Battery",
"settings-none": "None",
"settings-save": "Save settings", "settings-save": "Save settings",
"settings-updater": "Check for updates" "settings-updater": "Check for updates"
} }

View file

@ -24,5 +24,9 @@
"settings-theme-glasstron": "Glasstron (experimental)", "settings-theme-glasstron": "Glasstron (experimental)",
"settings-theme-native": "Native", "settings-theme-native": "Native",
"settings-patches": "Automatic Patches", "settings-patches": "Automatic Patches",
"settings-invitewebsocket": "discord.gg support" "settings-invitewebsocket": "discord.gg support",
"settings-prfmMode": "Performance mode:",
"settings-prfmMode-performance": "Performance",
"settings-prfmMode-battery": "Battery",
"settings-none": "None"
} }

32
assets/lang/id-ID.json Normal file
View file

@ -0,0 +1,32 @@
{
"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"
}

View file

@ -24,5 +24,9 @@
"settings-theme-default": "Default", "settings-theme-default": "Default",
"settings-theme-native": "Native", "settings-theme-native": "Native",
"settings-patches": "Automatic Patches", "settings-patches": "Automatic Patches",
"settings-invitewebsocket": "discord.gg support" "settings-invitewebsocket": "discord.gg support",
"settings-prfmMode": "Performance mode:",
"settings-prfmMode-performance": "Performance",
"settings-prfmMode-battery": "Battery",
"settings-none": "None"
} }

View file

@ -24,5 +24,9 @@
"settings-theme-default": "Default", "settings-theme-default": "Default",
"settings-theme-native": "Native", "settings-theme-native": "Native",
"settings-patches": "Automatic Patches", "settings-patches": "Automatic Patches",
"settings-invitewebsocket": "discord.gg support" "settings-invitewebsocket": "discord.gg support",
"settings-prfmMode": "Performance mode:",
"settings-prfmMode-performance": "Performance",
"settings-prfmMode-battery": "Battery",
"settings-none": "None"
} }

View file

@ -24,5 +24,9 @@
"settings-theme-tabs": "Tabs (experimenteel)", "settings-theme-tabs": "Tabs (experimenteel)",
"settings-theme-default": "Standaard", "settings-theme-default": "Standaard",
"settings-theme-native": "Native", "settings-theme-native": "Native",
"settings-invitewebsocket": "discord.gg support" "settings-invitewebsocket": "discord.gg support",
"settings-none": "None",
"settings-prfmMode": "Performance mode:",
"settings-prfmMode-performance": "Performance",
"settings-prfmMode-battery": "Battery"
} }

View file

@ -24,5 +24,9 @@
"settings-theme-default": "Domyślny", "settings-theme-default": "Domyślny",
"settings-theme-native": "Natywny", "settings-theme-native": "Natywny",
"settings-patches": "Automatyczne łatki", "settings-patches": "Automatyczne łatki",
"settings-invitewebsocket": "Wsparcie linków discord.gg" "settings-invitewebsocket": "Wsparcie linków discord.gg",
"settings-prfmMode": "Performance mode:",
"settings-prfmMode-performance": "Performance",
"settings-prfmMode-battery": "Battery",
"settings-none": "None"
} }

BIN
assets/macos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View file

@ -26,7 +26,7 @@
"@types/node": "^17.0.33", "@types/node": "^17.0.33",
"@types/ws": "^8.5.3", "@types/ws": "^8.5.3",
"copyfiles": "^2.4.1", "copyfiles": "^2.4.1",
"electron": "^18.2.4", "electron": "^19.0.4",
"electron-builder": "^23.0.3", "electron-builder": "^23.0.3",
"husky": "^8.0.1", "husky": "^8.0.1",
"prettier": "^2.5.1", "prettier": "^2.5.1",

View file

@ -57,7 +57,7 @@
</div> </div>
<p class="text-center"> <p class="text-center">
Why not all of them? Having many client mods at the same time can cause issues. If you really 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 ;) want to do it though, check our Discord ;)
</p> </p>
<div id="buttons"> <div id="buttons">
<button id="next" class="center">Next</button> <button id="next" class="center">Next</button>
@ -101,6 +101,7 @@
automaticPatches: false, automaticPatches: false,
mods: "cumcord", mods: "cumcord",
inviteWebsocket: true, inviteWebsocket: true,
performanceMode: "none",
blurType: "acrylic" blurType: "acrylic"
}); });
setTimeout(() => window.armcordinternal.restart(), 5000); setTimeout(() => window.armcordinternal.restart(), 5000);
@ -130,6 +131,7 @@
autoLaunch: true, autoLaunch: true,
minimizeToTray: true, minimizeToTray: true,
automaticPatches: false, automaticPatches: false,
performanceMode: "none",
mods: options.mod, mods: options.mod,
inviteWebsocket: true, inviteWebsocket: true,
blurType: "acrylic" blurType: "acrylic"
@ -145,6 +147,7 @@
automaticPatches: false, automaticPatches: false,
autoLaunch: true, autoLaunch: true,
mods: "none", mods: "none",
performanceMode: "none",
inviteWebsocket: true, inviteWebsocket: true,
blurType: "acrylic" blurType: "acrylic"
}); });

View file

@ -1,7 +1,7 @@
// Modules to control application life and create native browser window // Modules to control application life and create native browser window
import {app, BrowserWindow, session, dialog} from "electron"; import {app, BrowserWindow, session, dialog} from "electron";
import "v8-compile-cache"; import "v8-compile-cache";
import {getConfig, setup, checkIfConfigExists} from "./utils"; import {getConfig, setup, checkIfConfigExists, injectElectronFlags} from "./utils";
import "./extensions/mods"; import "./extensions/mods";
import "./extensions/plugin"; import "./extensions/plugin";
import "./tray"; import "./tray";
@ -12,6 +12,7 @@ export var settings: any;
export var customTitlebar: boolean; export var customTitlebar: boolean;
export var tabs: boolean; export var tabs: boolean;
if (process.platform == "linux") { if (process.platform == "linux") {
if (process.env.$XDG_SESSION_TYPE == "wayland") { if (process.env.$XDG_SESSION_TYPE == "wayland") {
console.log("Wayland specific patches applied."); console.log("Wayland specific patches applied.");
@ -24,7 +25,7 @@ if (process.platform == "linux") {
} }
} }
checkIfConfigExists(); checkIfConfigExists();
injectElectronFlags();
app.whenReady().then(async () => { app.whenReady().then(async () => {
switch (await getConfig("windowStyle")) { switch (await getConfig("windowStyle")) {
case "default": case "default":

View file

@ -58,7 +58,14 @@
</select> </select>
<p class="header">Client mod:</p> <p class="header">Client mod:</p>
</div> </div>
<div class="switch">
<select name="prfmMode" id="prfmMode" class="left">
<option value="performance">Performance</option>
<option value="battery">Battery</option>
<option value="none">None</option>
</select>
<p class="header">Performance mode:</p>
</div>
<button id="save" class="center">Save settings</button> <button id="save" class="center">Save settings</button>
</body> </body>
@ -71,6 +78,7 @@
document.getElementById("mod").value = await settings.get("mods"); document.getElementById("mod").value = await settings.get("mods");
document.getElementById("channel").value = await settings.get("channel"); document.getElementById("channel").value = await settings.get("channel");
document.getElementById("theme").value = await settings.get("windowStyle"); document.getElementById("theme").value = await settings.get("windowStyle");
document.getElementById("performanceMode").value = await settings.get("performanceMode");
} }
loadSettings(); loadSettings();
document.getElementById("save").addEventListener("click", function () { document.getElementById("save").addEventListener("click", function () {
@ -84,6 +92,7 @@
mods: document.getElementById("mod").value, mods: document.getElementById("mod").value,
blurType: "acrylic", blurType: "acrylic",
inviteWebsocket: document.getElementById("websocket").checked, inviteWebsocket: document.getElementById("websocket").checked,
performanceMode: document.getElementById("prfmMode").value,
doneSetup: true doneSetup: true
}); });
}); });

View file

@ -1,6 +1,7 @@
import * as fs from "fs"; import * as fs from "fs";
import {app, dialog} from "electron"; import {app, dialog} from "electron";
import path from "path"; import path from "path";
import { defaultMaxListeners } from "events";
export var firstRun: boolean; export var firstRun: boolean;
export var isSetup: boolean; export var isSetup: boolean;
export var contentPath: string; export var contentPath: string;
@ -42,6 +43,7 @@ export function setup() {
automaticPatches: false, automaticPatches: false,
mods: "cumcord", mods: "cumcord",
blurType: "acrylic", blurType: "acrylic",
performanceMode: "none",
inviteWebsocket: true, inviteWebsocket: true,
doneSetup: false doneSetup: false
}; };
@ -63,7 +65,45 @@ export async function injectJS(inject: string) {
document.body.appendChild(el); 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 //ArmCord Settings/Storage manager
export interface Settings { export interface Settings {
@ -73,6 +113,7 @@ export interface Settings {
minimizeToTray: boolean; minimizeToTray: boolean;
automaticPatches: boolean; automaticPatches: boolean;
mods: string; mods: string;
performanceMode: string,
blurType: string; blurType: string;
inviteWebsocket: boolean; inviteWebsocket: boolean;
doneSetup: boolean; doneSetup: boolean;

View file

@ -119,7 +119,7 @@ export function createCustomWindow() {
height: 350, height: 350,
title: "ArmCord", title: "ArmCord",
darkTheme: true, darkTheme: true,
icon: path.join(__dirname, "/assets/icon_transparent.png"), icon: path.join(__dirname, "../", "/assets/ac_icon_transparent.png"),
frame: false, frame: false,
autoHideMenuBar: true, autoHideMenuBar: true,
webPreferences: { webPreferences: {
@ -135,7 +135,7 @@ export function createNativeWindow() {
height: 350, height: 350,
title: "ArmCord", title: "ArmCord",
darkTheme: true, darkTheme: true,
icon: path.join(__dirname, "/assets/icon_transparent.png"), icon: path.join(__dirname, "../", "/assets/ac_icon_transparent.png"),
frame: true, frame: true,
autoHideMenuBar: true, autoHideMenuBar: true,
webPreferences: { webPreferences: {
@ -157,7 +157,7 @@ export function createTabsHost() {
height: 350, height: 350,
title: "ArmCord", title: "ArmCord",
darkTheme: true, darkTheme: true,
icon: path.join(__dirname, "/assets/icon_transparent.png"), icon: path.join(__dirname, "../", "/assets/ac_icon_transparent.png"),
frame: true, frame: true,
autoHideMenuBar: true, autoHideMenuBar: true,
webPreferences: { webPreferences: {
@ -186,7 +186,7 @@ export function createTabsGuest(number: number) {
height: 600, height: 600,
title: "ArmCord Guest Window " + number, title: "ArmCord Guest Window " + number,
darkTheme: true, darkTheme: true,
icon: path.join(__dirname, "/assets/icon_transparent.png"), icon: path.join(__dirname, "../", "/assets/ac_icon_transparent.png"),
frame: true, frame: true,
autoHideMenuBar: true, autoHideMenuBar: true,
webPreferences: { webPreferences: {
@ -223,7 +223,7 @@ export function createInviteWindow() {
height: 600, height: 600,
title: "ArmCord Invite Manager", title: "ArmCord Invite Manager",
darkTheme: true, darkTheme: true,
icon: path.join(__dirname, "/assets/icon_transparent.png"), icon: path.join(__dirname, "../", "/assets/ac_icon_transparent.png"),
frame: true, frame: true,
autoHideMenuBar: true, autoHideMenuBar: true,
webPreferences: { webPreferences: {