mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
Compare commits
1 commit
efc0cb4a3f
...
551dda74d7
Author | SHA1 | Date | |
---|---|---|---|
|
551dda74d7 |
20 changed files with 46 additions and 271 deletions
BIN
assets/16.png
BIN
assets/16.png
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
|
@ -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 Discord.",
|
"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": "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,12 +21,8 @@
|
||||||
"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": "Invite Websocket",
|
"settings-invitewebsocket": "discord.gg support",
|
||||||
"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"
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"loading_screen_start": "Démarrage d'ArmCord…",
|
"loading_screen_start": "Démarrage d'ArmCord…",
|
||||||
"loading_screen_update": "Une nouvelle version d'ArmCord est disponible. Veuillez mettre à jour vers la dernière version.",
|
"loading_screen_update": "Une nouvelle version de ArmCord est disponible. Veuillez mettre à jour la dernière version.",
|
||||||
"setup_question1": "Sélectionnez le type de configuration que vous souhaitez effectuer :",
|
"setup_question1": "Sélectionnez le type de configuration que vous souhaitez effectuer :",
|
||||||
"setup_question1_answer1": "Configuration express",
|
"setup_question1_answer1": "Configuration express",
|
||||||
"setup_question1_answer2": "Configuration complète",
|
"setup_question1_answer2": "Configuration complète",
|
||||||
|
@ -10,23 +10,19 @@
|
||||||
"no": "Non",
|
"no": "Non",
|
||||||
"next": "Suivant",
|
"next": "Suivant",
|
||||||
"setup_question4": "Sélectionnez le mod client que vous souhaitez installer :",
|
"setup_question4": "Sélectionnez le mod client que vous souhaitez installer :",
|
||||||
"setup_question4_clientmodnotice": "Pourquoi pas tous ? Le fait d'avoir plusieurs clients mods en même temps peut causer des problèmes. Si vous voulez vraiment le faire, consultez notre Discord.",
|
"setup_question4_clientmodnotice": "Pourquoi pas tous ? Le fait d'avoir plusieurs mods clients en même temps peut causer des problèmes. Si vous voulez vraiment le faire, consultez notre documentation.",
|
||||||
"loading_screen_offline": "Vous semblez être hors ligne. Veuillez vous connecter à internet et réessayer.",
|
"loading_screen_offline": "Vous semblez être hors ligne. Veuillez vous connecter à internet et réessayer.",
|
||||||
"setup_offline": "Vous semblez être hors ligne. Veuillez vous connecter à internet et redémarrer l'installateur ArmCord.",
|
"setup_offline": "Vous semblez être hors ligne. Veuillez vous connecter à internet et redémarrer ArmCord Setup.",
|
||||||
"settings-tray": "Minimize to tray",
|
"settings-tray": "Minimize to tray",
|
||||||
"settings-channel": "Discord channel:",
|
"settings-channel": "Discord channel:",
|
||||||
"settings-mod": "Client mod:",
|
"settings-mod": "Client mod:",
|
||||||
"settings-save": "Save settings",
|
"settings-save": "Save settings",
|
||||||
"settings-updater": "Check for updates",
|
"settings-updater": "Check for updates",
|
||||||
"settings-theme": "Thème ArmCord :",
|
"settings-theme": "ArmCord Theme:",
|
||||||
"settings-theme-tabs": "Tabs (experimental)",
|
"settings-theme-tabs": "Tabs (experimental)",
|
||||||
"settings-theme-default": "Default",
|
"settings-theme-default": "Default",
|
||||||
"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": "Lien discord.gg",
|
"settings-invitewebsocket": "discord.gg support"
|
||||||
"settings-prfmMode": "Mode performance :",
|
|
||||||
"settings-prfmMode-performance": "Performance",
|
|
||||||
"settings-prfmMode-battery": "Batterie",
|
|
||||||
"settings-none": "Aucun"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"
|
|
||||||
}
|
|
|
@ -24,9 +24,5 @@
|
||||||
"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"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,9 +24,5 @@
|
||||||
"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"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,9 +24,5 @@
|
||||||
"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"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"no": "Nie",
|
"no": "Nie",
|
||||||
"next": "Dalej",
|
"next": "Dalej",
|
||||||
"setup_question4": "Wybierz modyfikację klienta którą chcesz zainstalować:",
|
"setup_question4": "Wybierz modyfikację klienta którą chcesz zainstalować:",
|
||||||
"setup_question4_clientmodnotice": "Dlaczego nie wszystkie na raz? Posiadanie wielu modyfikacji może spowodować wiele błędów. Jeśli jednak nalegasz możesz sprawdzić naszego Discorda.",
|
"setup_question4_clientmodnotice": "Dlaczego nie wszystkie na raz? Posiadanie wielu modyfikacji może spowodować wiele błędów. Jeśli jednak nalegasz możesz sprawdzić naszą dokumentację.",
|
||||||
"loading_screen_start": "Ładowanie ArmCord…",
|
"loading_screen_start": "Ładowanie ArmCord…",
|
||||||
"loading_screen_offline": "Wydaje nam się, że nie jesteś połączony z Internetem. Połącz się z internetem i spróbuj ponownie.",
|
"loading_screen_offline": "Wydaje nam się, że nie jesteś połączony z Internetem. Połącz się z internetem i spróbuj ponownie.",
|
||||||
"setup_question1_answer1": "Ekspresowa konfiguracja",
|
"setup_question1_answer1": "Ekspresowa konfiguracja",
|
||||||
|
@ -24,9 +24,5 @@
|
||||||
"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": "Websocket dla zaproszeń",
|
"settings-invitewebsocket": "Wsparcie linków discord.gg"
|
||||||
"settings-prfmMode": "Tryb wydajności:",
|
|
||||||
"settings-prfmMode-performance": "Wydajny",
|
|
||||||
"settings-prfmMode-battery": "Bateria",
|
|
||||||
"settings-none": "Nic/Brak"
|
|
||||||
}
|
}
|
||||||
|
|
BIN
assets/macos.png
BIN
assets/macos.png
Binary file not shown.
Before Width: | Height: | Size: 4.4 KiB |
|
@ -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": "^19.0.4",
|
"electron": "^18.2.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",
|
||||||
|
@ -34,7 +34,6 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"electron-context-menu": "github:ArmCord/electron-context-menu",
|
"electron-context-menu": "github:ArmCord/electron-context-menu",
|
||||||
"os-locale": "^6.0.2",
|
|
||||||
"v8-compile-cache": "^2.3.0",
|
"v8-compile-cache": "^2.3.0",
|
||||||
"ws": "^8.6.0"
|
"ws": "^8.6.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,14 +12,12 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div id="warning" class="hidden">
|
<div id="warning" class="hidden">
|
||||||
<p id="setup_offline">
|
<p>You appear to be offline. Please connect to the internet and restart ArmCord Setup.</p>
|
||||||
You appear to be offline. Please connect to the internet and restart ArmCord Setup.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="setup">
|
<div id="setup">
|
||||||
<div id="logo" class="hidden"></div>
|
<div id="logo" class="hidden"></div>
|
||||||
<div id="page1" class="hidden">
|
<div id="page1" class="hidden">
|
||||||
<p id="setup_question1">Select the type of setup you want to perform.</p>
|
<p>Select the type of setup you want to perform.</p>
|
||||||
<div id="buttons">
|
<div id="buttons">
|
||||||
<button id="express" class="center">Express</button>
|
<button id="express" class="center">Express</button>
|
||||||
<button id="full" class="center">Full</button>
|
<button id="full" class="center">Full</button>
|
||||||
|
@ -27,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="page2" class="hidden">
|
<div id="page2" class="hidden">
|
||||||
<p class="text-center setup-ask" id="setup_question2">Choose your Discord channel/instance:</p>
|
<p class="text-center setup-ask">Choose your Discord channel/instance:</p>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<select name="channel" id="channel" class="dropdown-button">
|
<select name="channel" id="channel" class="dropdown-button">
|
||||||
<option value="stable">Stable</option>
|
<option value="stable">Stable</option>
|
||||||
|
@ -36,9 +34,7 @@
|
||||||
<option value="foss">Fosscord</option>
|
<option value="foss">Fosscord</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<p class="text-center setup-ask" id="setup_question3">
|
<p class="text-center setup-ask">Should ArmCord handle client mods installation?</p>
|
||||||
Should ArmCord handle client mods installation?
|
|
||||||
</p>
|
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<select name="csp" id="csp" class="dropdown-button">
|
<select name="csp" id="csp" class="dropdown-button">
|
||||||
<option value="true">Yes</option>
|
<option value="true">Yes</option>
|
||||||
|
@ -51,7 +47,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="page3" class="hidden">
|
<div id="page3" class="hidden">
|
||||||
<p class="text-center setup-ask" id="setup_question4">Select a client mod you want to install:</p>
|
<p class="text-center setup-ask">Select a client mod you want to install:</p>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<select name="mod" id="mod" class="dropdown-button">
|
<select name="mod" id="mod" class="dropdown-button">
|
||||||
<option value="cumcord">Cumcord</option>
|
<option value="cumcord">Cumcord</option>
|
||||||
|
@ -59,9 +55,9 @@
|
||||||
<option value="flicker">Flicker (Heavily WIP)</option>
|
<option value="flicker">Flicker (Heavily WIP)</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<p class="text-center" id="setup_question4_clientmodnotice">
|
<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 Discord ;)
|
want to do it though, check our documentation ;)
|
||||||
</p>
|
</p>
|
||||||
<div id="buttons">
|
<div id="buttons">
|
||||||
<button id="next" class="center">Next</button>
|
<button id="next" class="center">Next</button>
|
||||||
|
@ -69,25 +65,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
|
||||||
async function loadLang() {
|
|
||||||
document.getElementById("next").innerHTML = await armcord.getLang("next");
|
|
||||||
document.getElementById("setup_offline").innerHTML = await armcord.getLang("setup_offline");
|
|
||||||
document.getElementById("setup_question1").innerHTML = await armcord.getLang("setup_question1");
|
|
||||||
document.getElementById("express").innerHTML = await armcord.getLang("setup_question1_answer1");
|
|
||||||
document.getElementById("full").innerHTML = await armcord.getLang("setup_question1_answer2");
|
|
||||||
document.getElementById("setup_question2").innerHTML = await armcord.getLang("setup_question2");
|
|
||||||
document.getElementById("setup_question3").innerHTML = await armcord.getLang("setup_question3");
|
|
||||||
document.getElementById("setup_question4").innerHTML = await armcord.getLang("setup_question4");
|
|
||||||
document.getElementById("setup_question4_clientmodnotice").innerHTML = await armcord.getLang(
|
|
||||||
"setup_question4_clientmodnotice"
|
|
||||||
);
|
|
||||||
//select stuff1
|
|
||||||
document.getElementById("csp").options[1].text = await armcord.getLang("no");
|
|
||||||
document.getElementById("csp").options[0].text = await armcord.getLang("yes");
|
|
||||||
}
|
|
||||||
loadLang();
|
|
||||||
</script>
|
|
||||||
<script>
|
<script>
|
||||||
document.onload = function () {
|
document.onload = function () {
|
||||||
ipcRenderer.send("win-unmaximize");
|
ipcRenderer.send("win-unmaximize");
|
||||||
|
@ -123,7 +101,6 @@
|
||||||
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);
|
||||||
|
@ -153,7 +130,6 @@
|
||||||
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"
|
||||||
|
@ -169,7 +145,6 @@
|
||||||
automaticPatches: false,
|
automaticPatches: false,
|
||||||
autoLaunch: true,
|
autoLaunch: true,
|
||||||
mods: "none",
|
mods: "none",
|
||||||
performanceMode: "none",
|
|
||||||
inviteWebsocket: true,
|
inviteWebsocket: true,
|
||||||
blurType: "acrylic"
|
blurType: "acrylic"
|
||||||
});
|
});
|
||||||
|
|
11
src/ipc.ts
11
src/ipc.ts
|
@ -1,7 +1,7 @@
|
||||||
//ipc stuff
|
//ipc stuff
|
||||||
import {app, ipcMain, shell, desktopCapturer} from "electron";
|
import {app, ipcMain, shell, desktopCapturer} from "electron";
|
||||||
import {createTabsGuest, mainWindow} from "./window";
|
import {createTabsGuest, mainWindow} from "./window";
|
||||||
import {setConfigBulk, getVersion, getConfig, setLang, getLang} from "./utils";
|
import {setConfigBulk, getVersion, getConfig} from "./utils";
|
||||||
import {customTitlebar, tabs} from "./main";
|
import {customTitlebar, tabs} from "./main";
|
||||||
import {createSettingsWindow} from "./settings/main";
|
import {createSettingsWindow} from "./settings/main";
|
||||||
export function registerIpc() {
|
export function registerIpc() {
|
||||||
|
@ -11,12 +11,6 @@ export function registerIpc() {
|
||||||
ipcMain.on("openTab", (event, number: number) => {
|
ipcMain.on("openTab", (event, number: number) => {
|
||||||
createTabsGuest(number);
|
createTabsGuest(number);
|
||||||
});
|
});
|
||||||
ipcMain.on("setLang", (event, lang: string) => {
|
|
||||||
setLang(lang);
|
|
||||||
});
|
|
||||||
ipcMain.on("getLang", (event, object: string) => {
|
|
||||||
getLang(object);
|
|
||||||
});
|
|
||||||
ipcMain.on("open-external-link", (event, href: string) => {
|
ipcMain.on("open-external-link", (event, href: string) => {
|
||||||
shell.openExternal(href);
|
shell.openExternal(href);
|
||||||
});
|
});
|
||||||
|
@ -60,9 +54,6 @@ export function registerIpc() {
|
||||||
ipcMain.on("channel", async (event) => {
|
ipcMain.on("channel", async (event) => {
|
||||||
event.returnValue = await getConfig("channel");
|
event.returnValue = await getConfig("channel");
|
||||||
});
|
});
|
||||||
ipcMain.handle("getLang", (event, toGet: string) => {
|
|
||||||
return getLang(toGet);
|
|
||||||
});
|
|
||||||
ipcMain.on("clientmod", async (event, arg) => {
|
ipcMain.on("clientmod", async (event, arg) => {
|
||||||
event.returnValue = await getConfig("mods");
|
event.returnValue = await getConfig("mods");
|
||||||
});
|
});
|
||||||
|
|
|
@ -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, injectElectronFlags} from "./utils";
|
import {getConfig, setup, checkIfConfigExists} from "./utils";
|
||||||
import "./extensions/mods";
|
import "./extensions/mods";
|
||||||
import "./extensions/plugin";
|
import "./extensions/plugin";
|
||||||
import "./tray";
|
import "./tray";
|
||||||
|
@ -12,7 +12,6 @@ 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.");
|
||||||
|
@ -25,7 +24,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":
|
||||||
|
|
|
@ -16,11 +16,6 @@ contextBridge.exposeInMainWorld("armcord", {
|
||||||
electron: process.versions.electron,
|
electron: process.versions.electron,
|
||||||
channel: ipcRenderer.sendSync("channel"),
|
channel: ipcRenderer.sendSync("channel"),
|
||||||
openTab: (number: number) => ipcRenderer.sendSync("openTab", number),
|
openTab: (number: number) => ipcRenderer.sendSync("openTab", number),
|
||||||
setLang: (lang: string) => ipcRenderer.send("setLang", lang),
|
|
||||||
getLang: (toGet: string) =>
|
|
||||||
ipcRenderer.invoke("getLang", toGet).then((result) => {
|
|
||||||
return result;
|
|
||||||
}),
|
|
||||||
version: ipcRenderer.sendSync("get-app-version", "app-version"),
|
version: ipcRenderer.sendSync("get-app-version", "app-version"),
|
||||||
getDisplayMediaSelector: getDisplayMediaSelector,
|
getDisplayMediaSelector: getDisplayMediaSelector,
|
||||||
openSettingsWindow: () => ipcRenderer.send("openSettingsWindow")
|
openSettingsWindow: () => ipcRenderer.send("openSettingsWindow")
|
||||||
|
|
|
@ -4,19 +4,11 @@ import "./patch";
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
import {injectTitlebar} from "./titlebar";
|
import {injectTitlebar} from "./titlebar";
|
||||||
import {sleep, addStyle, injectJS, addScript} from "../utils";
|
import {sleep, addStyle, injectJS} from "../utils";
|
||||||
import {ipcRenderer} from "electron";
|
import {ipcRenderer} from "electron";
|
||||||
import {injectTabs} from "./tabs";
|
import {injectTabs} from "./tabs";
|
||||||
var version = ipcRenderer.sendSync("get-app-version", "app-version");
|
var version = ipcRenderer.sendSync("get-app-version", "app-version");
|
||||||
async function updateLang() {
|
|
||||||
if (window.location.href.indexOf("setup.html") > -1) {
|
|
||||||
console.log("Setup, skipping lang update");
|
|
||||||
} else {
|
|
||||||
addScript(`function getDiscordLang() {
|
|
||||||
{const _w=webpackChunkdiscord_app;let lang;_w.push([[Symbol()],{},e=>{for(const k in e.c){const m=e.c[k].exports;const mDef=m?.default&&m.__esModule?m.default:m;if(mDef?._chosenLocale&&!lang)lang=mDef}}]);_w.pop();window.armcord.setLang(lang._chosenLocale);return lang._chosenLocale;void 0}}
|
|
||||||
getDiscordLang();`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
armcord: any;
|
armcord: any;
|
||||||
|
@ -38,7 +30,7 @@ if (window.location.href.indexOf("splash.html") > -1) {
|
||||||
if (ipcRenderer.sendSync("tabs")) {
|
if (ipcRenderer.sendSync("tabs")) {
|
||||||
injectTabs();
|
injectTabs();
|
||||||
}
|
}
|
||||||
sleep(5000).then(async () => {
|
sleep(5000).then(() => {
|
||||||
const cssPath = path.join(__dirname, "../", "/content/css/discord.css");
|
const cssPath = path.join(__dirname, "../", "/content/css/discord.css");
|
||||||
addStyle(fs.readFileSync(cssPath, "utf8"));
|
addStyle(fs.readFileSync(cssPath, "utf8"));
|
||||||
|
|
||||||
|
@ -46,17 +38,14 @@ if (window.location.href.indexOf("splash.html") > -1) {
|
||||||
case "goosemod":
|
case "goosemod":
|
||||||
injectJS(clientMods.goosemod);
|
injectJS(clientMods.goosemod);
|
||||||
console.log("Loading GooseMod...");
|
console.log("Loading GooseMod...");
|
||||||
await updateLang();
|
|
||||||
break;
|
break;
|
||||||
case "cumcord":
|
case "cumcord":
|
||||||
injectJS(clientMods.cumcord);
|
injectJS(clientMods.cumcord);
|
||||||
console.log("Loading Cumcord...");
|
console.log("Loading Cumcord...");
|
||||||
await updateLang();
|
|
||||||
break;
|
break;
|
||||||
case "flicker":
|
case "flicker":
|
||||||
injectJS(clientMods.flicker);
|
injectJS(clientMods.flicker);
|
||||||
console.log("Loading FlickerMod...");
|
console.log("Loading FlickerMod...");
|
||||||
await updateLang();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {BrowserWindow, shell, ipcMain} from "electron";
|
import {BrowserWindow, shell, ipcMain} from "electron";
|
||||||
import {getConfig, setConfigBulk, Settings, getLang} from "../utils";
|
import {getConfig, setConfigBulk, Settings} from "../utils";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
var settingsWindow: BrowserWindow;
|
var settingsWindow: BrowserWindow;
|
||||||
var instance: number = 0;
|
var instance: number = 0;
|
||||||
|
@ -31,9 +31,6 @@ export function createSettingsWindow() {
|
||||||
ipcMain.handle("getSetting", (event, toGet: string) => {
|
ipcMain.handle("getSetting", (event, toGet: string) => {
|
||||||
return getConfig(toGet);
|
return getConfig(toGet);
|
||||||
});
|
});
|
||||||
ipcMain.handle("getLang", (event, toGet: string) => {
|
|
||||||
return getLang(toGet);
|
|
||||||
});
|
|
||||||
settingsWindow.webContents.setWindowOpenHandler(({url}) => {
|
settingsWindow.webContents.setWindowOpenHandler(({url}) => {
|
||||||
shell.openExternal(url);
|
shell.openExternal(url);
|
||||||
return {action: "deny"};
|
return {action: "deny"};
|
||||||
|
@ -41,7 +38,6 @@ export function createSettingsWindow() {
|
||||||
settingsWindow.loadURL(`file://${__dirname}/settings.html`);
|
settingsWindow.loadURL(`file://${__dirname}/settings.html`);
|
||||||
settingsWindow.on("close", (event: Event) => {
|
settingsWindow.on("close", (event: Event) => {
|
||||||
ipcMain.removeHandler("getSetting");
|
ipcMain.removeHandler("getSetting");
|
||||||
ipcMain.removeHandler("getLang");
|
|
||||||
ipcMain.removeAllListeners("saveSettings");
|
ipcMain.removeAllListeners("saveSettings");
|
||||||
instance = 0;
|
instance = 0;
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,10 +2,6 @@ import {contextBridge, ipcRenderer} from "electron";
|
||||||
console.log("ArmCord Settings");
|
console.log("ArmCord Settings");
|
||||||
contextBridge.exposeInMainWorld("settings", {
|
contextBridge.exposeInMainWorld("settings", {
|
||||||
save: (...args: any) => ipcRenderer.send("saveSettings", ...args),
|
save: (...args: any) => ipcRenderer.send("saveSettings", ...args),
|
||||||
getLang: (toGet: string) =>
|
|
||||||
ipcRenderer.invoke("getLang", toGet).then((result) => {
|
|
||||||
return result;
|
|
||||||
}),
|
|
||||||
get: (toGet: string) =>
|
get: (toGet: string) =>
|
||||||
ipcRenderer.invoke("getSetting", toGet).then((result) => {
|
ipcRenderer.invoke("getSetting", toGet).then((result) => {
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<option value="default">Default</option>
|
<option value="default">Default</option>
|
||||||
<option value="native">Native</option>
|
<option value="native">Native</option>
|
||||||
</select>
|
</select>
|
||||||
<p class="header" id="settings-theme">ArmCord theme:</p>
|
<p class="header">ArmCord theme:</p>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="switch">
|
<div class="switch">
|
||||||
|
@ -24,19 +24,19 @@
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="switch">
|
<div class="switch">
|
||||||
<label class="header" id="settings-tray">Minimize to tray</label>
|
<label class="header">Minimize to tray</label>
|
||||||
<input class="tgl tgl-light left" id="tray" type="checkbox" />
|
<input class="tgl tgl-light left" id="tray" type="checkbox" />
|
||||||
<label class="tgl-btn left" for="tray"></label>
|
<label class="tgl-btn left" for="tray"></label>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="switch">
|
<div class="switch">
|
||||||
<label class="header" id="settings-patches">Automatic Patches</label>
|
<label class="header">Automatic Patches</label>
|
||||||
<input class="tgl tgl-light left" id="patches" type="checkbox" />
|
<input class="tgl tgl-light left" id="patches" type="checkbox" />
|
||||||
<label class="tgl-btn left" for="patches"></label>
|
<label class="tgl-btn left" for="patches"></label>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="switch">
|
<div class="switch">
|
||||||
<label class="header" id="settings-invitewebsocket">Invite Websocket</label>
|
<label class="header">Invite Websocket</label>
|
||||||
<input class="tgl tgl-light left" id="websocket" type="checkbox" />
|
<input class="tgl tgl-light left" id="websocket" type="checkbox" />
|
||||||
<label class="tgl-btn left" for="websocket"></label>
|
<label class="tgl-btn left" for="websocket"></label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
<option value="ptb">PTB</option>
|
<option value="ptb">PTB</option>
|
||||||
<option value="foss">Fosscord</option>
|
<option value="foss">Fosscord</option>
|
||||||
</select>
|
</select>
|
||||||
<p class="header" id="settings-channel">Discord channel:</p>
|
<p class="header">Discord channel:</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="switch">
|
<div class="switch">
|
||||||
<select name="mod" id="mod" class="left">
|
<select name="mod" id="mod" class="left">
|
||||||
|
@ -56,41 +56,12 @@
|
||||||
<option value="flicker">Flicker</option>
|
<option value="flicker">Flicker</option>
|
||||||
<option value="none">None</option>
|
<option value="none">None</option>
|
||||||
</select>
|
</select>
|
||||||
<p class="header" id="settings-mod">Client mod:</p>
|
<p class="header">Client mod:</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="switch">
|
|
||||||
<select name="prfmMode" id="prfmMode" class="left">
|
<button id="save" class="center">Save settings</button>
|
||||||
<option value="performance">Performance</option>
|
|
||||||
<option value="battery">Battery</option>
|
|
||||||
<option value="none">None</option>
|
|
||||||
</select>
|
|
||||||
<p class="header" id="settings-prfmMode">Performance mode:</p>
|
|
||||||
</div>
|
|
||||||
<button id="settings-save" class="center">Save settings</button>
|
|
||||||
</body>
|
</body>
|
||||||
<script>
|
|
||||||
async function loadLang() {
|
|
||||||
document.getElementById("settings-save").innerHTML = await settings.getLang("settings-save");
|
|
||||||
document.getElementById("settings-mod").innerHTML = await settings.getLang("settings-mod");
|
|
||||||
document.getElementById("settings-channel").innerHTML = await settings.getLang("settings-channel");
|
|
||||||
document.getElementById("settings-invitewebsocket").innerHTML = await settings.getLang(
|
|
||||||
"settings-invitewebsocket"
|
|
||||||
);
|
|
||||||
document.getElementById("settings-patches").innerHTML = await settings.getLang("settings-patches");
|
|
||||||
document.getElementById("settings-tray").innerHTML = await settings.getLang("settings-tray");
|
|
||||||
document.getElementById("settings-theme").innerHTML = await settings.getLang("settings-theme");
|
|
||||||
//select stuff
|
|
||||||
document.getElementById("mod").options[3].text = await settings.getLang("settings-none");
|
|
||||||
document.getElementById("prfmMode").options[2].text = await settings.getLang("settings-none");
|
|
||||||
document.getElementById("prfmMode").options[1].text = await settings.getLang("settings-prfmMode-battery");
|
|
||||||
document.getElementById("prfmMode").options[0].text = await settings.getLang(
|
|
||||||
"settings-prfmMode-performance"
|
|
||||||
);
|
|
||||||
document.getElementById("theme").options[1].text = await settings.getLang("settings-theme-native");
|
|
||||||
document.getElementById("theme").options[0].text = await settings.getLang("settings-theme-default");
|
|
||||||
}
|
|
||||||
loadLang();
|
|
||||||
</script>
|
|
||||||
<script>
|
<script>
|
||||||
async function loadSettings() {
|
async function loadSettings() {
|
||||||
document.getElementById("csp").checked = await settings.get("armcordCSP");
|
document.getElementById("csp").checked = await settings.get("armcordCSP");
|
||||||
|
@ -100,10 +71,9 @@
|
||||||
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("prfmMode").value = await settings.get("performanceMode");
|
|
||||||
}
|
}
|
||||||
loadSettings();
|
loadSettings();
|
||||||
document.getElementById("settings-save").addEventListener("click", function () {
|
document.getElementById("save").addEventListener("click", function () {
|
||||||
//function saveSettings(windowStyle: string, channelSetting: string, armcordCSPSetting: boolean, minimizeToTray: boolean, automaticPatches: boolean,modsSetting: string, blurType: string)
|
//function saveSettings(windowStyle: string, channelSetting: string, armcordCSPSetting: boolean, minimizeToTray: boolean, automaticPatches: boolean,modsSetting: string, blurType: string)
|
||||||
settings.save({
|
settings.save({
|
||||||
windowStyle: document.getElementById("theme").value,
|
windowStyle: document.getElementById("theme").value,
|
||||||
|
@ -114,7 +84,6 @@
|
||||||
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
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
75
src/utils.ts
75
src/utils.ts
|
@ -1,7 +1,6 @@
|
||||||
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;
|
||||||
|
@ -43,7 +42,6 @@ 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
|
||||||
};
|
};
|
||||||
|
@ -65,79 +63,7 @@ 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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export async function setLang(language: string) {
|
|
||||||
const userDataPath = app.getPath("userData");
|
|
||||||
const storagePath = path.join(userDataPath, "/storage/");
|
|
||||||
const langConfigFile = storagePath + "lang.json";
|
|
||||||
if (!fs.existsSync(langConfigFile)) {
|
|
||||||
fs.writeFileSync(langConfigFile, "{}", "utf-8");
|
|
||||||
}
|
|
||||||
let rawdata = fs.readFileSync(langConfigFile, "utf-8");
|
|
||||||
let parsed = JSON.parse(rawdata);
|
|
||||||
parsed["lang"] = language;
|
|
||||||
let toSave = JSON.stringify(parsed);
|
|
||||||
fs.writeFileSync(langConfigFile, toSave, "utf-8");
|
|
||||||
}
|
|
||||||
var language: string;
|
|
||||||
export async function getLang(object: string) {
|
|
||||||
if (language == undefined) {
|
|
||||||
const userDataPath = app.getPath("userData");
|
|
||||||
const storagePath = path.join(userDataPath, "/storage/");
|
|
||||||
const langConfigFile = storagePath + "lang.json";
|
|
||||||
let rawdata = fs.readFileSync(langConfigFile, "utf-8");
|
|
||||||
let parsed = JSON.parse(rawdata);
|
|
||||||
language = parsed["lang"];
|
|
||||||
}
|
|
||||||
if (language.length == 2) {
|
|
||||||
language = language + "-" + language.toUpperCase();
|
|
||||||
}
|
|
||||||
var langPath = path.join(__dirname, "../", "/assets/lang/" + language + ".json");
|
|
||||||
if (!fs.existsSync(langPath)) {
|
|
||||||
langPath = path.join(__dirname, "../", "/assets/lang/en-US.json");
|
|
||||||
}
|
|
||||||
let rawdata = fs.readFileSync(langPath, "utf-8");
|
|
||||||
let parsed = JSON.parse(rawdata);
|
|
||||||
return parsed[object];
|
|
||||||
}
|
|
||||||
//ArmCord Settings/Storage manager
|
//ArmCord Settings/Storage manager
|
||||||
|
|
||||||
export interface Settings {
|
export interface Settings {
|
||||||
|
@ -147,7 +73,6 @@ 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;
|
||||||
|
|
|
@ -4,10 +4,9 @@
|
||||||
// I'm sorry for this mess but I'm not sure how to fix it.
|
// I'm sorry for this mess but I'm not sure how to fix it.
|
||||||
import {BrowserWindow, shell, app, ipcMain, dialog, clipboard} from "electron";
|
import {BrowserWindow, shell, app, ipcMain, dialog, clipboard} from "electron";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import {checkIfConfigIsBroken, firstRun, getConfig, contentPath, isSetup, setConfig, setLang} from "./utils";
|
import {checkIfConfigIsBroken, firstRun, getConfig, contentPath, isSetup, setConfig} from "./utils";
|
||||||
import {registerIpc} from "./ipc";
|
import {registerIpc} from "./ipc";
|
||||||
import startServer from "./socket";
|
import startServer from "./socket";
|
||||||
import {osLocale} from 'os-locale';
|
|
||||||
import contextMenu from "electron-context-menu";
|
import contextMenu from "electron-context-menu";
|
||||||
import os from "os";
|
import os from "os";
|
||||||
export var icon: string;
|
export var icon: string;
|
||||||
|
@ -86,10 +85,10 @@ async function doAfterDefiningTheWindow() {
|
||||||
if ((await getConfig("inviteWebsocket")) == true) {
|
if ((await getConfig("inviteWebsocket")) == true) {
|
||||||
startServer();
|
startServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mainWindow.loadFile(contentPath);
|
mainWindow.loadFile(contentPath);
|
||||||
if (isSetup) {
|
if (isSetup) {
|
||||||
await setLang(Intl.DateTimeFormat().resolvedOptions().locale)
|
|
||||||
mainWindow.setSize(390, 470);
|
mainWindow.setSize(390, 470);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -99,7 +98,6 @@ async function doAfterDefiningTheWindow() {
|
||||||
console.log(process.platform);
|
console.log(process.platform);
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
if (firstRun) {
|
if (firstRun) {
|
||||||
// await setLang(Intl.DateTimeFormat().resolvedOptions().locale)
|
|
||||||
mainWindow.setSize(390, 470);
|
mainWindow.setSize(390, 470);
|
||||||
mainWindow.loadURL(`file://${__dirname}/content/setup.html`);
|
mainWindow.loadURL(`file://${__dirname}/content/setup.html`);
|
||||||
} else {
|
} else {
|
||||||
|
@ -107,7 +105,6 @@ async function doAfterDefiningTheWindow() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (firstRun) {
|
if (firstRun) {
|
||||||
await setLang(Intl.DateTimeFormat().resolvedOptions().locale)
|
|
||||||
mainWindow.setSize(390, 470);
|
mainWindow.setSize(390, 470);
|
||||||
mainWindow.loadURL(`file://${__dirname}/ts-out/content/setup.html`);
|
mainWindow.loadURL(`file://${__dirname}/ts-out/content/setup.html`);
|
||||||
} else {
|
} else {
|
||||||
|
@ -122,7 +119,7 @@ export function createCustomWindow() {
|
||||||
height: 350,
|
height: 350,
|
||||||
title: "ArmCord",
|
title: "ArmCord",
|
||||||
darkTheme: true,
|
darkTheme: true,
|
||||||
icon: path.join(__dirname, "../", "/assets/ac_icon_transparent.png"),
|
icon: path.join(__dirname, "/assets/icon_transparent.png"),
|
||||||
frame: false,
|
frame: false,
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
@ -138,7 +135,7 @@ export function createNativeWindow() {
|
||||||
height: 350,
|
height: 350,
|
||||||
title: "ArmCord",
|
title: "ArmCord",
|
||||||
darkTheme: true,
|
darkTheme: true,
|
||||||
icon: path.join(__dirname, "../", "/assets/ac_icon_transparent.png"),
|
icon: path.join(__dirname, "/assets/icon_transparent.png"),
|
||||||
frame: true,
|
frame: true,
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
@ -160,7 +157,7 @@ export function createTabsHost() {
|
||||||
height: 350,
|
height: 350,
|
||||||
title: "ArmCord",
|
title: "ArmCord",
|
||||||
darkTheme: true,
|
darkTheme: true,
|
||||||
icon: path.join(__dirname, "../", "/assets/ac_icon_transparent.png"),
|
icon: path.join(__dirname, "/assets/icon_transparent.png"),
|
||||||
frame: true,
|
frame: true,
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
@ -189,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/ac_icon_transparent.png"),
|
icon: path.join(__dirname, "/assets/icon_transparent.png"),
|
||||||
frame: true,
|
frame: true,
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
@ -226,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/ac_icon_transparent.png"),
|
icon: path.join(__dirname, "/assets/icon_transparent.png"),
|
||||||
frame: true,
|
frame: true,
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue