From 1ead7d6638ab06c1f2a39cf5795fd18e6a504205 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Jul 2022 18:54:47 +0000 Subject: [PATCH 01/13] Update ws requirement from ^8.8.0 to ^8.8.1 Updates the requirements on [ws](https://github.com/websockets/ws) to permit the latest version. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/8.8.0...8.8.1) --- updated-dependencies: - dependency-name: ws dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9d64bfe..512a130 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "electron-context-menu": "github:ArmCord/electron-context-menu", "os-locale": "^6.0.2", "v8-compile-cache": "^2.3.0", - "ws": "^8.8.0" + "ws": "^8.8.1" }, "build": { "nsis": { From e71376237e7327dfd17bb8125c54941b5dd99f34 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Mon, 18 Jul 2022 21:22:04 +0200 Subject: [PATCH 02/13] Update English translation --- assets/lang/en-US.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/lang/en-US.json b/assets/lang/en-US.json index 05132cc..7dc1551 100644 --- a/assets/lang/en-US.json +++ b/assets/lang/en-US.json @@ -31,7 +31,7 @@ "settings-channel-desc2": "you're probably most familiar with this one. It's the one you see in default Discord\n client!", "settings-channel-desc3": "this is alpha test release of Discord. By using it you gain access to the newest\n features and fixes.", "settings-channel-desc4": "public test build. Receives features earlier than stable but is a bit older than Canary.", - "settings-channel-desc5": "unofficial instance of Discord that takes you back to 2016! None of the client mods\n bundled with ArmCord work with it. It's run by community, so you take all the risk by using it.", + "settings-channel-desc5": "unofficial instance of Discord that takes you back to 2016! Only client mod\n available to run alongside with it is Cordwood. It's run by community, so you take all the risk by\n using it.", "settings-invitewebsocket": "Invite Websocket", "settings-invitewebsocket-desc": "When enabled ArmCord will support Discord.gg links which means that if you open an invite link in your\n browser, ArmCord will automatically accept the invite. Can be unresponsive at times.", "settings-altPaste": "Alternative Paste", From bace17dca6c71e1d907e55c91b994088fc5048ce Mon Sep 17 00:00:00 2001 From: altinat Date: Mon, 18 Jul 2022 06:22:24 +0000 Subject: [PATCH 03/13] Translated using Weblate (Thai) Currently translated at 57.4% (31 of 54 strings) Translation: ArmCord/ArmCord Translate-URL: https://hosted.weblate.org/projects/armcord/armcord/th/ --- assets/lang/th-TH.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/lang/th-TH.json b/assets/lang/th-TH.json index 116c768..73455c6 100644 --- a/assets/lang/th-TH.json +++ b/assets/lang/th-TH.json @@ -14,7 +14,7 @@ "setup_question4": "เลือกไคลเอนต์มอดที่ต้องการติดตั้ง:", "settings-prfmMode-battery": "ประหยัดแบตเตอรี่", "setup_question4_clientmodnotice": "ทำไมไม่ใช้พร้อมกันทั้งหมดล่ะ? การมีไคลเอนต์มอดหลายตัวพร้อมกันอาจทำให้เกิดปัญหาได้ หากต้องการที่จะทำจริงๆ ให้ไปดูใน Discord ของเรา", - "settings-theme": "ธีม ArmCord:", + "settings-theme": "ธีม ArmCord", "settings-theme-default": "ค่าเริ่มต้น", "settings-theme-native": "ดั้งเดิม", "settings-tray": "ย่อขนาดหน้าต่าง", @@ -28,17 +28,17 @@ "settings-save": "บันทึกการตั้งค่า", "settings-updater": "ตรวจหาการอัปเดต", "settings-mobileMode": "โหมดมือถือ", - "settings-theme-desc1": "ArmCord \"themes\" manage apps behaviour and looks.", + "settings-theme-desc1": "\"ธีม\" ของ ArmCord เป็นการจัดการลักษณะและการทำงานของแอป", "settings-patches-desk": "Fetches automatic patches that are distributed if release turns out to have bugs after release. Usually\n you don't have to keep this enabled, unless notified in support Discord.", "settings-mobileMode-desc": "If you're on a device with touch-screen this feature is for you! It activates Discord's hidden mobile\n mode meant for phones and tablets. Only major feature missing is voice chat support. This is ideal for\n users on PinePhone and similar.", "settings-channel-desc1": "You can use this setting to change current instance of Discord:", "settings-channel-desc2": "you're probably most familiar with this one. It's the one you see in default Discord\n client!", "settings-altPaste": "Alternative Paste", "settings-trayIcon": "Tray icon", - "settings-theme-desc2": "this is how ArmCord looks when you first launch it. It includes recreation of Discord's\n custom titlebar and ArmCord specific styles injected into Discord.", - "settings-theme-desc3": "uses native titlebar of OS you're currently running (e.g Windows 7/10). Functions more\n similar to actual Discord app on Linux.", - "settings-csp-desc": "ArmCord CSP is our system that manages loading custom content loading into the Discord app. Stuff like\n client mods and themes depend on it. Disable if you want to get rid of mods and custom styles.", - "settings-tray-desc": "When disabled, ArmCord will close like any other window when closed, otherwise it'll sit back and relax\n in your system tray for later.", + "settings-theme-desc2": "นี่คือหน้าตา ArmCord ตอนที่เปิดครั้งแรก เป็นการปรับปรุงจากหน้าตาเดิมของ Discord\n แถบชื่อหน้าต่างและหน้าตาใหม่ ๆ ที่ ArmCord เปลี่ยน Discord", + "settings-theme-desc3": "ใช้แถบชื่อหน้าต่างเริ่มต้นของระบบปฏิบัติการที่กำลังใช้อยู่ (เช่น Windows 7/10) ตัวเลือกคล้ายกันกับ\n แอป Discord ใน Linux", + "settings-csp-desc": "ArmCord CSP คือระบบที่จัดการการโหลดเนื้อหากำหนดเองลงไปในแอป Discord สิ่งอย่างเช่น สิ่งอย่างเช่น\n ไคลแอนต์มอด ธีม ต้องใช้มัน สามารถปิดใช้งานได้หากต้องการปิดมอดและหน้าตากำหนดเอง", + "settings-tray-desc": "เมื่อปิด ArmCord จะปิดเหมือนหน้าตาอื่น ๆ เมื่อปิด ไม่อย่างนั้นมันจะนั่งนิ่ง\n ในถาดระบบภายหลัง", "settings-channel-desc3": "this is alpha test release of Discord. By using it you gain access to the newest\n features and fixes.", "settings-channel-desc4": "public test build. Receives features earlier than stable but is a bit older than Canary.", "settings-channel-desc5": "unofficial instance of Discord that takes you back to 2016! None of the client mods\n bundled with ArmCord work with it. It's run by community, so you take all the risk by using it.", From ab9ab6304f4b8c087dfcebdeda2b94023050f740 Mon Sep 17 00:00:00 2001 From: Zekiu_ Date: Thu, 21 Jul 2022 11:39:45 +0000 Subject: [PATCH 04/13] Translated using Weblate (Polish) Currently translated at 66.6% (36 of 54 strings) Translation: ArmCord/ArmCord Translate-URL: https://hosted.weblate.org/projects/armcord/armcord/pl/ --- assets/lang/pl-PL.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/lang/pl-PL.json b/assets/lang/pl-PL.json index 2e3ac35..cc4f429 100644 --- a/assets/lang/pl-PL.json +++ b/assets/lang/pl-PL.json @@ -12,7 +12,7 @@ "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": "Wybierz w jaki sposób chcesz skonfigurować ArmCord:", - "setup_offline": "Wydaje nam się że nie jesteś połączony z internetem. Połącz się z internetem i uruchom ponownie konfiguracje ArmCord .", + "setup_offline": "Wydaje nam się, że nie jesteś połączony z internetem. Połącz się z internetem i uruchom ponownie konfiguracje ArmCord.", "settings-channel": "Kanał Discorda", "settings-updater": "Sprawdź aktualizacje", "settings-tray": "Zminimalizuj do zasobnika zadań", From 6138281e4c3d58564935efe61604f45699b7cc03 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Mon, 25 Jul 2022 10:36:53 +0200 Subject: [PATCH 05/13] Move Licensing header under imports --- src/socket.ts | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/src/socket.ts b/src/socket.ts index 2b63d56..4b6565b 100644 --- a/src/socket.ts +++ b/src/socket.ts @@ -1,27 +1,28 @@ -// MIT License - -// Copyright (c) 2020-2022 Dawid Papiewski "SpacingBat3" - -// 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. import type {Server, WebSocket} from "ws"; import {inviteWindow, createInviteWindow} from "./window"; +/* + MIT License + Copyright (c) 2020-2022 Dawid Papiewski "SpacingBat3" + + 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. + */ async function wsLog(message: string, ...args: unknown[]) { console.log("[WebSocket] " + message, ...args); } From 0784b8ce7931fe3e54eea45848c42c6bf069ea67 Mon Sep 17 00:00:00 2001 From: sjk Date: Fri, 29 Jul 2022 01:43:18 +0200 Subject: [PATCH 06/13] Added translation using Weblate (Japanese) --- assets/lang/ja-JP.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 assets/lang/ja-JP.json diff --git a/assets/lang/ja-JP.json b/assets/lang/ja-JP.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/assets/lang/ja-JP.json @@ -0,0 +1 @@ +{} From dcfa4a6e14b8d547707c53badf7d5401e021dfc9 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Thu, 28 Jul 2022 23:43:20 +0000 Subject: [PATCH 07/13] Translated using Weblate (Japanese) Currently translated at 100.0% (0 of 0 strings) Translation: ArmCord/ArmCord Translate-URL: https://hosted.weblate.org/projects/armcord/armcord/ja/ --- assets/lang/ja-JP.json | 57 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/assets/lang/ja-JP.json b/assets/lang/ja-JP.json index 0967ef4..24349f5 100644 --- a/assets/lang/ja-JP.json +++ b/assets/lang/ja-JP.json @@ -1 +1,56 @@ -{} +{ + "setup_question1_answer2": "Full Setup", + "yes": "Yes", + "settings-theme-default": "Default", + "settings-invitewebsocket": "Invite Websocket", + "settings-mod-desc4": "heavily work in progress, doesn't have a working UI.", + "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_offline": "You appear to be offline. Please connect to the internet and restart ArmCord.", + "setup_question2": "Choose your Discord channel/instance:", + "setup_question3": "Should ArmCord handle client mods installation?", + "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", + "settings-theme-desc1": "ArmCord \"themes\" manage apps behaviour and looks.", + "settings-theme-desc2": "this is how ArmCord looks when you first launch it. It includes recreation of Discord's\n custom titlebar and ArmCord specific styles injected into Discord.", + "settings-theme-desc3": "uses native titlebar of OS you're currently running (e.g Windows 7/10). Functions more\n similar to actual Discord app on Linux.", + "settings-theme-native": "Native", + "settings-csp-desc": "ArmCord CSP is our system that manages loading custom content loading into the Discord app. Stuff like\n client mods and themes depend on it. Disable if you want to get rid of mods and custom styles.", + "settings-tray": "Minimize to tray", + "settings-tray-desc": "When disabled, ArmCord will close like any other window when closed, otherwise it'll sit back and relax\n in your system tray for later.", + "settings-patches": "Automatic Patches", + "settings-patches-desk": "Fetches automatic patches that are distributed if release turns out to have bugs after release. Usually\n you don't have to keep this enabled, unless notified in support Discord.", + "settings-mobileMode": "Mobile mode", + "settings-mobileMode-desc": "If you're on a device with touch-screen this feature is for you! It activates Discord's hidden mobile\n mode meant for phones and tablets. Only major feature missing is voice chat support. This is ideal for\n users on PinePhone and similar.", + "settings-channel": "Discord channel", + "settings-channel-desc1": "You can use this setting to change current instance of Discord:", + "settings-channel-desc2": "you're probably most familiar with this one. It's the one you see in default Discord\n client!", + "settings-channel-desc3": "this is alpha test release of Discord. By using it you gain access to the newest\n features and fixes.", + "settings-channel-desc4": "public test build. Receives features earlier than stable but is a bit older than Canary.", + "settings-channel-desc5": "unofficial instance of Discord that takes you back to 2016! Only client mod\n available to run alongside with it is Cordwood. It's run by community, so you take all the risk by\n using it.", + "settings-invitewebsocket-desc": "When enabled ArmCord will support Discord.gg links which means that if you open an invite link in your\n browser, ArmCord will automatically accept the invite. Can be unresponsive at times.", + "settings-altPaste": "Alternative Paste", + "settings-altPaste-desc": "If you're on Gnome on Linux or just simply can't paste images copied from other messages, then this is\n for you. This enables alternative module for pasting images. Only enable this when you're experiencing\n issues.", + "settings-mod": "Client mod", + "settings-mod-desc1": "Client mods are programs that allow you customize your Discord experience. They can change appearance of\n the client, modify behaviours or add new features!", + "settings-mod-desc2": "focuses on making the Discord plugin development experience easier. Minimal and\n lightweight.", + "settings-mod-desc3": "light, secure, and easy to use, with out of the box experience. Features a built-in\n store for plugins.", + "settings-prfmMode": "Performance mode is an experimental function that may either increase responsiveness and performance of\n ArmCord or... decrease it. Please try every option and see which fits you the best.", + "settings-prfmMode-performance": "Performance", + "settings-prfmMode-battery": "Battery", + "settings-trayIcon": "Tray icon", + "settings-trayIcon-desc": "Set the icon which will appear in tray menu.", + "settings-advanced": "️Advanced user zone", + "settings-pluginsFolder": "Open plugins folder", + "settings-themesFolder": "Open themes folder", + "settings-storageFolder": "Open storage folder", + "settings-none": "None", + "settings-save": "Save Settings", + "settings-updater": "Check for updates" +} From 95a26bfe849767172ce772596b57d6d8083879f0 Mon Sep 17 00:00:00 2001 From: kris Date: Thu, 11 Aug 2022 18:57:26 +0000 Subject: [PATCH 08/13] Translated using Weblate (French) Currently translated at 44.4% (24 of 54 strings) Translation: ArmCord/ArmCord Translate-URL: https://hosted.weblate.org/projects/armcord/armcord/fr/ --- assets/lang/fr-FR.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/lang/fr-FR.json b/assets/lang/fr-FR.json index d25cd4b..e69fa8d 100644 --- a/assets/lang/fr-FR.json +++ b/assets/lang/fr-FR.json @@ -2,8 +2,8 @@ "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.", "setup_question1": "Sélectionnez le type de configuration que vous souhaitez effectuer :", - "setup_question1_answer1": "Configuration express", - "setup_question1_answer2": "Configuration complète", + "setup_question1_answer1": "Configuration Express", + "setup_question1_answer2": "Configuration Complète", "setup_question2": "Choisissez votre canal/instance Discord :", "setup_question3": "ArmCord doit-il s'occuper de l'installation des mods clients ?", "yes": "Oui", @@ -18,7 +18,7 @@ "settings-mod": "Modification client :", "settings-save": "Sauvegarder les paramètres", "settings-updater": "Vérifier les mises à jour", - "settings-theme": "Thème ArmCord :", + "settings-theme": "Thème ArmCord", "settings-theme-default": "Default", "settings-theme-native": "Native", "settings-patches": "Correctifs automatiques", @@ -28,7 +28,7 @@ "settings-prfmMode-battery": "Batterie", "settings-none": "Aucun", "settings-mobileMode": "Mobile mode", - "settings-theme-desc1": "ArmCord \"themes\" manage apps behaviour and looks.", + "settings-theme-desc1": "Les \"thèmes\" d'ArmCord gèrent le comportement et l'apparence des applications.", "settings-channel-desc4": "public test build. Receives features earlier than stable but is a bit older than Canary.", "settings-altPaste": "Alternative Paste", "settings-storageFolder": "Open storage folder", From 42322b40e3878cb2fa530ae2f75c36fead16e820 Mon Sep 17 00:00:00 2001 From: nero Date: Sun, 14 Aug 2022 17:23:30 +0000 Subject: [PATCH 09/13] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (54 of 54 strings) Translation: ArmCord/ArmCord Translate-URL: https://hosted.weblate.org/projects/armcord/armcord/pt_BR/ --- assets/lang/pt-BR.json | 88 +++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/assets/lang/pt-BR.json b/assets/lang/pt-BR.json index 11af5de..9e7d492 100644 --- a/assets/lang/pt-BR.json +++ b/assets/lang/pt-BR.json @@ -1,56 +1,56 @@ { "no": "Não", "loading_screen_start": "Iniciando ArmCord…", - "loading_screen_offline": "Você parece estar offline. Conecte-se à internet e tente novamente.", - "loading_screen_update": "Uma nova versão do ArmCord está disponível. Atualize para a versão mais recente.", - "setup_question1": "Selecione que tipo de instação você quer fazer:", + "loading_screen_offline": "Você parece estar offline. Por favor, conecte-se à internet e tente novamente.", + "loading_screen_update": "Uma nova versão do ArmCord está disponível. Por favor, atualize para a versão mais recente.", + "setup_question1": "Selecione que tipo de instação você deseja fazer:", "setup_question1_answer1": "Instalação rápida", "setup_question1_answer2": "Instalação completa", - "setup_offline": "Você parece estar offline. Conecte-se à internet e tente novamente.", - "setup_question2": "Escolha o canal/instância do seu Discord", - "setup_question3": "O ArmCord deve suportar a instalação dos mods de cliente?", + "setup_offline": "Você parece estar offline. Por favor, conecte-se à internet e tente novamente.", + "setup_question2": "Escolha o canal/instância do seu Discord:", + "setup_question3": "O ArmCord deve lidar com a instalação de mods do cliente?", "yes": "Sim", "next": "Próximo", - "setup_question4": "Selecione um mod de cliente que você quer instalar:", - "setup_question4_clientmodnotice": "Por que não todos eles? Tendo vários mods de cliente ao mesmo tempo pode causar problemas, Se você realmente quer fazer isso mesmo assim, veja o nosso Discord.", - "settings-theme": "Tema do ArmCord:", + "setup_question4": "Selecione um mod de cliente que você deseja instalar:", + "setup_question4_clientmodnotice": "Por que não todos eles? Ter muitos mods de cliente ao mesmo tempo pode causar problemas. Se você realmente quiser fazer isso, verifique nosso Discord.", + "settings-theme": "Tema do ArmCord", "settings-theme-default": "Padrão", "settings-theme-native": "Nativo", "settings-tray": "Minimizar para a bandeja", "settings-patches": "Patches automáticos", - "settings-channel": "Tipo de Discord:", - "settings-invitewebsocket": "Invite Websocket", - "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", - "settings-mobileMode": "Mobile mode", - "settings-channel-desc1": "You can use this setting to change current instance of Discord:", - "settings-theme-desc1": "ArmCord \"themes\" manage apps behaviour and looks.", - "settings-theme-desc2": "this is how ArmCord looks when you first launch it. It includes recreation of Discord's\n custom titlebar and ArmCord specific styles injected into Discord.", - "settings-theme-desc3": "uses native titlebar of OS you're currently running (e.g Windows 7/10). Functions more\n similar to actual Discord app on Linux.", - "settings-csp-desc": "ArmCord CSP is our system that manages loading custom content loading into the Discord app. Stuff like\n client mods and themes depend on it. Disable if you want to get rid of mods and custom styles.", - "settings-patches-desk": "Fetches automatic patches that are distributed if release turns out to have bugs after release. Usually\n you don't have to keep this enabled, unless notified in support Discord.", - "settings-mobileMode-desc": "If you're on a device with touch-screen this feature is for you! It activates Discord's hidden mobile\n mode meant for phones and tablets. Only major feature missing is voice chat support. This is ideal for\n users on PinePhone and similar.", - "settings-tray-desc": "When disabled, ArmCord will close like any other window when closed, otherwise it'll sit back and relax\n in your system tray for later.", - "settings-channel-desc2": "you're probably most familiar with this one. It's the one you see in default Discord\n client!", - "settings-channel-desc3": "this is alpha test release of Discord. By using it you gain access to the newest\n features and fixes.", - "settings-invitewebsocket-desc": "When enabled ArmCord will support Discord.gg links which means that if you open an invite link in your\n browser, ArmCord will automatically accept the invite. Can be unresponsive at times.", - "settings-channel-desc4": "public test build. Receives features earlier than stable but is a bit older than Canary.", - "settings-altPaste": "Alternative Paste", - "settings-altPaste-desc": "If you're on Gnome on Linux or just simply can't paste images copied from other messages, then this is\n for you. This enables alternative module for pasting images. Only enable this when you're experiencing\n issues.", - "settings-channel-desc5": "unofficial instance of Discord that takes you back to 2016! None of the client mods\n bundled with ArmCord work with it. It's run by community, so you take all the risk by using it.", - "settings-mod-desc1": "Client mods are programs that allow you customize your Discord experience. They can change appearance of\n the client, modify behaviours or add new features!", - "settings-mod-desc2": "focuses on making the Discord plugin development experience easier. Minimal and\n lightweight.", - "settings-mod-desc3": "light, secure, and easy to use, with out of the box experience. Features a built-in\n store for plugins.", - "settings-mod-desc4": "heavily work in progress, doesn't have a working UI.", - "settings-trayIcon": "Tray icon", - "settings-trayIcon-desc": "Set the icon which will appear in tray menu.", - "settings-advanced": "️Advanced user zone", - "settings-pluginsFolder": "Open plugins folder", - "settings-themesFolder": "Open themes folder", - "settings-storageFolder": "Open storage folder" + "settings-channel": "Canal do Discord", + "settings-invitewebsocket": "Convite por WebSocket", + "settings-mod": "Modificação de cliente", + "settings-prfmMode": "O modo de desempenho é uma função experimental que pode aumentar a capacidade de resposta e o desempenho\n do ArmCord, ou... diminuí-lo. Por favor, teste todas as opções e veja qual se adapta melhor a você.", + "settings-prfmMode-performance": "Desempenho", + "settings-prfmMode-battery": "Bateria", + "settings-none": "Nenhum", + "settings-save": "Salvar configurações", + "settings-updater": "Verificar atualizações", + "settings-mobileMode": "Modo móvel", + "settings-channel-desc1": "Você pode usar esta opção para alterar a atual instância do Discord:", + "settings-theme-desc1": "Os \"temas\" do ArmCord gerenciam o comportamento e a aparência de aplicativos.", + "settings-theme-desc2": "esta é a aparência do ArmCord quando você o inicia pela primeira vez. Inclui uma recriação\n personalizada da barra de título do Discord e estilos específicos do ArmCord injetados nele.", + "settings-theme-desc3": "utiliza a barra de título nativa do SO que você está executando no momento (no Windows 7/10). Funções mais\n parecidas com o real aplicativo do Discord no Linux.", + "settings-csp-desc": "ArmCord CSP é o nosso sistema que gerencia o carregamento de conteúdo personalizado no aplicativo do Discord. Coisas como\n mods de cliente e temas dependem disso. Desative se você quiser se livrar de mods e estilos personalizados.", + "settings-patches-desk": "Busca patches automáticos que são distribuídos se a versão mais recente apresentar bugs após o lançamento. Normalmente\n você não precisa manter isso ativado, a menos que seja notificado no suporte do Discord.", + "settings-mobileMode-desc": "Se estiver em um dispositivo com tela sensível ao toque, este recurso é para você! Ele ativa o modo móvel oculto do Discord\n destinado a celulares e tablets. A única característica importante ausente é o suporte ao bate-papo por voz. Isso é ideal para\n usuários do PinePhone e similares.", + "settings-tray-desc": "Quando desativado, o ArmCord irá encerrar como qualquer outra janela quando for fechado, caso contrário, permanecerá\n em repouso na bandeja do seu sistema para mais tarde.", + "settings-channel-desc2": "você provavelmente está mais familiarizado com este. É o que você vê no cliente padrão do\n Discord!", + "settings-channel-desc3": "esta é a versão de teste alfa do Discord. Ao utilizá-la, você obtém acesso aos recursos e correções\n mais recentes.", + "settings-invitewebsocket-desc": "Quando ativado, o ArmCord suportará links Discord.gg; isto é, se você abrir um link de convite em seu\n navegador, o ArmCord irá aceitá-lo automaticamente. Pode não responder às vezes.", + "settings-channel-desc4": "canal de teste público. Recebe recursos mais cedo do que o estável, mas é um pouco mais antigo do que o Canary.", + "settings-altPaste": "Colar alternativo", + "settings-altPaste-desc": "Se você usa GNOME no Linux, ou simplesmente não consegue colar imagens copiadas a partir de outras mensagens, então isto é\n para você. Isto habilita o módulo alternativo para colar imagens. Ative isso apenas quando estiver com\n problemas.", + "settings-channel-desc5": "instância não oficial do Discord que leva você de volta a 2016! O único cliente modificado\n disponível para rodar junto com ele é o Cordwood. É administrado pela comunidade, portanto você assume todos os riscos\n ao utilizá-lo.", + "settings-mod-desc1": "Mods de cliente são programas que permitem personalizar sua experiência no Discord. Eles podem alterar a aparência\n do cliente, modificar comportamentos ou adicionar novos recursos!", + "settings-mod-desc2": "concentra-se em tornar a experiência de desenvolvimento de plugins para o Discord mais fácil. Mínimo e\n leve.", + "settings-mod-desc3": "leve, seguro e fácil, já pronto para usar. Possui uma loja integrada\n para plugins.", + "settings-mod-desc4": "trabalho pesado em andamento, não possui uma interface do usuário funcional.", + "settings-trayIcon": "Ícone da bandeja", + "settings-trayIcon-desc": "Defina o ícone que aparecerá no menu da bandeja.", + "settings-advanced": "Área para usuários avançados", + "settings-pluginsFolder": "Abrir pasta de plugins", + "settings-themesFolder": "Abrir pasta de temas", + "settings-storageFolder": "Abrir pasta de armazenamento" } From 881f3b5fd665bd644a893526dd5748ba49b657e9 Mon Sep 17 00:00:00 2001 From: Christoffer Date: Mon, 15 Aug 2022 11:48:26 +0200 Subject: [PATCH 10/13] Added translation using Weblate (Swedish) --- assets/lang/sv-SE.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 assets/lang/sv-SE.json diff --git a/assets/lang/sv-SE.json b/assets/lang/sv-SE.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/assets/lang/sv-SE.json @@ -0,0 +1 @@ +{} From ccb87c53d8e920aef8e3529e044b0d3a8e3f77fc Mon Sep 17 00:00:00 2001 From: Anonymous Date: Mon, 15 Aug 2022 09:48:28 +0000 Subject: [PATCH 11/13] Translated using Weblate (Swedish) Currently translated at 100.0% (0 of 0 strings) Translation: ArmCord/ArmCord Translate-URL: https://hosted.weblate.org/projects/armcord/armcord/sv/ --- assets/lang/sv-SE.json | 57 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/assets/lang/sv-SE.json b/assets/lang/sv-SE.json index 0967ef4..783767b 100644 --- a/assets/lang/sv-SE.json +++ b/assets/lang/sv-SE.json @@ -1 +1,56 @@ -{} +{ + "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_offline": "You appear to be offline. Please connect to the internet and restart ArmCord.", + "setup_question2": "Choose your Discord channel/instance:", + "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 Discord.", + "settings-theme": "ArmCord theme", + "settings-theme-desc1": "ArmCord \"themes\" manage apps behaviour and looks.", + "settings-theme-desc2": "this is how ArmCord looks when you first launch it. It includes recreation of Discord's\n custom titlebar and ArmCord specific styles injected into Discord.", + "settings-theme-desc3": "uses native titlebar of OS you're currently running (e.g Windows 7/10). Functions more\n similar to actual Discord app on Linux.", + "settings-theme-default": "Default", + "settings-theme-native": "Native", + "settings-mod": "Client mod", + "settings-prfmMode-performance": "Performance", + "settings-mod-desc2": "focuses on making the Discord plugin development experience easier. Minimal and\n lightweight.", + "settings-csp-desc": "ArmCord CSP is our system that manages loading custom content loading into the Discord app. Stuff like\n client mods and themes depend on it. Disable if you want to get rid of mods and custom styles.", + "settings-tray": "Minimize to tray", + "settings-tray-desc": "When disabled, ArmCord will close like any other window when closed, otherwise it'll sit back and relax\n in your system tray for later.", + "settings-patches": "Automatic Patches", + "settings-patches-desk": "Fetches automatic patches that are distributed if release turns out to have bugs after release. Usually\n you don't have to keep this enabled, unless notified in support Discord.", + "settings-mobileMode": "Mobile mode", + "settings-mobileMode-desc": "If you're on a device with touch-screen this feature is for you! It activates Discord's hidden mobile\n mode meant for phones and tablets. Only major feature missing is voice chat support. This is ideal for\n users on PinePhone and similar.", + "settings-channel": "Discord channel", + "settings-channel-desc1": "You can use this setting to change current instance of Discord:", + "settings-channel-desc2": "you're probably most familiar with this one. It's the one you see in default Discord\n client!", + "settings-channel-desc3": "this is alpha test release of Discord. By using it you gain access to the newest\n features and fixes.", + "settings-channel-desc4": "public test build. Receives features earlier than stable but is a bit older than Canary.", + "settings-channel-desc5": "unofficial instance of Discord that takes you back to 2016! Only client mod\n available to run alongside with it is Cordwood. It's run by community, so you take all the risk by\n using it.", + "settings-invitewebsocket": "Invite Websocket", + "settings-invitewebsocket-desc": "When enabled ArmCord will support Discord.gg links which means that if you open an invite link in your\n browser, ArmCord will automatically accept the invite. Can be unresponsive at times.", + "settings-altPaste": "Alternative Paste", + "settings-altPaste-desc": "If you're on Gnome on Linux or just simply can't paste images copied from other messages, then this is\n for you. This enables alternative module for pasting images. Only enable this when you're experiencing\n issues.", + "settings-mod-desc1": "Client mods are programs that allow you customize your Discord experience. They can change appearance of\n the client, modify behaviours or add new features!", + "settings-mod-desc3": "light, secure, and easy to use, with out of the box experience. Features a built-in\n store for plugins.", + "settings-mod-desc4": "heavily work in progress, doesn't have a working UI.", + "settings-prfmMode": "Performance mode is an experimental function that may either increase responsiveness and performance of\n ArmCord or... decrease it. Please try every option and see which fits you the best.", + "settings-prfmMode-battery": "Battery", + "settings-trayIcon": "Tray icon", + "settings-trayIcon-desc": "Set the icon which will appear in tray menu.", + "settings-advanced": "️Advanced user zone", + "settings-pluginsFolder": "Open plugins folder", + "settings-themesFolder": "Open themes folder", + "settings-storageFolder": "Open storage folder", + "settings-none": "None", + "settings-save": "Save Settings", + "settings-updater": "Check for updates" +} From fb6348ee82f0cfd49395af80ab303228cf7135d1 Mon Sep 17 00:00:00 2001 From: KayoticCarnige <32397453+kckarnige@users.noreply.github.com> Date: Mon, 22 Aug 2022 05:24:55 -0400 Subject: [PATCH 12/13] (Attempt 2) A bunch of shit (#175) * 2 new things (Read desc.) - Cleaned up ASAR packaging, ignoring unneeded files for building - Moved install location for Windows users ("AppData\Local\Programs" -> "AppData\Local" * 3 things (Read desc.) - Updated things related to Hummus (Hummus settings don't save nor load in it's respective settings window yet, idk why) - Added check for package version (ArmCord's internal version) - Made check for Kernel mod a bit cleaner, it still uses the same jank method * 3 things - Made macOS titlebar more accurate to Discord - Added "unFocused" class when window isn't focused - Added option to uninstall Husky hook for Windows users with reminder to run format script before committing * Resolved a dumb issue My dumbass not knowing the "echo" command existed smh * Made "precommit-fix" warning more noticable * Whoops * Fixed a CSS bug Discord updates are gonna hate us, huh? --- package.json | 7 ++- src/content/css/discord.css | 6 +- src/content/css/settings.css | 10 ++- src/content/css/titlebar.css | 38 ++++++++---- src/ipc.ts | 19 +++--- src/main.ts | 5 +- src/menu.ts | 110 +++++++++++++++++---------------- src/preload/bridge.ts | 1 + src/preload/preload.ts | 3 +- src/preload/titlebar.ts | 13 +++- src/settings/hummus.html | 23 ++++--- src/settings/main.ts | 10 ++- src/settings/settings.html | 26 ++++---- src/tray.ts | 115 +++++++++++++++++------------------ src/utils.ts | 30 ++++----- src/window.ts | 62 +++++++++++-------- 16 files changed, 277 insertions(+), 201 deletions(-) diff --git a/package.json b/package.json index 9d64bfe..cea8d12 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,9 @@ "packageQuick": "npm run build && electron-builder --dir", "format": "prettier --write src/**/*", "CIbuild": "npm run build && electron-builder --linux zip && electron-builder --windows zip && electron-builder --macos zip", - "postinstall": "husky install" + "postinstall": "husky install", + "precommit-fix": "husky uninstall && echo - && echo !Make sure to run 'npm run format' before commiting! | chalk --stdin yellow inverse && echo -", + "precommit-fix:format": "husky uninstall && npm run format" }, "repository": { "type": "git", @@ -31,7 +33,8 @@ "electron-builder": "^23.0.3", "husky": "^8.0.1", "prettier": "^2.7.0", - "typescript": "^4.7.3" + "typescript": "^4.7.3", + "chalk-cli": "^5.0.0" }, "dependencies": { "electron-context-menu": "github:ArmCord/electron-context-menu", diff --git a/src/content/css/discord.css b/src/content/css/discord.css index d85ed64..cf1fa99 100644 --- a/src/content/css/discord.css +++ b/src/content/css/discord.css @@ -8,6 +8,10 @@ padding: 0; padding-top: 4px; } +[customTitlebar] .backdrop-2ByYRN { + top: -30px; + padding-top: 30px; +} * { outline: none; } @@ -33,7 +37,7 @@ } .none-2-_0dP:hover::-webkit-scrollbar { - width: 0.29em !important; + width: 0.3em !important; border-radius: 25px; height: 0px !important; background: transparent !important; diff --git a/src/content/css/settings.css b/src/content/css/settings.css index 997fb06..b964039 100644 --- a/src/content/css/settings.css +++ b/src/content/css/settings.css @@ -85,6 +85,10 @@ p { z-index: 999; font-size: 10px; } +.saveBar > button { + width: 90px; +} + .header { color: var(--header-primary); font-size: 1.5em; @@ -128,6 +132,7 @@ p { color: var(--header-primary); font-size: 1.5em; font-weight: bold; + width: max-content; } /*buttons*/ button { @@ -273,9 +278,12 @@ select { .acClientMod { height: 18em !important; } +.acCordwood { + height: 8em !important; +} .acPrfmMode { height: 10em !important; } .acTray { - height: 7em !important; + height: 8em !important; } diff --git a/src/content/css/titlebar.css b/src/content/css/titlebar.css index 7aefba5..a0328ce 100644 --- a/src/content/css/titlebar.css +++ b/src/content/css/titlebar.css @@ -12,7 +12,6 @@ height: 30px; line-height: 30px; -webkit-app-region: drag; - width: 100%; user-select: none; -webkit-user-select: none; position: fixed; @@ -225,13 +224,22 @@ } /* ArmCord on MacOS (Why would you do this?) */ +[armcord-platform="darwin"] .withFrame-haYltI { + height: 0px !important; +} +[armcord-platform="darwin"] .sidebar-1tnWFu { + border-top-left-radius: 0px !important; +} +[armcord-platform="darwin"] .scroller-3X7KbA { + padding-top: 35px !important; +} [armcord-platform="darwin"] .container-2RRFHK { - padding-top: 45px; - top: -45px; + padding-top: 48px; + top: -48px; } [armcord-platform="darwin"] .titlebar { - height: 45px; - line-height: 45px; + height: 48px; + line-height: 48px; } [armcord-platform="darwin"] .titlebar #window-controls-container { float: left; @@ -239,7 +247,7 @@ height: 60%; line-height: 45px; -webkit-app-region: no-drag; - transform: translate(-78px, 4px); + transform: translate(-82px, 4px); } [armcord-platform="darwin"] .titlebar #window-controls-container:hover #minimize #minimize-icon, @@ -248,6 +256,13 @@ display: list-item; } +[armcord-platform="darwin"][unFocused] .titlebar #window-controls-container #minimize, +[armcord-platform="darwin"][unFocused] .titlebar #window-controls-container #maximize, +[armcord-platform="darwin"][unFocused] .titlebar #window-controls-container #quit { + background-color: #d6d6d5 !important; + transition: background-color 0.1s ease-in; +} + [armcord-platform="darwin"] .titlebar #window-controls-container #quit #quit-icon { background-color: #79282b; -webkit-mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTI4OSA2TDIuODE4MDEgMy41MjUxM0wzLjUyNTEyIDIuODE4MDJMNS45OTk5OSA1LjI5Mjg5TDguNDc0ODcgMi44MTgwMkw5LjE4MTk3IDMuNTI1MTNMNi43MDcxIDZMOS4xODE5NyA4LjQ3NDg3TDguNDc0ODcgOS4xODE5OEw1Ljk5OTk5IDYuNzA3MTFMMy41MjUxMiA5LjE4MTk4TDIuODE4MDEgOC40NzQ4N0w1LjI5Mjg5IDZaIiBmaWxsPSJyZ2JhKDEyOCwgNiwgMCwgMSkiLz48L3N2Zz4=") @@ -275,6 +290,7 @@ [armcord-platform="darwin"] .titlebar #window-controls-container #minimize { background-color: #fac536; + transition: background-color 0.1s ease-in; border: 1px solid #da9e10; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' width='13' height='13'%3E%3Cstyle%3E.a%7Bfill:%23808080%7D%3C/style%3E%3Ccircle class='a' cx='15' cy='15' r='15'/%3E%3C/svg%3E") no-repeat 50% 50%; @@ -284,6 +300,7 @@ } [armcord-platform="darwin"] .titlebar #window-controls-container #maximize { background-color: #39ea49; + transition: background-color 0.1s ease-in; border: 1px solid #13c11e; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' width='13' height='13'%3E%3Cstyle%3E.a%7Bfill:%23808080%7D%3C/style%3E%3Ccircle class='a' cx='15' cy='15' r='15'/%3E%3C/svg%3E") no-repeat 50% 50%; @@ -293,6 +310,7 @@ } [armcord-platform="darwin"] .titlebar #window-controls-container #quit { background-color: #f25056; + transition: background-color 0.1s ease-in; border: 1px solid #d52735; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' width='13' height='13'%3E%3Cstyle%3E.a%7Bfill:%23808080%7D%3C/style%3E%3Ccircle class='a' cx='15' cy='15' r='15'/%3E%3C/svg%3E") no-repeat 50% 50%; @@ -331,13 +349,7 @@ } [armcord-platform="darwin"] .window-title { - content: var(--wordmark-svg); - height: 10px; - left: 50%; - margin-right: 50%; - transform: translate(50%, 9.5px); - float: right; - padding: 0; + display: none; } [armcord-platform="linux"] .window-title, diff --git a/src/ipc.ts b/src/ipc.ts index ad8cc6a..131115f 100644 --- a/src/ipc.ts +++ b/src/ipc.ts @@ -1,7 +1,7 @@ //ipc stuff import {app, ipcMain, shell, desktopCapturer} from "electron"; import {mainWindow} from "./window"; -import {setConfigBulk, getVersion, getConfig, setLang, getLang, getWindowState} from "./utils"; +import {setConfigBulk, getVersion, getConfig, setLang, getLang, getWindowState, packageVersion} from "./utils"; import {customTitlebar} from "./main"; import {createSettingsWindow} from "./settings/main"; export function registerIpc() { @@ -44,21 +44,24 @@ export function registerIpc() { ipcMain.on("get-app-version", (event) => { event.returnValue = getVersion(); }); + ipcMain.on("get-package-version", (event) => { + event.returnValue = packageVersion; + }); ipcMain.on("splashEnd", async (event, arg) => { try { - var width = await getWindowState("width") ?? 800; - var height= await getWindowState("height") ?? 600; - var isMaximized = await getWindowState("isMaximized") ?? false; + var width = (await getWindowState("width")) ?? 800; + var height = (await getWindowState("height")) ?? 600; + var isMaximized = (await getWindowState("isMaximized")) ?? false; } catch (e) { - console.log("[Window state manager] No window state file found. Fallbacking to default values.") + console.log("[Window state manager] No window state file found. Fallbacking to default values."); mainWindow.setSize(800, 600); } if (isMaximized) { - mainWindow.setSize(800, 600); //just so the whole thing doesn't cover whole screen - mainWindow.maximize() + mainWindow.setSize(800, 600); //just so the whole thing doesn't cover whole screen + mainWindow.maximize(); } else { mainWindow.setSize(width, height); - console.log("[Window state manager] Not maximized.") + console.log("[Window state manager] Not maximized."); } }); ipcMain.on("restart", (event, arg) => { diff --git a/src/main.ts b/src/main.ts index 39a055a..3de5dd8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -43,7 +43,7 @@ app.whenReady().then(async () => { break; } } - await init() + await init(); session.fromPartition("some-partition").setPermissionRequestHandler((webContents, permission, callback) => { if (permission === "notifications") { // Approves the permissions request @@ -55,7 +55,6 @@ app.whenReady().then(async () => { } }); app.on("activate", async function () { - if (BrowserWindow.getAllWindows().length === 0) - await init() + if (BrowserWindow.getAllWindows().length === 0) await init(); }); }); diff --git a/src/menu.ts b/src/menu.ts index f049369..f6535bf 100644 --- a/src/menu.ts +++ b/src/menu.ts @@ -1,76 +1,84 @@ -import { Menu, app, clipboard, globalShortcut } from "electron"; +import {Menu, app, clipboard, globalShortcut} from "electron"; import {mainWindow} from "./window"; import {getConfig} from "./utils"; function paste(contents: any) { const contentTypes = clipboard.availableFormats().toString(); //Workaround: fix pasting the images. - if(contentTypes.includes('image/') && contentTypes.includes('text/html')) { + if (contentTypes.includes("image/") && contentTypes.includes("text/html")) { clipboard.writeImage(clipboard.readImage()); } contents.paste(); } export async function setMenu() { - if (await getConfig("alternativePaste") == true) { + if ((await getConfig("alternativePaste")) == true) { mainWindow.on("focus", function () { - console.log("[Window state manager] Focus") + console.log("[Window state manager] Focus"); globalShortcut.register("CmdOrCtrl+V", function () { if (mainWindow.isFocused()) { - paste(mainWindow.webContents) + paste(mainWindow.webContents); } - }) - }) + }); + }); mainWindow.on("show", function () { - console.log("[Window state manager] Show") - mainWindow.focus() + console.log("[Window state manager] Show"); + mainWindow.focus(); globalShortcut.register("CmdOrCtrl+V", function () { if (mainWindow.isFocused()) { - paste(mainWindow.webContents) + paste(mainWindow.webContents); } - }) - }) + }); + }); mainWindow.on("blur", function () { - console.log("[Window state manager] Defocus") - globalShortcut.unregister("CmdOrCtrl+V") - }) + console.log("[Window state manager] Defocus"); + globalShortcut.unregister("CmdOrCtrl+V"); + }); mainWindow.on("hide", function () { - console.log("[Window state manager] Hide") - globalShortcut.unregister("CmdOrCtrl+V") - }) + console.log("[Window state manager] Hide"); + globalShortcut.unregister("CmdOrCtrl+V"); + }); } - var template: Electron.MenuItemConstructorOptions[] = [{ - label: "ArmCord", - submenu: [ - {label: "About ArmCord", role: "about"},//orderFrontStandardAboutPanel - {type: "separator"}, - { - label: "Developer tools", accelerator: "CmdOrCtrl+Shift+I", click: function () { - mainWindow.webContents.openDevTools() + var template: Electron.MenuItemConstructorOptions[] = [ + { + label: "ArmCord", + submenu: [ + {label: "About ArmCord", role: "about"}, //orderFrontStandardAboutPanel + {type: "separator"}, + { + label: "Developer tools", + accelerator: "CmdOrCtrl+Shift+I", + click: function () { + mainWindow.webContents.openDevTools(); + } + }, + { + label: "Quit", + accelerator: "CmdOrCtrl+Q", + click: function () { + app.quit(); + } } - }, - { - label: "Quit", accelerator: "CmdOrCtrl+Q", click: function () { - app.quit(); - } - } - ] - }, { - label: "Edit", - submenu: [ - {label: "Undo", accelerator: "CmdOrCtrl+Z", role: "undo"}, - {label: "Redo", accelerator: "Shift+CmdOrCtrl+Z", role: "redo"}, - {type: "separator"}, - {label: "Cut", accelerator: "CmdOrCtrl+X", role: "cut"}, - {label: "Copy", accelerator: "CmdOrCtrl+C", role: "copy"}, - { - label: "Paste", accelerator: "CmdOrCtrl+V", click: function () { - paste(mainWindow.webContents) - } - }, - {label: "Select All", accelerator: "CmdOrCtrl+A", role: "selectAll"} - ] - } - ] + ] + }, + { + label: "Edit", + submenu: [ + {label: "Undo", accelerator: "CmdOrCtrl+Z", role: "undo"}, + {label: "Redo", accelerator: "Shift+CmdOrCtrl+Z", role: "redo"}, + {type: "separator"}, + {label: "Cut", accelerator: "CmdOrCtrl+X", role: "cut"}, + {label: "Copy", accelerator: "CmdOrCtrl+C", role: "copy"}, + { + label: "Paste", + accelerator: "CmdOrCtrl+V", + click: function () { + paste(mainWindow.webContents); + } + }, + {label: "Select All", accelerator: "CmdOrCtrl+A", role: "selectAll"} + ] + } + ]; Menu.setApplicationMenu(Menu.buildFromTemplate(template)); -} \ No newline at end of file +} diff --git a/src/preload/bridge.ts b/src/preload/bridge.ts index a4ea57d..d421d5b 100644 --- a/src/preload/bridge.ts +++ b/src/preload/bridge.ts @@ -21,6 +21,7 @@ contextBridge.exposeInMainWorld("armcord", { return result; }), version: ipcRenderer.sendSync("get-app-version", "app-version"), + packageVersion: ipcRenderer.sendSync("get-package-version", "app-version"), getDisplayMediaSelector: getDisplayMediaSelector, openSettingsWindow: () => ipcRenderer.send("openSettingsWindow") }); diff --git a/src/preload/preload.ts b/src/preload/preload.ts index 52cf93e..f98d82e 100644 --- a/src/preload/preload.ts +++ b/src/preload/preload.ts @@ -8,6 +8,7 @@ import {sleep, addStyle, injectJS, addScript} from "../utils"; import {ipcRenderer} from "electron"; import {injectMobileStuff} from "./mobile"; var version = ipcRenderer.sendSync("get-app-version", "app-version"); +var channel = ipcRenderer.sendSync("channel"); async function updateLang() { if (window.location.href.indexOf("setup.html") > -1) { console.log("Setup, skipping lang update"); @@ -37,7 +38,7 @@ if (window.location.href.indexOf("splash.html") > -1) { console.log("Skipping titlebar injection and client mod injection."); } else { if (ipcRenderer.sendSync("titlebar")) { - if (ipcRenderer.sendSync("channel")) { + if (channel == "hummus") { injectHummusTitlebar(); } else { injectTitlebar(); diff --git a/src/preload/titlebar.ts b/src/preload/titlebar.ts index bd54ef6..78dbfce 100644 --- a/src/preload/titlebar.ts +++ b/src/preload/titlebar.ts @@ -64,9 +64,18 @@ export function injectHummusTitlebar() { elem.classList.add("win-buttons-light"); document.getElementsByClassName("titlebar")[0].appendChild(elem); document.body.setAttribute("customTitlebar", ""); + document.body.setAttribute("hummus", ""); document.body.setAttribute("armcord-platform", os.platform()); - addStyle(".chat>.title-wrap {width: 87% !important;}"); - addStyle(".friends-header {width: 91% !important;}"); + addStyle(` + html, body { + background-color: #1e2124; + } + + .friends-header, + .chat > .title-wrap { + float: right !important; + padding-right: 140px !important; + }`); var minimize = document.getElementById("minimize"); var maximize = document.getElementById("maximize"); var quit = document.getElementById("quit"); diff --git a/src/settings/hummus.html b/src/settings/hummus.html index 786dc22..15b5abc 100644 --- a/src/settings/hummus.html +++ b/src/settings/hummus.html @@ -5,6 +5,9 @@ ArmCord Settings @@ -79,7 +82,7 @@
-
+
@@ -116,14 +119,16 @@


-

⚠️Advanced user zone⚠️

- -
- -
- -
- +
+

⚠️ Advanced User Zone ⚠️

+ +
+ +
+ +
+ +