mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
Compare commits
1 commit
44a0ef41ff
...
b50010efe5
Author | SHA1 | Date | |
---|---|---|---|
|
b50010efe5 |
19 changed files with 249 additions and 381 deletions
|
@ -2,8 +2,8 @@
|
||||||
"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 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": "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",
|
||||||
"setup_question2": "Choisissez votre canal/instance Discord :",
|
"setup_question2": "Choisissez votre canal/instance Discord :",
|
||||||
"setup_question3": "ArmCord doit-il s'occuper de l'installation des mods clients ?",
|
"setup_question3": "ArmCord doit-il s'occuper de l'installation des mods clients ?",
|
||||||
"yes": "Oui",
|
"yes": "Oui",
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
"settings-mod": "Modification client :",
|
"settings-mod": "Modification client :",
|
||||||
"settings-save": "Sauvegarder les paramètres",
|
"settings-save": "Sauvegarder les paramètres",
|
||||||
"settings-updater": "Vérifier les mises à jour",
|
"settings-updater": "Vérifier les mises à jour",
|
||||||
"settings-theme": "Thème ArmCord",
|
"settings-theme": "Thème ArmCord :",
|
||||||
"settings-theme-default": "Default",
|
"settings-theme-default": "Default",
|
||||||
"settings-theme-native": "Native",
|
"settings-theme-native": "Native",
|
||||||
"settings-patches": "Correctifs automatiques",
|
"settings-patches": "Correctifs automatiques",
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
"settings-prfmMode-battery": "Batterie",
|
"settings-prfmMode-battery": "Batterie",
|
||||||
"settings-none": "Aucun",
|
"settings-none": "Aucun",
|
||||||
"settings-mobileMode": "Mobile mode",
|
"settings-mobileMode": "Mobile mode",
|
||||||
"settings-theme-desc1": "Les \"thèmes\" d'ArmCord gèrent le comportement et l'apparence des applications.",
|
"settings-theme-desc1": "ArmCord \"themes\" manage apps behaviour and looks.",
|
||||||
"settings-channel-desc4": "public test build. Receives features earlier than stable but is a bit older than Canary.",
|
"settings-channel-desc4": "public test build. Receives features earlier than stable but is a bit older than Canary.",
|
||||||
"settings-altPaste": "Alternative Paste",
|
"settings-altPaste": "Alternative Paste",
|
||||||
"settings-storageFolder": "Open storage folder",
|
"settings-storageFolder": "Open storage folder",
|
||||||
|
|
|
@ -1,56 +1,56 @@
|
||||||
{
|
{
|
||||||
"no": "Não",
|
"no": "Não",
|
||||||
"loading_screen_start": "Iniciando ArmCord…",
|
"loading_screen_start": "Iniciando ArmCord…",
|
||||||
"loading_screen_offline": "Você parece estar offline. Por favor, conecte-se à internet e tente novamente.",
|
"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. Por favor, atualize para a versão mais recente.",
|
"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ê deseja fazer:",
|
"setup_question1": "Selecione que tipo de instação você quer fazer:",
|
||||||
"setup_question1_answer1": "Instalação rápida",
|
"setup_question1_answer1": "Instalação rápida",
|
||||||
"setup_question1_answer2": "Instalação completa",
|
"setup_question1_answer2": "Instalação completa",
|
||||||
"setup_offline": "Você parece estar offline. Por favor, conecte-se à internet e tente novamente.",
|
"setup_offline": "Você parece estar offline. Conecte-se à internet e tente novamente.",
|
||||||
"setup_question2": "Escolha o canal/instância do seu Discord:",
|
"setup_question2": "Escolha o canal/instância do seu Discord",
|
||||||
"setup_question3": "O ArmCord deve lidar com a instalação de mods do cliente?",
|
"setup_question3": "O ArmCord deve suportar a instalação dos mods de cliente?",
|
||||||
"yes": "Sim",
|
"yes": "Sim",
|
||||||
"next": "Próximo",
|
"next": "Próximo",
|
||||||
"setup_question4": "Selecione um mod de cliente que você deseja instalar:",
|
"setup_question4": "Selecione um mod de cliente que você quer 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.",
|
"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": "Tema do ArmCord:",
|
||||||
"settings-theme-default": "Padrão",
|
"settings-theme-default": "Padrão",
|
||||||
"settings-theme-native": "Nativo",
|
"settings-theme-native": "Nativo",
|
||||||
"settings-tray": "Minimizar para a bandeja",
|
"settings-tray": "Minimizar para a bandeja",
|
||||||
"settings-patches": "Patches automáticos",
|
"settings-patches": "Patches automáticos",
|
||||||
"settings-channel": "Canal do Discord",
|
"settings-channel": "Tipo de Discord:",
|
||||||
"settings-invitewebsocket": "Convite por WebSocket",
|
"settings-invitewebsocket": "Invite Websocket",
|
||||||
"settings-mod": "Modificação de cliente",
|
"settings-mod": "Client mod:",
|
||||||
"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 mode:",
|
||||||
"settings-prfmMode-performance": "Desempenho",
|
"settings-prfmMode-performance": "Performance",
|
||||||
"settings-prfmMode-battery": "Bateria",
|
"settings-prfmMode-battery": "Battery",
|
||||||
"settings-none": "Nenhum",
|
"settings-none": "None",
|
||||||
"settings-save": "Salvar configurações",
|
"settings-save": "Save Settings",
|
||||||
"settings-updater": "Verificar atualizações",
|
"settings-updater": "Check for updates",
|
||||||
"settings-mobileMode": "Modo móvel",
|
"settings-mobileMode": "Mobile mode",
|
||||||
"settings-channel-desc1": "Você pode usar esta opção para alterar a atual instância do Discord:",
|
"settings-channel-desc1": "You can use this setting to change current instance of Discord:",
|
||||||
"settings-theme-desc1": "Os \"temas\" do ArmCord gerenciam o comportamento e a aparência de aplicativos.",
|
"settings-theme-desc1": "ArmCord \"themes\" manage apps behaviour and looks.",
|
||||||
"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-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": "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-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 é 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-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": "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-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": "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-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": "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-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": "você provavelmente está mais familiarizado com este. É o que você vê no cliente padrão do\n 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": "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-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": "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-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": "canal de teste público. Recebe recursos mais cedo do que o estável, mas é um pouco mais antigo do que o Canary.",
|
"settings-channel-desc4": "public test build. Receives features earlier than stable but is a bit older than Canary.",
|
||||||
"settings-altPaste": "Colar alternativo",
|
"settings-altPaste": "Alternative Paste",
|
||||||
"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-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": "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-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": "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-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": "concentra-se em tornar a experiência de desenvolvimento de plugins para o Discord mais fácil. Mínimo e\n leve.",
|
"settings-mod-desc2": "focuses on making the Discord plugin development experience easier. Minimal and\n lightweight.",
|
||||||
"settings-mod-desc3": "leve, seguro e fácil, já pronto para usar. Possui uma loja integrada\n para plugins.",
|
"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": "trabalho pesado em andamento, não possui uma interface do usuário funcional.",
|
"settings-mod-desc4": "heavily work in progress, doesn't have a working UI.",
|
||||||
"settings-trayIcon": "Ícone da bandeja",
|
"settings-trayIcon": "Tray icon",
|
||||||
"settings-trayIcon-desc": "Defina o ícone que aparecerá no menu da bandeja.",
|
"settings-trayIcon-desc": "Set the icon which will appear in tray menu.",
|
||||||
"settings-advanced": "Área para usuários avançados",
|
"settings-advanced": "️Advanced user zone",
|
||||||
"settings-pluginsFolder": "Abrir pasta de plugins",
|
"settings-pluginsFolder": "Open plugins folder",
|
||||||
"settings-themesFolder": "Abrir pasta de temas",
|
"settings-themesFolder": "Open themes folder",
|
||||||
"settings-storageFolder": "Abrir pasta de armazenamento"
|
"settings-storageFolder": "Open storage folder"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,56 +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_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"
|
|
||||||
}
|
|
|
@ -11,9 +11,7 @@
|
||||||
"packageQuick": "npm run build && electron-builder --dir",
|
"packageQuick": "npm run build && electron-builder --dir",
|
||||||
"format": "prettier --write src/**/*",
|
"format": "prettier --write src/**/*",
|
||||||
"CIbuild": "npm run build && electron-builder --linux zip && electron-builder --windows zip && electron-builder --macos zip",
|
"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": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -33,8 +31,7 @@
|
||||||
"electron-builder": "^23.3.3",
|
"electron-builder": "^23.3.3",
|
||||||
"husky": "^8.0.1",
|
"husky": "^8.0.1",
|
||||||
"prettier": "^2.7.0",
|
"prettier": "^2.7.0",
|
||||||
"typescript": "^4.7.3",
|
"typescript": "^4.7.3"
|
||||||
"chalk-cli": "^5.0.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"electron-context-menu": "github:ArmCord/electron-context-menu",
|
"electron-context-menu": "github:ArmCord/electron-context-menu",
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
padding-top: 4px;
|
padding-top: 4px;
|
||||||
}
|
}
|
||||||
[customTitlebar] .backdrop-2ByYRN {
|
|
||||||
top: -30px;
|
|
||||||
padding-top: 30px;
|
|
||||||
}
|
|
||||||
* {
|
* {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +33,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.none-2-_0dP:hover::-webkit-scrollbar {
|
.none-2-_0dP:hover::-webkit-scrollbar {
|
||||||
width: 0.3em !important;
|
width: 0.29em !important;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
height: 0px !important;
|
height: 0px !important;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
|
|
|
@ -85,10 +85,6 @@ p {
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
.saveBar > button {
|
|
||||||
width: 90px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
color: var(--header-primary);
|
color: var(--header-primary);
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
|
@ -132,7 +128,6 @@ p {
|
||||||
color: var(--header-primary);
|
color: var(--header-primary);
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
width: max-content;
|
|
||||||
}
|
}
|
||||||
/*buttons*/
|
/*buttons*/
|
||||||
button {
|
button {
|
||||||
|
@ -278,12 +273,9 @@ select {
|
||||||
.acClientMod {
|
.acClientMod {
|
||||||
height: 18em !important;
|
height: 18em !important;
|
||||||
}
|
}
|
||||||
.acCordwood {
|
|
||||||
height: 8em !important;
|
|
||||||
}
|
|
||||||
.acPrfmMode {
|
.acPrfmMode {
|
||||||
height: 10em !important;
|
height: 10em !important;
|
||||||
}
|
}
|
||||||
.acTray {
|
.acTray {
|
||||||
height: 8em !important;
|
height: 7em !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
|
width: 100%;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
@ -224,22 +225,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ArmCord on MacOS (Why would you do this?) */
|
/* 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 {
|
[armcord-platform="darwin"] .container-2RRFHK {
|
||||||
padding-top: 48px;
|
padding-top: 45px;
|
||||||
top: -48px;
|
top: -45px;
|
||||||
}
|
}
|
||||||
[armcord-platform="darwin"] .titlebar {
|
[armcord-platform="darwin"] .titlebar {
|
||||||
height: 48px;
|
height: 45px;
|
||||||
line-height: 48px;
|
line-height: 45px;
|
||||||
}
|
}
|
||||||
[armcord-platform="darwin"] .titlebar #window-controls-container {
|
[armcord-platform="darwin"] .titlebar #window-controls-container {
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -247,7 +239,7 @@
|
||||||
height: 60%;
|
height: 60%;
|
||||||
line-height: 45px;
|
line-height: 45px;
|
||||||
-webkit-app-region: no-drag;
|
-webkit-app-region: no-drag;
|
||||||
transform: translate(-82px, 4px);
|
transform: translate(-78px, 4px);
|
||||||
}
|
}
|
||||||
|
|
||||||
[armcord-platform="darwin"] .titlebar #window-controls-container:hover #minimize #minimize-icon,
|
[armcord-platform="darwin"] .titlebar #window-controls-container:hover #minimize #minimize-icon,
|
||||||
|
@ -256,13 +248,6 @@
|
||||||
display: list-item;
|
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 {
|
[armcord-platform="darwin"] .titlebar #window-controls-container #quit #quit-icon {
|
||||||
background-color: #79282b;
|
background-color: #79282b;
|
||||||
-webkit-mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTI4OSA2TDIuODE4MDEgMy41MjUxM0wzLjUyNTEyIDIuODE4MDJMNS45OTk5OSA1LjI5Mjg5TDguNDc0ODcgMi44MTgwMkw5LjE4MTk3IDMuNTI1MTNMNi43MDcxIDZMOS4xODE5NyA4LjQ3NDg3TDguNDc0ODcgOS4xODE5OEw1Ljk5OTk5IDYuNzA3MTFMMy41MjUxMiA5LjE4MTk4TDIuODE4MDEgOC40NzQ4N0w1LjI5Mjg5IDZaIiBmaWxsPSJyZ2JhKDEyOCwgNiwgMCwgMSkiLz48L3N2Zz4=")
|
-webkit-mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTI4OSA2TDIuODE4MDEgMy41MjUxM0wzLjUyNTEyIDIuODE4MDJMNS45OTk5OSA1LjI5Mjg5TDguNDc0ODcgMi44MTgwMkw5LjE4MTk3IDMuNTI1MTNMNi43MDcxIDZMOS4xODE5NyA4LjQ3NDg3TDguNDc0ODcgOS4xODE5OEw1Ljk5OTk5IDYuNzA3MTFMMy41MjUxMiA5LjE4MTk4TDIuODE4MDEgOC40NzQ4N0w1LjI5Mjg5IDZaIiBmaWxsPSJyZ2JhKDEyOCwgNiwgMCwgMSkiLz48L3N2Zz4=")
|
||||||
|
@ -290,7 +275,6 @@
|
||||||
|
|
||||||
[armcord-platform="darwin"] .titlebar #window-controls-container #minimize {
|
[armcord-platform="darwin"] .titlebar #window-controls-container #minimize {
|
||||||
background-color: #fac536;
|
background-color: #fac536;
|
||||||
transition: background-color 0.1s ease-in;
|
|
||||||
border: 1px solid #da9e10;
|
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")
|
-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%;
|
no-repeat 50% 50%;
|
||||||
|
@ -300,7 +284,6 @@
|
||||||
}
|
}
|
||||||
[armcord-platform="darwin"] .titlebar #window-controls-container #maximize {
|
[armcord-platform="darwin"] .titlebar #window-controls-container #maximize {
|
||||||
background-color: #39ea49;
|
background-color: #39ea49;
|
||||||
transition: background-color 0.1s ease-in;
|
|
||||||
border: 1px solid #13c11e;
|
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")
|
-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%;
|
no-repeat 50% 50%;
|
||||||
|
@ -310,7 +293,6 @@
|
||||||
}
|
}
|
||||||
[armcord-platform="darwin"] .titlebar #window-controls-container #quit {
|
[armcord-platform="darwin"] .titlebar #window-controls-container #quit {
|
||||||
background-color: #f25056;
|
background-color: #f25056;
|
||||||
transition: background-color 0.1s ease-in;
|
|
||||||
border: 1px solid #d52735;
|
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")
|
-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%;
|
no-repeat 50% 50%;
|
||||||
|
@ -349,7 +331,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
[armcord-platform="darwin"] .window-title {
|
[armcord-platform="darwin"] .window-title {
|
||||||
display: none;
|
content: var(--wordmark-svg);
|
||||||
|
height: 10px;
|
||||||
|
left: 50%;
|
||||||
|
margin-right: 50%;
|
||||||
|
transform: translate(50%, 9.5px);
|
||||||
|
float: right;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[armcord-platform="linux"] .window-title,
|
[armcord-platform="linux"] .window-title,
|
||||||
|
|
17
src/ipc.ts
17
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 {mainWindow} from "./window";
|
import {mainWindow} from "./window";
|
||||||
import {setConfigBulk, getVersion, getConfig, setLang, getLang, getWindowState, packageVersion} from "./utils";
|
import {setConfigBulk, getVersion, getConfig, setLang, getLang, getWindowState} from "./utils";
|
||||||
import {customTitlebar} from "./main";
|
import {customTitlebar} from "./main";
|
||||||
import {createSettingsWindow} from "./settings/main";
|
import {createSettingsWindow} from "./settings/main";
|
||||||
export function registerIpc() {
|
export function registerIpc() {
|
||||||
|
@ -44,24 +44,21 @@ export function registerIpc() {
|
||||||
ipcMain.on("get-app-version", (event) => {
|
ipcMain.on("get-app-version", (event) => {
|
||||||
event.returnValue = getVersion();
|
event.returnValue = getVersion();
|
||||||
});
|
});
|
||||||
ipcMain.on("get-package-version", (event) => {
|
|
||||||
event.returnValue = packageVersion;
|
|
||||||
});
|
|
||||||
ipcMain.on("splashEnd", async (event, arg) => {
|
ipcMain.on("splashEnd", async (event, arg) => {
|
||||||
try {
|
try {
|
||||||
var width = (await getWindowState("width")) ?? 800;
|
var width = await getWindowState("width") ?? 800;
|
||||||
var height = (await getWindowState("height")) ?? 600;
|
var height= await getWindowState("height") ?? 600;
|
||||||
var isMaximized = (await getWindowState("isMaximized")) ?? false;
|
var isMaximized = await getWindowState("isMaximized") ?? false;
|
||||||
} catch (e) {
|
} 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);
|
mainWindow.setSize(800, 600);
|
||||||
}
|
}
|
||||||
if (isMaximized) {
|
if (isMaximized) {
|
||||||
mainWindow.setSize(800, 600); //just so the whole thing doesn't cover whole screen
|
mainWindow.setSize(800, 600); //just so the whole thing doesn't cover whole screen
|
||||||
mainWindow.maximize();
|
mainWindow.maximize()
|
||||||
} else {
|
} else {
|
||||||
mainWindow.setSize(width, height);
|
mainWindow.setSize(width, height);
|
||||||
console.log("[Window state manager] Not maximized.");
|
console.log("[Window state manager] Not maximized.")
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ipcMain.on("restart", (event, arg) => {
|
ipcMain.on("restart", (event, arg) => {
|
||||||
|
|
|
@ -43,7 +43,7 @@ app.whenReady().then(async () => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await init();
|
await init()
|
||||||
session.fromPartition("some-partition").setPermissionRequestHandler((webContents, permission, callback) => {
|
session.fromPartition("some-partition").setPermissionRequestHandler((webContents, permission, callback) => {
|
||||||
if (permission === "notifications") {
|
if (permission === "notifications") {
|
||||||
// Approves the permissions request
|
// Approves the permissions request
|
||||||
|
@ -55,6 +55,7 @@ app.whenReady().then(async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
app.on("activate", async function () {
|
app.on("activate", async function () {
|
||||||
if (BrowserWindow.getAllWindows().length === 0) await init();
|
if (BrowserWindow.getAllWindows().length === 0)
|
||||||
|
await init()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
58
src/menu.ts
58
src/menu.ts
|
@ -5,62 +5,56 @@ import {getConfig} from "./utils";
|
||||||
function paste(contents: any) {
|
function paste(contents: any) {
|
||||||
const contentTypes = clipboard.availableFormats().toString();
|
const contentTypes = clipboard.availableFormats().toString();
|
||||||
//Workaround: fix pasting the images.
|
//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());
|
clipboard.writeImage(clipboard.readImage());
|
||||||
}
|
}
|
||||||
contents.paste();
|
contents.paste();
|
||||||
}
|
}
|
||||||
export async function setMenu() {
|
export async function setMenu() {
|
||||||
if ((await getConfig("alternativePaste")) == true) {
|
if (await getConfig("alternativePaste") == true) {
|
||||||
mainWindow.on("focus", function () {
|
mainWindow.on("focus", function () {
|
||||||
console.log("[Window state manager] Focus");
|
console.log("[Window state manager] Focus")
|
||||||
globalShortcut.register("CmdOrCtrl+V", function () {
|
globalShortcut.register("CmdOrCtrl+V", function () {
|
||||||
if (mainWindow.isFocused()) {
|
if (mainWindow.isFocused()) {
|
||||||
paste(mainWindow.webContents);
|
paste(mainWindow.webContents)
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
mainWindow.on("show", function () {
|
mainWindow.on("show", function () {
|
||||||
console.log("[Window state manager] Show");
|
console.log("[Window state manager] Show")
|
||||||
mainWindow.focus();
|
mainWindow.focus()
|
||||||
globalShortcut.register("CmdOrCtrl+V", function () {
|
globalShortcut.register("CmdOrCtrl+V", function () {
|
||||||
if (mainWindow.isFocused()) {
|
if (mainWindow.isFocused()) {
|
||||||
paste(mainWindow.webContents);
|
paste(mainWindow.webContents)
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
mainWindow.on("blur", function () {
|
mainWindow.on("blur", function () {
|
||||||
console.log("[Window state manager] Defocus");
|
console.log("[Window state manager] Defocus")
|
||||||
globalShortcut.unregister("CmdOrCtrl+V");
|
globalShortcut.unregister("CmdOrCtrl+V")
|
||||||
});
|
})
|
||||||
mainWindow.on("hide", function () {
|
mainWindow.on("hide", function () {
|
||||||
console.log("[Window state manager] Hide");
|
console.log("[Window state manager] Hide")
|
||||||
globalShortcut.unregister("CmdOrCtrl+V");
|
globalShortcut.unregister("CmdOrCtrl+V")
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
var template: Electron.MenuItemConstructorOptions[] = [
|
var template: Electron.MenuItemConstructorOptions[] = [{
|
||||||
{
|
|
||||||
label: "ArmCord",
|
label: "ArmCord",
|
||||||
submenu: [
|
submenu: [
|
||||||
{label: "About ArmCord", role: "about"},//orderFrontStandardAboutPanel
|
{label: "About ArmCord", role: "about"},//orderFrontStandardAboutPanel
|
||||||
{type: "separator"},
|
{type: "separator"},
|
||||||
{
|
{
|
||||||
label: "Developer tools",
|
label: "Developer tools", accelerator: "CmdOrCtrl+Shift+I", click: function () {
|
||||||
accelerator: "CmdOrCtrl+Shift+I",
|
mainWindow.webContents.openDevTools()
|
||||||
click: function () {
|
|
||||||
mainWindow.webContents.openDevTools();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Quit",
|
label: "Quit", accelerator: "CmdOrCtrl+Q", click: function () {
|
||||||
accelerator: "CmdOrCtrl+Q",
|
|
||||||
click: function () {
|
|
||||||
app.quit();
|
app.quit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
label: "Edit",
|
label: "Edit",
|
||||||
submenu: [
|
submenu: [
|
||||||
{label: "Undo", accelerator: "CmdOrCtrl+Z", role: "undo"},
|
{label: "Undo", accelerator: "CmdOrCtrl+Z", role: "undo"},
|
||||||
|
@ -69,16 +63,14 @@ export async function setMenu() {
|
||||||
{label: "Cut", accelerator: "CmdOrCtrl+X", role: "cut"},
|
{label: "Cut", accelerator: "CmdOrCtrl+X", role: "cut"},
|
||||||
{label: "Copy", accelerator: "CmdOrCtrl+C", role: "copy"},
|
{label: "Copy", accelerator: "CmdOrCtrl+C", role: "copy"},
|
||||||
{
|
{
|
||||||
label: "Paste",
|
label: "Paste", accelerator: "CmdOrCtrl+V", click: function () {
|
||||||
accelerator: "CmdOrCtrl+V",
|
paste(mainWindow.webContents)
|
||||||
click: function () {
|
|
||||||
paste(mainWindow.webContents);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{label: "Select All", accelerator: "CmdOrCtrl+A", role: "selectAll"}
|
{label: "Select All", accelerator: "CmdOrCtrl+A", role: "selectAll"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
]
|
||||||
|
|
||||||
Menu.setApplicationMenu(Menu.buildFromTemplate(template));
|
Menu.setApplicationMenu(Menu.buildFromTemplate(template));
|
||||||
}
|
}
|
|
@ -21,7 +21,6 @@ contextBridge.exposeInMainWorld("armcord", {
|
||||||
return result;
|
return result;
|
||||||
}),
|
}),
|
||||||
version: ipcRenderer.sendSync("get-app-version", "app-version"),
|
version: ipcRenderer.sendSync("get-app-version", "app-version"),
|
||||||
packageVersion: ipcRenderer.sendSync("get-package-version", "app-version"),
|
|
||||||
getDisplayMediaSelector: getDisplayMediaSelector,
|
getDisplayMediaSelector: getDisplayMediaSelector,
|
||||||
openSettingsWindow: () => ipcRenderer.send("openSettingsWindow")
|
openSettingsWindow: () => ipcRenderer.send("openSettingsWindow")
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,7 +8,6 @@ import {sleep, addStyle, injectJS, addScript} from "../utils";
|
||||||
import {ipcRenderer} from "electron";
|
import {ipcRenderer} from "electron";
|
||||||
import {injectMobileStuff} from "./mobile";
|
import {injectMobileStuff} from "./mobile";
|
||||||
var version = ipcRenderer.sendSync("get-app-version", "app-version");
|
var version = ipcRenderer.sendSync("get-app-version", "app-version");
|
||||||
var channel = ipcRenderer.sendSync("channel");
|
|
||||||
async function updateLang() {
|
async function updateLang() {
|
||||||
if (window.location.href.indexOf("setup.html") > -1) {
|
if (window.location.href.indexOf("setup.html") > -1) {
|
||||||
console.log("Setup, skipping lang update");
|
console.log("Setup, skipping lang update");
|
||||||
|
@ -38,7 +37,7 @@ if (window.location.href.indexOf("splash.html") > -1) {
|
||||||
console.log("Skipping titlebar injection and client mod injection.");
|
console.log("Skipping titlebar injection and client mod injection.");
|
||||||
} else {
|
} else {
|
||||||
if (ipcRenderer.sendSync("titlebar")) {
|
if (ipcRenderer.sendSync("titlebar")) {
|
||||||
if (channel == "hummus") {
|
if (ipcRenderer.sendSync("channel")) {
|
||||||
injectHummusTitlebar();
|
injectHummusTitlebar();
|
||||||
} else {
|
} else {
|
||||||
injectTitlebar();
|
injectTitlebar();
|
||||||
|
|
|
@ -64,18 +64,9 @@ export function injectHummusTitlebar() {
|
||||||
elem.classList.add("win-buttons-light");
|
elem.classList.add("win-buttons-light");
|
||||||
document.getElementsByClassName("titlebar")[0].appendChild(elem);
|
document.getElementsByClassName("titlebar")[0].appendChild(elem);
|
||||||
document.body.setAttribute("customTitlebar", "");
|
document.body.setAttribute("customTitlebar", "");
|
||||||
document.body.setAttribute("hummus", "");
|
|
||||||
document.body.setAttribute("armcord-platform", os.platform());
|
document.body.setAttribute("armcord-platform", os.platform());
|
||||||
addStyle(`
|
addStyle(".chat>.title-wrap {width: 87% !important;}");
|
||||||
html, body {
|
addStyle(".friends-header {width: 91% !important;}");
|
||||||
background-color: #1e2124;
|
|
||||||
}
|
|
||||||
|
|
||||||
.friends-header,
|
|
||||||
.chat > .title-wrap {
|
|
||||||
float: right !important;
|
|
||||||
padding-right: 140px !important;
|
|
||||||
}`);
|
|
||||||
var minimize = document.getElementById("minimize");
|
var minimize = document.getElementById("minimize");
|
||||||
var maximize = document.getElementById("maximize");
|
var maximize = document.getElementById("maximize");
|
||||||
var quit = document.getElementById("quit");
|
var quit = document.getElementById("quit");
|
||||||
|
|
|
@ -5,9 +5,6 @@
|
||||||
<title>ArmCord Settings</title>
|
<title>ArmCord Settings</title>
|
||||||
<style>
|
<style>
|
||||||
@import url("../content/css/settings.css");
|
@import url("../content/css/settings.css");
|
||||||
.acAdvSettings {
|
|
||||||
height: 19em !important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -82,7 +79,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="switch acCordwood">
|
<div class="switch acAltPaste">
|
||||||
<label class="header2" id="settings-cordwood">Cordwood client mod</label>
|
<label class="header2" id="settings-cordwood">Cordwood client mod</label>
|
||||||
<input class="tgl tgl-light left" id="cordwood" type="checkbox" />
|
<input class="tgl tgl-light left" id="cordwood" type="checkbox" />
|
||||||
<label class="tgl-btn left" for="cordwood"></label>
|
<label class="tgl-btn left" for="cordwood"></label>
|
||||||
|
@ -119,16 +116,14 @@
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<div class="switch acAdvSettings">
|
<h1 class="center advancedText">⚠️Advanced user zone⚠️</h1>
|
||||||
<h1 class="center advancedText">⚠️ Advanced User Zone ⚠️</h1>
|
<button id="settings-pluginsFolder" class="center">Open plugins folder</button>
|
||||||
<button id="settings-pluginsFolder" class="center">Open Plugins Folder</button>
|
|
||||||
<br />
|
<br />
|
||||||
<button id="settings-themesFolder" class="center">Open Themes Folder</button>
|
<button id="settings-themesFolder" class="center">Open themes folder</button>
|
||||||
<br />
|
<br />
|
||||||
<button id="settings-storageFolder" class="center">Open Storage Folder</button>
|
<button id="settings-storageFolder" class="center">Open storage folder</button>
|
||||||
<br />
|
<br />
|
||||||
<button id="settings-copyDebugInfo" class="center">Copy Debug Info</button>
|
<button id="settings-copyDebugInfo" class="center">Copy debug info</button>
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
async function loadLang() {
|
async function loadLang() {
|
||||||
|
|
|
@ -29,14 +29,6 @@ export function createSettingsWindow() {
|
||||||
preload: path.join(__dirname, "preload.js")
|
preload: path.join(__dirname, "preload.js")
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
async function settingsLoadPage() {
|
|
||||||
if ((await getConfig("channel")) == "hummus") {
|
|
||||||
settingsWindow.loadURL(`file://${__dirname}/hummus.html`);
|
|
||||||
} else {
|
|
||||||
settingsWindow.loadURL(`file://${__dirname}/settings.html`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ipcMain.on("saveSettings", (event, args: Settings) => {
|
ipcMain.on("saveSettings", (event, args: Settings) => {
|
||||||
console.log(args);
|
console.log(args);
|
||||||
setConfigBulk(args);
|
setConfigBulk(args);
|
||||||
|
@ -75,7 +67,7 @@ export function createSettingsWindow() {
|
||||||
shell.openExternal(url);
|
shell.openExternal(url);
|
||||||
return {action: "deny"};
|
return {action: "deny"};
|
||||||
});
|
});
|
||||||
settingsLoadPage();
|
settingsWindow.loadURL(`file://${__dirname}/settings.html`);
|
||||||
settingsWindow.on("close", (event: Event) => {
|
settingsWindow.on("close", (event: Event) => {
|
||||||
ipcMain.removeHandler("getSetting");
|
ipcMain.removeHandler("getSetting");
|
||||||
ipcMain.removeAllListeners("saveSettings");
|
ipcMain.removeAllListeners("saveSettings");
|
||||||
|
|
|
@ -5,9 +5,6 @@
|
||||||
<title>ArmCord Settings</title>
|
<title>ArmCord Settings</title>
|
||||||
<style>
|
<style>
|
||||||
@import url("../content/css/settings.css");
|
@import url("../content/css/settings.css");
|
||||||
.acAdvSettings {
|
|
||||||
height: 26em !important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -171,22 +168,21 @@
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<div class="switch acAdvSettings">
|
<h1 class="center advancedText">⚠️Advanced user zone⚠️</h1>
|
||||||
<h1 class="center advancedText">⚠️ Advanced User Zone ⚠️</h1>
|
<div class="switch acAltPaste">
|
||||||
<br />
|
<label class="header2" id="settings-skipSplash">Skip splash screen (experimental)</label>
|
||||||
<label class="header2" id="settings-skipSplash">Skip Splash Screen (Experimental)</label>
|
|
||||||
<input class="tgl tgl-light left" id="skipSplash" type="checkbox" />
|
<input class="tgl tgl-light left" id="skipSplash" type="checkbox" />
|
||||||
<label class="tgl-btn left" for="skipSplash"></label>
|
<label class="tgl-btn left" for="skipSplash"></label>
|
||||||
<p class="description2">Skips ArmCord splash screen when you start up the app.</p>
|
<p class="description2">Skips ArmCord splash screen when you start up the app.</p>
|
||||||
<br />
|
|
||||||
<button id="settings-pluginsFolder" class="center">Open Plugins Folder</button>
|
|
||||||
<br />
|
|
||||||
<button id="settings-themesFolder" class="center">Open Themes Folder</button>
|
|
||||||
<br />
|
|
||||||
<button id="settings-storageFolder" class="center">Open Storage Folder</button>
|
|
||||||
<br />
|
|
||||||
<button id="settings-copyDebugInfo" class="center">Copy Debug Info</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
|
<button id="settings-pluginsFolder" class="center">Open plugins folder</button>
|
||||||
|
<br />
|
||||||
|
<button id="settings-themesFolder" class="center">Open themes folder</button>
|
||||||
|
<br />
|
||||||
|
<button id="settings-storageFolder" class="center">Open storage folder</button>
|
||||||
|
<br />
|
||||||
|
<button id="settings-copyDebugInfo" class="center">Copy debug info</button>
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
async function loadLang() {
|
async function loadLang() {
|
||||||
|
|
19
src/tray.ts
19
src/tray.ts
|
@ -6,10 +6,11 @@ import * as path from "path";
|
||||||
import { createSettingsWindow } from "./settings/main";
|
import { createSettingsWindow } from "./settings/main";
|
||||||
let tray: any = null;
|
let tray: any = null;
|
||||||
app.whenReady().then(async () => {
|
app.whenReady().then(async () => {
|
||||||
let finishedSetup = await getConfig("doneSetup");
|
let finishedSetup = (await getConfig("doneSetup"));
|
||||||
var trayIcon = (await getConfig("trayIcon")) ?? "ac_plug_colored";
|
var trayIcon = (await getConfig("trayIcon")) ?? "ac_plug_colored";
|
||||||
let trayPath = nativeImage.createFromPath(path.join(__dirname, "../", `/assets/${trayIcon}.png`));
|
let trayPath = nativeImage.createFromPath(path.join(__dirname, "../", `/assets/${trayIcon}.png`));
|
||||||
if (process.platform === "darwin" && trayPath.getSize().height > 22) trayPath = trayIcon.resize({height: 22});
|
if(process.platform === "darwin" && trayPath.getSize().height > 22)
|
||||||
|
trayPath = trayIcon.resize({height: 22});
|
||||||
if ((await getConfig("windowStyle")) == "basic") {
|
if ((await getConfig("windowStyle")) == "basic") {
|
||||||
var clientName = (await getConfig("clientName")) ?? "ArmCord";
|
var clientName = (await getConfig("clientName")) ?? "ArmCord";
|
||||||
tray = new Tray(trayPath);
|
tray = new Tray(trayPath);
|
||||||
|
@ -42,18 +43,18 @@ app.whenReady().then(async () => {
|
||||||
{
|
{
|
||||||
label: `Quit ${clientName}`,
|
label: `Quit ${clientName}`,
|
||||||
click: function () {
|
click: function () {
|
||||||
let [width, height] = mainWindow.getSize();
|
let [width, height] = mainWindow.getSize()
|
||||||
setWindowState({
|
setWindowState({
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
isMaximized: mainWindow.isMaximized()
|
isMaximized: mainWindow.isMaximized()
|
||||||
});
|
})
|
||||||
app.quit();
|
app.quit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
tray.setToolTip(clientName);
|
tray.setToolTip(clientName);
|
||||||
tray.setContextMenu(contextMenu);
|
tray.setContextMenu(contextMenu);
|
||||||
|
@ -83,6 +84,7 @@ app.whenReady().then(async () => {
|
||||||
{
|
{
|
||||||
label: `${clientName} ` + app.getVersion(),
|
label: `${clientName} ` + app.getVersion(),
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "separator"
|
type: "separator"
|
||||||
|
@ -121,7 +123,8 @@ app.whenReady().then(async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
tray.setToolTip(clientName);
|
tray.setToolTip(clientName);
|
||||||
tray.on("click", function () {
|
tray.on('click', function(){
|
||||||
mainWindow.show();
|
mainWindow.show()
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
26
src/utils.ts
26
src/utils.ts
|
@ -53,17 +53,15 @@ export function setup() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get the version value from the "package.json" file
|
|
||||||
export var packageVersion = require("../package.json").version;
|
|
||||||
|
|
||||||
|
//I'm too lazy to replace every mf reference so :p
|
||||||
export function getVersion() {
|
export function getVersion() {
|
||||||
//Checks if the app version # has 4 sections (3.1.0.0) instead of 3 (3.1.0) / Shitty way to check if Kernel Mod is installed
|
//Checks if the version # has 4 sections (3.1.0.0) instead of 3 (3.1.0) / Shitty way to check if Kernel Mod is installed
|
||||||
if ((app.getVersion() == packageVersion) == false) {
|
if (((app.getVersion()).split('.').length > 3) == true) {
|
||||||
return `${packageVersion} [Kernel Mod]`;
|
return app.getVersion().split('.')[0] + "." + app.getVersion().split('.')[1] + "." + app.getVersion().split('.')[2] + " [Kernel Mod]";
|
||||||
} else {
|
} else {
|
||||||
return packageVersion;
|
return app.getVersion();
|
||||||
}
|
}}
|
||||||
}
|
|
||||||
export async function injectJS(inject: string) {
|
export async function injectJS(inject: string) {
|
||||||
const js = await (await fetch(`${inject}`)).text();
|
const js = await (await fetch(`${inject}`)).text();
|
||||||
|
|
||||||
|
@ -134,8 +132,8 @@ export async function getLang(object: string) {
|
||||||
let parsed = JSON.parse(rawdata);
|
let parsed = JSON.parse(rawdata);
|
||||||
language = parsed["lang"];
|
language = parsed["lang"];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("Language config file doesn't exist. Fallback to English.");
|
console.log("Language config file doesn't exist. Fallback to English.")
|
||||||
language = "en-US";
|
language = "en-US"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (language.length == 2) {
|
if (language.length == 2) {
|
||||||
|
@ -148,11 +146,11 @@ export async function getLang(object: string) {
|
||||||
let rawdata = fs.readFileSync(langPath, "utf-8");
|
let rawdata = fs.readFileSync(langPath, "utf-8");
|
||||||
let parsed = JSON.parse(rawdata);
|
let parsed = JSON.parse(rawdata);
|
||||||
if (parsed[object] == undefined) {
|
if (parsed[object] == undefined) {
|
||||||
console.log(object + " is undefined in " + language);
|
console.log(object + " is undefined in " + language)
|
||||||
langPath = path.join(__dirname, "../", "/assets/lang/en-US.json");
|
langPath = path.join(__dirname, "../", "/assets/lang/en-US.json");
|
||||||
rawdata = fs.readFileSync(langPath, "utf-8");
|
rawdata = fs.readFileSync(langPath, "utf-8");
|
||||||
parsed = JSON.parse(rawdata);
|
parsed = JSON.parse(rawdata);
|
||||||
return parsed[object];
|
return parsed[object]
|
||||||
} else {
|
} else {
|
||||||
return parsed[object];
|
return parsed[object];
|
||||||
}
|
}
|
||||||
|
@ -193,8 +191,8 @@ export interface Settings {
|
||||||
automaticPatches: boolean;
|
automaticPatches: boolean;
|
||||||
alternativePaste: boolean;
|
alternativePaste: boolean;
|
||||||
mods: string;
|
mods: string;
|
||||||
mobileMode: boolean;
|
mobileMode: boolean,
|
||||||
skipSplash: boolean;
|
skipSplash: boolean,
|
||||||
performanceMode: string;
|
performanceMode: string;
|
||||||
inviteWebsocket: boolean;
|
inviteWebsocket: boolean;
|
||||||
trayIcon: string;
|
trayIcon: string;
|
||||||
|
|
|
@ -14,7 +14,7 @@ import os from "os";
|
||||||
export var icon: string;
|
export var icon: string;
|
||||||
export let mainWindow: BrowserWindow;
|
export let mainWindow: BrowserWindow;
|
||||||
export let inviteWindow: BrowserWindow;
|
export let inviteWindow: BrowserWindow;
|
||||||
var osType = os.type();
|
var osType = os.type()
|
||||||
|
|
||||||
contextMenu({
|
contextMenu({
|
||||||
showSaveImageAs: true,
|
showSaveImageAs: true,
|
||||||
|
@ -27,12 +27,11 @@ async function doAfterDefiningTheWindow() {
|
||||||
checkIfConfigIsBroken();
|
checkIfConfigIsBroken();
|
||||||
registerIpc();
|
registerIpc();
|
||||||
if (await getConfig("mobileMode")) {
|
if (await getConfig("mobileMode")) {
|
||||||
mainWindow.webContents.userAgent =
|
mainWindow.webContents.userAgent = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.149 Mobile Safari/537.36"
|
||||||
"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.149 Mobile Safari/537.36";
|
|
||||||
} else {
|
} else {
|
||||||
// A little sloppy but it works :p
|
// A little sloppy but it works :p
|
||||||
if (osType == "Windows_NT") {
|
if (osType == 'Windows_NT') {
|
||||||
osType = "Windows " + os.release().split(".")[0] + " (" + os.release() + ")";
|
osType = "Windows " + os.release().split('.')[0] + " (" + os.release() + ")";
|
||||||
}
|
}
|
||||||
mainWindow.webContents.userAgent = `Mozilla/5.0 (X11; ${osType} ${os.arch()}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36`; //fake useragent for screenshare to work
|
mainWindow.webContents.userAgent = `Mozilla/5.0 (X11; ${osType} ${os.arch()}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36`; //fake useragent for screenshare to work
|
||||||
}
|
}
|
||||||
|
@ -84,29 +83,26 @@ async function doAfterDefiningTheWindow() {
|
||||||
fs.mkdirSync(themesFolder);
|
fs.mkdirSync(themesFolder);
|
||||||
console.log("Created missing theme folder");
|
console.log("Created missing theme folder");
|
||||||
}
|
}
|
||||||
mainWindow.webContents.on("did-finish-load", () => {
|
mainWindow.webContents.on('did-finish-load', () => {
|
||||||
fs.readdirSync(themesFolder).forEach((file) => {
|
fs.readdirSync(themesFolder).forEach((file) => {
|
||||||
try {
|
try {
|
||||||
const manifest = fs.readFileSync(`${themesFolder}/${file}/manifest.json`, "utf8");
|
const manifest = fs.readFileSync(`${themesFolder}/${file}/manifest.json`, "utf8");
|
||||||
var themeFile = JSON.parse(manifest);
|
var themeFile = JSON.parse(manifest);
|
||||||
mainWindow.webContents.send(
|
mainWindow.webContents.send("themeLoader", fs.readFileSync(`${themesFolder}/${file}/${themeFile.theme}`, "utf-8"))
|
||||||
"themeLoader",
|
|
||||||
fs.readFileSync(`${themesFolder}/${file}/${themeFile.theme}`, "utf-8")
|
|
||||||
);
|
|
||||||
console.log(`%cLoaded ${themeFile.name} made by ${themeFile.author}`, "color:red");
|
console.log(`%cLoaded ${themeFile.name} made by ${themeFile.author}`, "color:red");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
setMenu();
|
setMenu()
|
||||||
mainWindow.on("close", async (e) => {
|
mainWindow.on("close", async (e) => {
|
||||||
let [width, height] = mainWindow.getSize();
|
let [width, height] = mainWindow.getSize()
|
||||||
setWindowState({
|
setWindowState({
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
isMaximized: mainWindow.isMaximized()
|
isMaximized: mainWindow.isMaximized()
|
||||||
});
|
})
|
||||||
if (await getConfig("minimizeToTray")) {
|
if (await getConfig("minimizeToTray")) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
mainWindow.hide();
|
mainWindow.hide();
|
||||||
|
@ -115,30 +111,22 @@ async function doAfterDefiningTheWindow() {
|
||||||
app.quit();
|
app.quit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
mainWindow.on('maximize', () => {
|
||||||
mainWindow.on("focus", () => {
|
mainWindow.webContents.executeJavaScript(`document.body.setAttribute("isMaximized", "");`)
|
||||||
mainWindow.webContents.executeJavaScript(`document.body.removeAttribute("unFocused");`);
|
})
|
||||||
});
|
mainWindow.on('unmaximize', () => {
|
||||||
mainWindow.on("blur", () => {
|
mainWindow.webContents.executeJavaScript(`document.body.removeAttribute("isMaximized");`)
|
||||||
mainWindow.webContents.executeJavaScript(`document.body.setAttribute("unFocused", "");`);
|
})
|
||||||
});
|
|
||||||
|
|
||||||
mainWindow.on("maximize", () => {
|
|
||||||
mainWindow.webContents.executeJavaScript(`document.body.setAttribute("isMaximized", "");`);
|
|
||||||
});
|
|
||||||
mainWindow.on("unmaximize", () => {
|
|
||||||
mainWindow.webContents.executeJavaScript(`document.body.removeAttribute("isMaximized");`);
|
|
||||||
});
|
|
||||||
console.log(contentPath);
|
console.log(contentPath);
|
||||||
if ((await getConfig("inviteWebsocket")) == true) {
|
if ((await getConfig("inviteWebsocket")) == true) {
|
||||||
await startServer();
|
await startServer();
|
||||||
}
|
}
|
||||||
if (firstRun) {
|
if (firstRun) {
|
||||||
await setLang(Intl.DateTimeFormat().resolvedOptions().locale);
|
await setLang(Intl.DateTimeFormat().resolvedOptions().locale)
|
||||||
mainWindow.setSize(390, 470);
|
mainWindow.setSize(390, 470);
|
||||||
await mainWindow.loadFile(path.join(__dirname, "/content/setup.html"));
|
await mainWindow.loadFile(path.join(__dirname, "/content/setup.html"));
|
||||||
} else {
|
} else {
|
||||||
if ((await getConfig("skipSplash")) == true) {
|
if (await getConfig("skipSplash") == true) {
|
||||||
switch (await getConfig("channel")) {
|
switch (await getConfig("channel")) {
|
||||||
case "stable":
|
case "stable":
|
||||||
mainWindow.loadURL("https://discord.com/app");
|
mainWindow.loadURL("https://discord.com/app");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue