diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 1c58e54..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: bug -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. Linux, Windows, macOS] - - Method of installation [e.g. snap, setup exe, aur] - - Version [e.g. 3.0.7] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index b58b603..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/ArmCord.iml b/.idea/ArmCord.iml deleted file mode 100644 index 0c8867d..0000000 --- a/.idea/ArmCord.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index f042d21..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 0f0b0aa..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/README.md b/README.md index 984f4bc..37942d8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
- +
ArmCord is a custom client designed to enhance your Discord experience while keeping everything lightweight.
@@ -8,27 +8,27 @@ - **Standalone client** - ArmCord is built as a standalone client and doesn't rely on the original Discord client in anyway. + ArmCord is built as standalone client, it doesn't rely on original Discord client. - **Various mods built in** - Enjoy Cumcord, GooseMod, Flicker, and their many features, or have a more vanilla experience, it's your choice! + Explore Cumcord/GooseMod/Flicker plugins and their features! -- **Made for Privacy™** +- **Made for Privacy** - ArmCord automatically blocks all of Discord's trackers; even without any client mods you can feel safe and secure! + ArmCord automatically blocks Discord's trackers. -- **Much more stable** +- **Faster than normal Discord app** - ArmCord is using a newer build of Electron than the stock Discord app. This means you can have a much more stable and secure experience, along with slightly better performance. + ArmCord is using newer Electron than stock Discord app. This usually means increased performance and more stable experience. -- **Cross-platform support!** +- **Designed to work anywhere** - ArmCord was originally created for ARM64 Linux devices, since Discord doesn't support them. We soon decided to support every platform that [Electron supports](https://github.com/electron/electron#platform-support)! + ArmCord was initially created in mind to run on Arm64 Linux devices. We soon expanded our support to more platforms. We plan to support every platform that [Electron supports](https://www.electronjs.org/docs/latest/tutorial/support#supported-platforms). # How to run/install it? ### Recommended: @@ -48,10 +48,8 @@ ArmCord is also available on the Snap store [here](https://snapcraft.io/armcord) ### Pi-Apps ArmCord is also available in [Pi-Apps](https://github.com/Botspot/pi-apps). [![badge](https://github.com/Botspot/pi-apps/blob/master/icons/badge.png?raw=true)](https://github.com/Botspot/pi-apps) - - -### Compiling: - Alternatively you can run ArmCord from source (NodeJS and npm required): +### Manual: + Alternatively you can run ArmCord from source (npm, nodejs required): 1. Clone ArmCord repo: `git clone https://github.com/ArmCord/ArmCord.git` 2. Run `npm install` to install dependencies 3. Build with `npm run build` @@ -59,29 +57,24 @@ ArmCord is also available in [Pi-Apps](https://github.com/Botspot/pi-apps). # FAQ -## Will I get banned for using this? -- You are breaking [Discord ToS](https://discord.com/terms#software-in-discord%E2%80%99s-services) by using ArmCord, but no one has been banned from using it or any of the client mods included. +## 1. Will I get banned from using it? -## Can I use this on anything other than ARM? -- Yes! ArmCord should work normally under Windows, MacOS and Linux as long as it has Electron support. + - You are breaking Discord ToS if you decided to use client mods. But no one ever got banned from using ArmCord or any of the client mods included. If you wish to remove mods, check our documentation. +## 2. How does this work? -## How does this work? -- We are using the official web app and adding some magic powder to make it all work! - -## Where can I find the source code? -- The source code is on [GitHub](https://github.com/ArmCord/ArmCord/). - -## Where can I translate this? -- Translations are done using our [Weblate page](https://hosted.weblate.org/projects/armcord/armcord/). They're pushed to this [repo](https://github.com/ArmCord/i18n). + - We are using official web app and adding some magic powder to make it all work! +## 3. Can I use this on other architectures or operating systems? + - Yes! ArmCord should work normally under Windows, Mac OS and Linux as long as it has NodeJS, npm and Electron support. +## 4. Where can I translate this? + - Translations are done using our [Weblate page](https://hosted.weblate.org/projects/armcord/armcord/). They're pushed to this [repo](https://github.com/ArmCord/i18n). # Credits -[ArmCord UI design, branding, and a few features](https://github.com/kckarnige) +[ArmCord UI Elements and few features](https://github.com/kckarnige) [Cumcord](https://github.com/Cumcord/Cumcord) -[GooseMod](https://github.com/GooseMod/GooseMod) -[GooseMod Extension](https://github.com/GooseMod/extension) -[FlickerMod](https://github.com/FlickerMod) +[GooseMod](https://github.com/GooseMod/GooseMod) +[GooseMod Extension](https://github.com/GooseMod/extension) [electron-discord-webapp](https://github.com/SpacingBat3/electron-discord-webapp) -(Pre v3.0.6) [custom-electron-titlebar](https://github.com/AlexTorresSk/custom-electron-titlebar) +[custom-electron-titlebar (css only)](https://github.com/AlexTorresSk/custom-electron-titlebar) [electron-builder](https://electron.build) [OpenAsar](https://github.com/GooseMod/OpenAsar) # Sponsors diff --git a/assets/lang/en-US.json b/assets/lang/en-US.json index 5c963b1..c1301c9 100644 --- a/assets/lang/en-US.json +++ b/assets/lang/en-US.json @@ -18,7 +18,6 @@ "settings-theme-native": "Native", "settings-tray": "Minimize to tray", "settings-patches": "Automatic Patches", - "settings-mobileMode": "Mobile mode", "settings-channel": "Discord channel:", "settings-invitewebsocket": "Invite Websocket", "settings-mod": "Client mod:", @@ -26,6 +25,6 @@ "settings-prfmMode-performance": "Performance", "settings-prfmMode-battery": "Battery", "settings-none": "None", - "settings-save": "Save Settings", + "settings-save": "Save settings", "settings-updater": "Check for updates" } diff --git a/assets/lang/es-419.json b/assets/lang/es-419.json index 1eec53a..194282e 100644 --- a/assets/lang/es-419.json +++ b/assets/lang/es-419.json @@ -26,6 +26,5 @@ "settings-prfmMode-battery": "Batería", "settings-none": "Ninguna", "settings-save": "Guardar ajustes", - "settings-updater": "Buscar una actualización", - "settings-mobileMode": "Mobile mode" + "settings-updater": "Buscar una actualización" } diff --git a/assets/lang/fa-IR.json b/assets/lang/fa-IR.json index 1566cf5..41039ef 100644 --- a/assets/lang/fa-IR.json +++ b/assets/lang/fa-IR.json @@ -26,6 +26,5 @@ "settings-prfmMode-battery": "ذخیره برای باتری", "settings-none": "هیچکدام", "settings-save": "ذخیره تنظیمات", - "settings-updater": "بررسی برای بروزرسانی", - "settings-mobileMode": "Mobile mode" + "settings-updater": "بررسی برای بروزرسانی" } diff --git a/assets/lang/fr-FR.json b/assets/lang/fr-FR.json index 2c486bf..b1891b4 100644 --- a/assets/lang/fr-FR.json +++ b/assets/lang/fr-FR.json @@ -26,6 +26,5 @@ "settings-prfmMode": "Mode performance :", "settings-prfmMode-performance": "Performance", "settings-prfmMode-battery": "Batterie", - "settings-none": "Aucun", - "settings-mobileMode": "Mobile mode" + "settings-none": "Aucun" } diff --git a/assets/lang/id-ID.json b/assets/lang/id-ID.json index adbbcae..f0535d3 100644 --- a/assets/lang/id-ID.json +++ b/assets/lang/id-ID.json @@ -1,31 +1,30 @@ { - "loading_screen_start": "memulai ArmCord…", - "loading_screen_offline": "tampaknya anda sedang offline. Silahkan sambungkan ke internet dan coba lagi.", - "loading_screen_update": "versi terbaru ArmCord tersedia. Silahkan perbaharui ke versi terbaru.", - "setup_question1": "pilih jenis pengaturan yang ingin anda tampilkan:", - "setup_question1_answer1": "pengaturan cepat", - "setup_question1_answer2": "pengaturan penuh", - "setup_question2": "pilih saluran Discord anda/instansi:", - "setup_offline": "tampaknya anda sedang offline. silahkan sambungkan ke internet dan muat ulang ArmCord.", - "setup_question3": "bolehkah ArmCord menangani pemasangan mods klien?", - "yes": "iya", - "no": "tidak", - "next": "berikutnya", - "setup_question4": "Pilih mod klien yang ingin anda pasang:", - "setup_question4_clientmodnotice": "kenapa tidak semuanya? memiliki mod klien lebih saat bersamaan bisa menyebabkan masalah. jika anda tetap ingin melakukannya, cek di Discord kami.", - "settings-theme": "Tema ArmCord:", - "settings-theme-default": "Bawaan", - "settings-theme-native": "asli", - "settings-tray": "kecilkan ke tray", - "settings-patches": "Patch otomatis", - "settings-channel": "Saluran Discord:", - "settings-invitewebsocket": "mengajak soket web", - "settings-mod": "klien mod:", - "settings-save": "simpan pengaturan", - "settings-updater": "periksa pembaharuan", - "settings-prfmMode": "mode kinerja:", - "settings-prfmMode-performance": "kinerja", - "settings-prfmMode-battery": "Baterai", - "settings-none": "tidak ada", - "settings-mobileMode": "Mobile mode" + "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-default": "Default", + "settings-theme-native": "Native", + "settings-tray": "Minimize to tray", + "settings-patches": "Automatic Patches", + "settings-channel": "Discord channel:", + "settings-invitewebsocket": "discord.gg support", + "settings-mod": "Client mod:", + "settings-save": "Save settings", + "settings-updater": "Check for updates", + "settings-prfmMode": "Performance mode:", + "settings-prfmMode-performance": "Performance", + "settings-prfmMode-battery": "Battery", + "settings-none": "None" } diff --git a/assets/lang/it-IT.json b/assets/lang/it-IT.json index 8895906..f0c9675 100644 --- a/assets/lang/it-IT.json +++ b/assets/lang/it-IT.json @@ -26,6 +26,5 @@ "settings-prfmMode": "Performance mode:", "settings-prfmMode-performance": "Performance", "settings-prfmMode-battery": "Battery", - "settings-none": "None", - "settings-mobileMode": "Mobile mode" + "settings-none": "None" } diff --git a/assets/lang/nb-NO.json b/assets/lang/nb-NO.json index 3066c0f..00bdd19 100644 --- a/assets/lang/nb-NO.json +++ b/assets/lang/nb-NO.json @@ -26,6 +26,5 @@ "settings-prfmMode": "Performance mode:", "settings-prfmMode-performance": "Performance", "settings-prfmMode-battery": "Battery", - "settings-none": "None", - "settings-mobileMode": "Mobile mode" + "settings-none": "None" } diff --git a/assets/lang/nl-NL.json b/assets/lang/nl-NL.json index fd83845..ebac8bc 100644 --- a/assets/lang/nl-NL.json +++ b/assets/lang/nl-NL.json @@ -26,6 +26,5 @@ "settings-none": "None", "settings-prfmMode": "Performance mode:", "settings-prfmMode-performance": "Performance", - "settings-prfmMode-battery": "Battery", - "settings-mobileMode": "Mobile mode" + "settings-prfmMode-battery": "Battery" } diff --git a/assets/lang/pl-PL.json b/assets/lang/pl-PL.json index 4fa3eff..05f840e 100644 --- a/assets/lang/pl-PL.json +++ b/assets/lang/pl-PL.json @@ -26,6 +26,5 @@ "settings-prfmMode": "Tryb wydajności:", "settings-prfmMode-performance": "Wydajny", "settings-prfmMode-battery": "Bateria", - "settings-none": "Nic/Brak", - "settings-mobileMode": "Mobile mode" + "settings-none": "Nic/Brak" } diff --git a/assets/lang/pt-BR.json b/assets/lang/pt-BR.json deleted file mode 100644 index e657eb5..0000000 --- a/assets/lang/pt-BR.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "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:", - "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?", - "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:", - "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" -} diff --git a/assets/lang/ru-RU.json b/assets/lang/ru-RU.json deleted file mode 100644 index 6cca053..0000000 --- a/assets/lang/ru-RU.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "loading_screen_start": "Запуск ArmCord…", - "loading_screen_offline": "Видимо, вы не в сети. Подключитесь к Интернету и повторите попытку.", - "loading_screen_update": "Доступна новая версия ArmCord. Обновите до последней версии.", - "setup_question1": "Выберите, какую настройку хотите выполнить:", - "setup_question1_answer1": "Экспресс-настройка", - "setup_question1_answer2": "Полная настройка", - "setup_offline": "Видимо, вы не в сети. Подключитесь к Интернету и перезапустите ArmCord.", - "setup_question2": "Выберите свой канал/экземпляр Discord:", - "setup_question3": "Должен ли ArmCord заниматься установкой клиентских модов?", - "yes": "Да", - "no": "Нет", - "next": "Далее", - "setup_question4": "Выберите клиентский мод, который хотите установить:", - "setup_question4_clientmodnotice": "Почему не все? Наличие множества клиентских модов одновременно может вызвать проблемы. Если вы действительно хотите это сделать, посетите наш Discord.", - "settings-theme": "Тема ArmCord:", - "settings-theme-default": "По умолчанию", - "settings-theme-native": "Нативная", - "settings-tray": "Свернуть в область уведомлений", - "settings-patches": "Автоматические патчи", - "settings-channel": "Канал Discord:", - "settings-invitewebsocket": "Пригласить Websocket", - "settings-mod": "Клиентский мод:", - "settings-prfmMode": "Режим производительности:", - "settings-prfmMode-performance": "Производительность", - "settings-prfmMode-battery": "Батарея", - "settings-none": "Ничего", - "settings-save": "Сохранить настройки", - "settings-updater": "Проверить наличие обновлений", - "settings-mobileMode": "Mobile mode" -} diff --git a/assets/lang/th-TH.json b/assets/lang/th-TH.json index 1521f50..698ac35 100644 --- a/assets/lang/th-TH.json +++ b/assets/lang/th-TH.json @@ -26,6 +26,5 @@ "settings-mod": "ไคลแอนต์มอด:", "settings-none": "ไม่มี", "settings-save": "บันทึกการตั้งค่า", - "settings-updater": "ตรวจหาการอัปเดต", - "settings-mobileMode": "โหมดมือถือ" + "settings-updater": "ตรวจหาการอัปเดต" } diff --git a/package.json b/package.json index b5baa93..2cd306f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "watch": "tsc -w", "start": "npm run build && electron ./ts-out/main.js", "package": "npm run build && electron-builder", - "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" @@ -27,7 +26,7 @@ "@types/node": "^17.0.42", "@types/ws": "^8.5.3", "copyfiles": "^2.4.1", - "electron": "^19.0.8", + "electron": "^19.0.7", "electron-builder": "^23.1.0", "husky": "^8.0.1", "prettier": "^2.7.0", diff --git a/src/content/css/mobile.css b/src/content/css/mobile.css deleted file mode 100644 index a71ed39..0000000 --- a/src/content/css/mobile.css +++ /dev/null @@ -1,6 +0,0 @@ -[aria-label~="Mute"] { - display: none; -} -[aria-label~="Deafen"] { - display: none; -} diff --git a/src/content/css/screenshare.css b/src/content/css/screenshare.css deleted file mode 100644 index 77fa8a4..0000000 --- a/src/content/css/screenshare.css +++ /dev/null @@ -1,68 +0,0 @@ -.desktop-capturer-selection { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100vh; - background: rgba(30, 30, 30, 0.75); - color: #ffffff; - z-index: 10000000; - display: flex; - align-items: center; - justify-content: center; -} -.desktop-capturer-selection__scroller { - width: 100%; - max-height: 100vh; - overflow-y: auto; -} -.desktop-capturer-selection__list { - max-width: calc(100% - 100px); - margin: 50px; - padding: 0; - display: flex; - flex-wrap: wrap; - list-style: none; - overflow: hidden; - justify-content: center; -} -.desktop-capturer-selection__item { - display: flex; - margin: 4px; -} -.desktop-capturer-selection__btn { - display: flex; - flex-direction: column; - align-items: stretch; - width: 145px; - margin: 0; - border: 0; - border-radius: 3px; - padding: 4px; - background: #2c2f33; - text-align: left; -} -@media (prefers-reduced-motion: no-preference) { -} -.desktop-capturer-selection__btn:hover, -.desktop-capturer-selection__btn:focus { - background: #7289da; - box-shadow: 0 0 4px rgba(0, 0, 0, 0.45), 0 0 2px rgba(0, 0, 0, 0.25); - color: #fff; -} -.desktop-capturer-selection__thumbnail { - width: 100%; - height: 81px; - object-fit: cover; -} -.desktop-capturer-selection__name { - margin: 6px 0; - white-space: nowrap; - color: white; - text-overflow: ellipsis; - text-align: center; - overflow: hidden; -} -.desktop-capturer-selection__name--cancel { - margin: auto 0; -} diff --git a/src/content/css/settings.css b/src/content/css/settings.css index d14ec9d..d4e1714 100644 --- a/src/content/css/settings.css +++ b/src/content/css/settings.css @@ -38,7 +38,7 @@ SOFTWARE.*/ font-family: Whitney; font-weight: 400; font-style: normal; - src: url(https://armcord.xyz/whitney_400.woff) format("woff"); + src: url(https://armcord.smartfridge.space/whitney_400.woff) format("woff"); } html, diff --git a/src/content/css/setup.css b/src/content/css/setup.css index 78f20b4..9bd97fb 100644 --- a/src/content/css/setup.css +++ b/src/content/css/setup.css @@ -16,7 +16,7 @@ font-family: Whitney; font-weight: 400; font-style: normal; - src: url(https://armcord.xyz/whitney_400.woff) format("woff"); + src: url(https://armcord.smartfridge.space/whitney_400.woff) format("woff"); } html, diff --git a/src/content/css/splash.css b/src/content/css/splash.css index 379948d..9f84249 100644 --- a/src/content/css/splash.css +++ b/src/content/css/splash.css @@ -31,7 +31,7 @@ SOFTWARE.*/ font-family: Whitney; font-weight: 400; font-style: normal; - src: url(https://armcord.xyz/whitney_400.woff) format("woff"); + src: url(https://armcord.smartfridge.space/whitney_400.woff) format("woff"); } html, diff --git a/src/content/setup.html b/src/content/setup.html index a0f8540..dfc317e 100644 --- a/src/content/setup.html +++ b/src/content/setup.html @@ -31,7 +31,7 @@ - +

@@ -121,7 +121,6 @@ automaticPatches: false, mods: "cumcord", inviteWebsocket: true, - mobileMode: false, trayIcon: "ac_plug_colored", performanceMode: "none" }); @@ -149,8 +148,8 @@ windowStyle: "default", channel: options.channel, armcordCSP: true, + autoLaunch: true, minimizeToTray: true, - mobileMode: false, automaticPatches: false, performanceMode: "none", trayIcon: "ac_plug_colored", @@ -166,7 +165,7 @@ armcordCSP: true, minimizeToTray: true, automaticPatches: false, - mobileMode: false, + autoLaunch: true, mods: "none", performanceMode: "none", trayIcon: "ac_plug_colored", diff --git a/src/content/splash.html b/src/content/splash.html index 0378dd1..cfaebed 100644 --- a/src/content/splash.html +++ b/src/content/splash.html @@ -18,7 +18,7 @@

@@ -38,7 +38,7 @@ if (data.version !== window.armcord.version) { var elem = document.createElement("img"); elem.classList.add("logo"); - elem.src = "https://armcord.xyz/update.webp"; + elem.src = "https://armcord.smartfridge.space/update.webp"; document.body.prepend(elem); document.getElementById("splashscreen-armcord").remove(); text.innerHTML = await armcord.getLang("loading_screen_update"); @@ -58,8 +58,8 @@ case "ptb": window.location.replace("https://ptb.discord.com/app"); break; - case "hummus": - window.location.replace("https://hummus.sys42.net/"); + case "foss": + window.location.replace("https://dev.fosscord.com/app"); break; case undefined: window.location.replace("https://discord.com/app"); diff --git a/src/extensions/mods.ts b/src/extensions/mods.ts index fb2c5c2..edf1d9a 100644 --- a/src/extensions/mods.ts +++ b/src/extensions/mods.ts @@ -27,8 +27,7 @@ const unstrictCSP = () => { "https://api.goosemod.com/inject.js", "https://raw.githubusercontent.com/Cumcord/Cumcord/stable/dist/build.js", "https://raw.githubusercontent.com/Cumcord/Cumcord/master/dist/build.js", - "https://raw.githubusercontent.com/FlickerMod/dist/main/build.js", - "https://localhost:1234/dist.js" + "https://raw.githubusercontent.com/FlickerMod/dist/main/build.js" ]; electron.session.defaultSession.webRequest.onHeadersReceived(({responseHeaders, url}, done) => { diff --git a/src/ipc.ts b/src/ipc.ts index ad8cc6a..52e1c68 100644 --- a/src/ipc.ts +++ b/src/ipc.ts @@ -50,7 +50,7 @@ export function registerIpc() { 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("No window state file found. Fallbacking to default values.") mainWindow.setSize(800, 600); } if (isMaximized) { @@ -58,7 +58,7 @@ export function registerIpc() { mainWindow.maximize() } else { mainWindow.setSize(width, height); - console.log("[Window state manager] Not maximized.") + console.log("Not maximized.") } }); ipcMain.on("restart", (event, arg) => { @@ -83,9 +83,6 @@ export function registerIpc() { ipcMain.on("titlebar", (event, arg) => { event.returnValue = customTitlebar; }); - ipcMain.on("mobileMode", async (event, arg) => { - event.returnValue = await getConfig("mobileMode"); - }); ipcMain.on("shouldPatch", async (event, arg) => { event.returnValue = await getConfig("automaticPatches"); }); diff --git a/src/main.ts b/src/main.ts index 39a055a..e2def19 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,6 +6,7 @@ import "./extensions/mods"; import "./extensions/plugin"; import "./tray"; import {createCustomWindow, createNativeWindow} from "./window"; +import "./shortcuts"; export var settings: any; export var customTitlebar: boolean; @@ -25,25 +26,22 @@ if (process.platform == "linux") { checkIfConfigExists(); injectElectronFlags(); app.whenReady().then(async () => { - async function init() { - switch (await getConfig("windowStyle")) { - case "default": - createCustomWindow(); - customTitlebar = true; - break; - case "native": - createNativeWindow(); - break; - case "basic": - createNativeWindow(); - break; - default: - createCustomWindow(); - customTitlebar = true; - break; - } + switch (await getConfig("windowStyle")) { + case "default": + createCustomWindow(); + customTitlebar = true; + break; + case "native": + createNativeWindow(); + break; + case "basic": + createNativeWindow(); + break; + default: + createCustomWindow(); + customTitlebar = true; + break; } - await init() session.fromPartition("some-partition").setPermissionRequestHandler((webContents, permission, callback) => { if (permission === "notifications") { // Approves the permissions request @@ -56,6 +54,24 @@ app.whenReady().then(async () => { }); app.on("activate", async function () { if (BrowserWindow.getAllWindows().length === 0) - await init() + switch (await getConfig("windowStyle")) { + case "default": + createCustomWindow(); + break; + case "native": + createNativeWindow(); + break; + case "discord": + createNativeWindow(); + break; + default: + createCustomWindow(); + break; + } + console.log("userDataPath = " + app.getPath("userData")); }); }); + +app.on("window-all-closed", function () { + if (process.platform !== "darwin") app.quit(); +}); diff --git a/src/menu.ts b/src/menu.ts deleted file mode 100644 index 0acf2b1..0000000 --- a/src/menu.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Menu, app, clipboard, globalShortcut } from "electron"; -import {mainWindow} from "./window"; - -function paste(contents: any) { - const contentTypes = clipboard.availableFormats().toString(); - //Workaround: fix pasting the images. - if(contentTypes.includes('image/') && contentTypes.includes('text/html')) { - clipboard.writeImage(clipboard.readImage()); - } - contents.paste(); -} -export function setMenu() { - globalShortcut.register("CmdOrCtrl+V", function () { - if (mainWindow.isFocused()) { - paste(mainWindow.webContents) - } - }) - 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: "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/capturer.ts b/src/preload/capturer.ts index 9075e5c..2f6d8ed 100644 --- a/src/preload/capturer.ts +++ b/src/preload/capturer.ts @@ -2,8 +2,6 @@ //original https://github.com/electron/electron/issues/16513#issuecomment-602070250 import {ipcRenderer} from "electron"; import {addStyle, addScript} from "../utils"; -import fs from "fs"; -import path from "path"; const desktopCapturer = { getSources: (opts: any) => ipcRenderer.invoke("DESKTOP_CAPTURER_GET_SOURCES", opts) }; @@ -42,6 +40,79 @@ export async function getDisplayMediaSelector() { `; } +const screenShareCSS = ` +.desktop-capturer-selection { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100vh; + background: rgba(30,30,30,.75); + color: #FFFFFF; + z-index: 10000000; + display: flex; + align-items: center; + justify-content: center; +} +.desktop-capturer-selection__scroller { + width: 100%; + max-height: 100vh; + overflow-y: auto; +} +.desktop-capturer-selection__list { + max-width: calc(100% - 100px); + margin: 50px; + padding: 0; + display: flex; + flex-wrap: wrap; + list-style: none; + overflow: hidden; + justify-content: center; +} +.desktop-capturer-selection__item { + display: flex; + margin: 4px; +} +.desktop-capturer-selection__btn { + display: flex; + flex-direction: column; + align-items: stretch; + width: 145px; + margin: 0; + border: 0; + border-radius: 3px; + padding: 4px; + background: #2C2F33; + text-align: left; + @media (prefers-reduced-motion: no-preference) { + transition: background-color .15s, box-shadow .15s, color .15s; + } + color: #dedede; +} +.desktop-capturer-selection__btn:hover, +.desktop-capturer-selection__btn:focus { + background: #7289DA; + box-shadow: 0 0 4px rgba(0,0,0,0.45), 0 0 2px rgba(0,0,0,0.25); + color: #fff; +} +.desktop-capturer-selection__thumbnail { + width: 100%; + height: 81px; + object-fit: cover; +} +.desktop-capturer-selection__name { + margin: 6px 0; + white-space: nowrap; + color: white; + text-overflow: ellipsis; + text-align: center; + overflow: hidden; +} +.desktop-capturer-selection__name--cancel { + margin: auto 0; +} +`; + const screenShareJS = ` window.navigator.mediaDevices.getDisplayMedia = () => new Promise(async (resolve, reject) => { try { @@ -84,7 +155,6 @@ window.navigator.mediaDevices.getDisplayMedia = () => new Promise(async (resolve document.addEventListener("DOMContentLoaded", function () { addScript(screenShareJS); - const screenshareCss = path.join(__dirname, "../", "/content/css/screenshare.css"); - addStyle(fs.readFileSync(screenshareCss, "utf8")); + addStyle(screenShareCSS); console.log("Capturer injected."); }); diff --git a/src/preload/mobile.ts b/src/preload/mobile.ts deleted file mode 100644 index d1d03f0..0000000 --- a/src/preload/mobile.ts +++ /dev/null @@ -1,15 +0,0 @@ -import {ipcRenderer} from "electron"; -import {addStyle} from "../utils"; -import * as fs from "fs"; -import * as path from "path"; -export function injectMobileStuff() { - document.addEventListener("DOMContentLoaded", function (event) { - const mobileCSS = path.join(__dirname, "../", "/content/css/mobile.css"); - addStyle(fs.readFileSync(mobileCSS, "utf8")); - // TO-DO: clicking on the logo, or additional button triggers ESC button to move around the UI quicker - // var logo = document.getElementById("window-title"); - // logo!.addEventListener("click", () => { - // - // }); - }); -} diff --git a/src/preload/preload.ts b/src/preload/preload.ts index ac6ccf7..6089430 100644 --- a/src/preload/preload.ts +++ b/src/preload/preload.ts @@ -6,7 +6,6 @@ import * as path from "path"; import {injectTitlebar} from "./titlebar"; import {sleep, addStyle, injectJS, addScript} from "../utils"; import {ipcRenderer} from "electron"; -import {injectMobileStuff} from "./mobile"; var version = ipcRenderer.sendSync("get-app-version", "app-version"); async function updateLang() { if (window.location.href.indexOf("setup.html") > -1) { @@ -28,7 +27,7 @@ const clientMods = { flicker: "https://raw.githubusercontent.com/FlickerMod/dist/main/build.js" }; -console.log("ArmCord " + version); +console.log("ArmCord"); ipcRenderer.on("themeLoader", (event, message) => { addStyle(message); }); @@ -38,9 +37,6 @@ if (window.location.href.indexOf("splash.html") > -1) { if (ipcRenderer.sendSync("titlebar")) { injectTitlebar(); } - if (ipcRenderer.sendSync("mobileMode")) { - injectMobileStuff(); - } sleep(5000).then(async () => { const cssPath = path.join(__dirname, "../", "/content/css/discord.css"); addStyle(fs.readFileSync(cssPath, "utf8")); diff --git a/src/preload/titlebar.ts b/src/preload/titlebar.ts index 5bbcc7e..7ce8b48 100644 --- a/src/preload/titlebar.ts +++ b/src/preload/titlebar.ts @@ -5,11 +5,6 @@ import * as path from "path"; import os from "os"; export function injectTitlebar() { document.addEventListener("DOMContentLoaded", function (event) { - if (window.armcord.channel == "hummus") { - window.alert( - "ArmCord Titlebar doesn't currently work well in Hummus, please change ArmCord style to native for better experience." - ); - } var elem = document.createElement("div"); elem.innerHTML = `