mirror of
				https://github.com/smartfrigde/armcord.git
				synced 2024-08-14 23:56:58 +00:00 
			
		
		
		
	cleaning up
This commit is contained in:
		
							parent
							
								
									57fbc45315
								
							
						
					
					
						commit
						5d19f1844b
					
				
					 12 changed files with 26 additions and 28 deletions
				
			
		|  | @ -26,7 +26,7 @@ | ||||||
|     "@types/node": "^17.0.42", |     "@types/node": "^17.0.42", | ||||||
|     "@types/ws": "^8.5.3", |     "@types/ws": "^8.5.3", | ||||||
|     "copyfiles": "^2.4.1", |     "copyfiles": "^2.4.1", | ||||||
|     "electron": "^19.0.4", |     "electron": "^19.0.7", | ||||||
|     "electron-builder": "^23.0.3", |     "electron-builder": "^23.0.3", | ||||||
|     "husky": "^8.0.1", |     "husky": "^8.0.1", | ||||||
|     "prettier": "^2.7.0", |     "prettier": "^2.7.0", | ||||||
|  | @ -47,7 +47,7 @@ | ||||||
|     "linux": { |     "linux": { | ||||||
|       "icon": "build/icon.icns", |       "icon": "build/icon.icns", | ||||||
|       "category": "Network", |       "category": "Network", | ||||||
|       "maintainer": "smartfrigde@gmail.com", |       "maintainer": "smartfridge@vivaldi.net", | ||||||
|       "target": [ |       "target": [ | ||||||
|         "deb", |         "deb", | ||||||
|         "tar.gz", |         "tar.gz", | ||||||
|  |  | ||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -90,18 +90,18 @@ button { | ||||||
|     border: none; |     border: none; | ||||||
|     border-radius: 5px; |     border-radius: 5px; | ||||||
|     padding: 8px; |     padding: 8px; | ||||||
|     transition: .17s ease; |     transition: 0.17s ease; | ||||||
| } | } | ||||||
| button:hover { | button:hover { | ||||||
|     background: var(--brand-experiment-560); |     background: var(--brand-experiment-560); | ||||||
|     cursor: pointer; |     cursor: pointer; | ||||||
|     transition: .17s ease; |     transition: 0.17s ease; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| button:active { | button:active { | ||||||
|     background: var(--brand-experiment-600); |     background: var(--brand-experiment-600); | ||||||
|     cursor: pointer; |     cursor: pointer; | ||||||
|     transition: .17s ease; |     transition: 0.17s ease; | ||||||
| } | } | ||||||
| #save { | #save { | ||||||
|     font-size: 15px; |     font-size: 15px; | ||||||
|  | @ -200,4 +200,4 @@ select { | ||||||
|     text-overflow: ellipsis; |     text-overflow: ellipsis; | ||||||
|     white-space: nowrap; |     white-space: nowrap; | ||||||
|     outline: none !important; |     outline: none !important; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -135,18 +135,18 @@ button { | ||||||
|     border: none; |     border: none; | ||||||
|     border-radius: 4px; |     border-radius: 4px; | ||||||
|     padding: 8px 20px; |     padding: 8px 20px; | ||||||
|     transition: .17s ease; |     transition: 0.17s ease; | ||||||
| } | } | ||||||
| button:hover { | button:hover { | ||||||
|     background: var(--brand-experiment-560); |     background: var(--brand-experiment-560); | ||||||
|     cursor: pointer; |     cursor: pointer; | ||||||
|     transition: .17s ease; |     transition: 0.17s ease; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| button:active { | button:active { | ||||||
|     background: var(--brand-experiment-600); |     background: var(--brand-experiment-600); | ||||||
|     cursor: pointer; |     cursor: pointer; | ||||||
|     transition: .17s ease; |     transition: 0.17s ease; | ||||||
| } | } | ||||||
| /* }}} */ | /* }}} */ | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -136,7 +136,6 @@ | ||||||
|         no-repeat 50% 50%; |         no-repeat 50% 50%; | ||||||
|     mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' width='25' height='25'%3E%3Cstyle%3E.a%7Bfill:%23808080%7D%3C/style%3E%3Ccircle class='a' cx='15' cy='15' r='15'/%3E%3C/svg%3E") |     mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' width='25' height='25'%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%; | ||||||
|      |  | ||||||
| } | } | ||||||
| [armcord-platform="linux"] .titlebar #window-controls-container #quit:active { | [armcord-platform="linux"] .titlebar #window-controls-container #quit:active { | ||||||
|     background-color: var(--brand-experiment-600); |     background-color: var(--brand-experiment-600); | ||||||
|  | @ -255,7 +254,7 @@ | ||||||
|         no-repeat 50% 50%; |         no-repeat 50% 50%; | ||||||
|     mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTI4OSA2TDIuODE4MDEgMy41MjUxM0wzLjUyNTEyIDIuODE4MDJMNS45OTk5OSA1LjI5Mjg5TDguNDc0ODcgMi44MTgwMkw5LjE4MTk3IDMuNTI1MTNMNi43MDcxIDZMOS4xODE5NyA4LjQ3NDg3TDguNDc0ODcgOS4xODE5OEw1Ljk5OTk5IDYuNzA3MTFMMy41MjUxMiA5LjE4MTk4TDIuODE4MDEgOC40NzQ4N0w1LjI5Mjg5IDZaIiBmaWxsPSJyZ2JhKDEyOCwgNiwgMCwgMSkiLz48L3N2Zz4=") |     mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTI4OSA2TDIuODE4MDEgMy41MjUxM0wzLjUyNTEyIDIuODE4MDJMNS45OTk5OSA1LjI5Mjg5TDguNDc0ODcgMi44MTgwMkw5LjE4MTk3IDMuNTI1MTNMNi43MDcxIDZMOS4xODE5NyA4LjQ3NDg3TDguNDc0ODcgOS4xODE5OEw1Ljk5OTk5IDYuNzA3MTFMMy41MjUxMiA5LjE4MTk4TDIuODE4MDEgOC40NzQ4N0w1LjI5Mjg5IDZaIiBmaWxsPSJyZ2JhKDEyOCwgNiwgMCwgMSkiLz48L3N2Zz4=") | ||||||
|         no-repeat 50% 50%; |         no-repeat 50% 50%; | ||||||
|         transform: translate(-0.3px, -11.7px); |     transform: translate(-0.3px, -11.7px); | ||||||
| } | } | ||||||
| [armcord-platform="darwin"] .titlebar #window-controls-container #minimize #minimize-icon { | [armcord-platform="darwin"] .titlebar #window-controls-container #minimize #minimize-icon { | ||||||
|     background-color: #7d631b; |     background-color: #7d631b; | ||||||
|  | @ -263,7 +262,7 @@ | ||||||
|         no-repeat 50% 50%; |         no-repeat 50% 50%; | ||||||
|     mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTAgNS4zOTk5OUgyVjYuNTk5OTlIMTBWNS4zOTk5OVoiIGZpbGw9IiM5ODY4MDEiLz48L3N2Zz4=") |     mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTAgNS4zOTk5OUgyVjYuNTk5OTlIMTBWNS4zOTk5OVoiIGZpbGw9IiM5ODY4MDEiLz48L3N2Zz4=") | ||||||
|         no-repeat 50% 50%; |         no-repeat 50% 50%; | ||||||
|         transform: translate(-0px, -11.7px); |     transform: translate(-0px, -11.7px); | ||||||
| } | } | ||||||
| [armcord-platform="darwin"] .titlebar #window-controls-container #maximize #maximize-icon { | [armcord-platform="darwin"] .titlebar #window-controls-container #maximize #maximize-icon { | ||||||
|     background-color: #1d7525; |     background-color: #1d7525; | ||||||
|  | @ -271,7 +270,7 @@ | ||||||
|         no-repeat 50% 50%; |         no-repeat 50% 50%; | ||||||
|     mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOC41ODgyMyA2Ljk5MDE1TDUuMDA5NzkgMy40MTE3QzQuODU1ODMgMy4yNTc3NCA0Ljk1ODYgMi45OTQyMiA1LjE3NjE0IDIuOTg1MTRMOC45MTA0MiAyLjgyOTMxQzkuMDU2NTggMi44MjMyMSA5LjE3NjczIDIuOTQzMzUgOS4xNzA2MyAzLjA4OTUyTDkuMDE0NzkgNi44MjM4QzkuMDA1NzEgNy4wNDEzNCA4Ljc0MjE5IDcuMTQ0MTEgOC41ODgyMyA2Ljk5MDE1WiIgZmlsbD0iIzEyNUUxRSIvPjxwYXRoIGQ9Ik0zLjQxMTc3IDUuMDA5ODJMNi45OTAyMSA4LjU4ODI3QzcuMTQ0MTcgOC43NDIyMyA3LjA0MTQgOS4wMDU3NSA2LjgyMzg2IDkuMDE0ODNMMy4wODk1OCA5LjE3MDY2QzIuOTQzNDIgOS4xNzY3NiAyLjgyMzI3IDkuMDU2NjEgMi44MjkzNyA4LjkxMDQ1TDIuOTg1MjEgNS4xNzYxN0MyLjk5NDI5IDQuOTU4NjMgMy4yNTc4MSA0Ljg1NTg2IDMuNDExNzcgNS4wMDk4MloiIGZpbGw9IiMxMjVFMUUiLz48L3N2Zz4=") |     mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOC41ODgyMyA2Ljk5MDE1TDUuMDA5NzkgMy40MTE3QzQuODU1ODMgMy4yNTc3NCA0Ljk1ODYgMi45OTQyMiA1LjE3NjE0IDIuOTg1MTRMOC45MTA0MiAyLjgyOTMxQzkuMDU2NTggMi44MjMyMSA5LjE3NjczIDIuOTQzMzUgOS4xNzA2MyAzLjA4OTUyTDkuMDE0NzkgNi44MjM4QzkuMDA1NzEgNy4wNDEzNCA4Ljc0MjE5IDcuMTQ0MTEgOC41ODgyMyA2Ljk5MDE1WiIgZmlsbD0iIzEyNUUxRSIvPjxwYXRoIGQ9Ik0zLjQxMTc3IDUuMDA5ODJMNi45OTAyMSA4LjU4ODI3QzcuMTQ0MTcgOC43NDIyMyA3LjA0MTQgOS4wMDU3NSA2LjgyMzg2IDkuMDE0ODNMMy4wODk1OCA5LjE3MDY2QzIuOTQzNDIgOS4xNzY3NiAyLjgyMzI3IDkuMDU2NjEgMi44MjkzNyA4LjkxMDQ1TDIuOTg1MjEgNS4xNzYxN0MyLjk5NDI5IDQuOTU4NjMgMy4yNTc4MSA0Ljg1NTg2IDMuNDExNzcgNS4wMDk4MloiIGZpbGw9IiMxMjVFMUUiLz48L3N2Zz4=") | ||||||
|         no-repeat 50% 50%; |         no-repeat 50% 50%; | ||||||
|         transform: translate(-0.2px, -11.7px); |     transform: translate(-0.2px, -11.7px); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| [armcord-platform="darwin"] .titlebar #window-controls-container #minimize { | [armcord-platform="darwin"] .titlebar #window-controls-container #minimize { | ||||||
|  | @ -299,7 +298,6 @@ | ||||||
|         no-repeat 50% 50%; |         no-repeat 50% 50%; | ||||||
|     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") |     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%; | ||||||
|      |  | ||||||
| } | } | ||||||
| [armcord-platform="darwin"] .titlebar #window-controls-container:hover #maximize:active { | [armcord-platform="darwin"] .titlebar #window-controls-container:hover #maximize:active { | ||||||
|     background-color: #13c11e; |     background-color: #13c11e; | ||||||
|  |  | ||||||
|  | @ -12,9 +12,7 @@ | ||||||
|     <body> |     <body> | ||||||
|         <div class="container"> |         <div class="container"> | ||||||
|             <div id="warning" class="hidden"> |             <div id="warning" class="hidden"> | ||||||
|                 <p id="setup_offline"> |                 <p id="setup_offline">You appear to be offline. Please connect to the internet and restart ArmCord.</p> | ||||||
|                     You appear to be offline. Please connect to the internet and restart ArmCord. |  | ||||||
|                 </p> |  | ||||||
|             </div> |             </div> | ||||||
|             <div id="setup"> |             <div id="setup"> | ||||||
|                 <div id="logo" class="hidden"></div> |                 <div id="logo" class="hidden"></div> | ||||||
|  |  | ||||||
|  | @ -7,8 +7,8 @@ | ||||||
|             @import url("css/splash.css"); |             @import url("css/splash.css"); | ||||||
|         </style> |         </style> | ||||||
|         <script> |         <script> | ||||||
|             window.onbeforeunload = function(){ |             window.onbeforeunload = function () { | ||||||
|                 const style = document.createElement('style'); |                 const style = document.createElement("style"); | ||||||
|                 style.textContent = "body { display: none; }"; |                 style.textContent = "body { display: none; }"; | ||||||
|                 document.head.append(style); |                 document.head.append(style); | ||||||
|             }; |             }; | ||||||
|  | @ -30,7 +30,7 @@ | ||||||
|                 text.innerHTML = await armcord.getLang("loading_screen_offline"); |                 text.innerHTML = await armcord.getLang("loading_screen_offline"); | ||||||
|             } else { |             } else { | ||||||
|                 text.innerHTML = await armcord.getLang("loading_screen_start"); |                 text.innerHTML = await armcord.getLang("loading_screen_start"); | ||||||
|                 if (window.armcord.version === "DEV") { |                 if (window.armcord.version === "3.1.0") { | ||||||
|                     console.log("Running a development build of ArmCord. Skipping updater."); |                     console.log("Running a development build of ArmCord. Skipping updater."); | ||||||
|                 } else { |                 } else { | ||||||
|                     const response = await fetch("https://armcord.xyz/latest.json"); |                     const response = await fetch("https://armcord.xyz/latest.json"); | ||||||
|  |  | ||||||
|  | @ -94,4 +94,4 @@ setInterval(() => { | ||||||
|     el.textContent = `\nArmCord Version: ${version}`; |     el.textContent = `\nArmCord Version: ${version}`; | ||||||
|     el.onclick = () => ipcRenderer.send("openSettingsWindow"); |     el.onclick = () => ipcRenderer.send("openSettingsWindow"); | ||||||
|     host.append(el); |     host.append(el); | ||||||
| }, 2000); | }, 2000); | ||||||
|  |  | ||||||
|  | @ -26,9 +26,8 @@ export function injectTitlebar() { | ||||||
|         addStyle(fs.readFileSync(titlebarcssPath, "utf8")); |         addStyle(fs.readFileSync(titlebarcssPath, "utf8")); | ||||||
|         addStyle(fs.readFileSync(wordmarkcssPath, "utf8")); |         addStyle(fs.readFileSync(wordmarkcssPath, "utf8")); | ||||||
|         document.body.setAttribute("customTitlebar", ""); |         document.body.setAttribute("customTitlebar", ""); | ||||||
|         document.body.setAttribute("armcord-platform", os.platform()); |         document.body.setAttribute("armcord-platform", "win32"); | ||||||
| 
 | 
 | ||||||
|         var titlebar = document.getElementsByClassName("titlebar")[0]; |  | ||||||
|         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"); | ||||||
|  |  | ||||||
|  | @ -23,7 +23,7 @@ import type {Server, WebSocket} from "ws"; | ||||||
| import {inviteWindow, createInviteWindow} from "./window"; | import {inviteWindow, createInviteWindow} from "./window"; | ||||||
| 
 | 
 | ||||||
| async function wsLog(message: string, ...args: unknown[]) { | async function wsLog(message: string, ...args: unknown[]) { | ||||||
|     console.log("[WebSocket]" + message, ...args); |     console.log("[WebSocket] " + message, ...args); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /** Generates an inclusive range (as `Array`) from `start` to `end`. */ | /** Generates an inclusive range (as `Array`) from `start` to `end`. */ | ||||||
|  |  | ||||||
|  | @ -4,9 +4,7 @@ import { mainWindow } from "./window"; | ||||||
| import { getConfig, getConfigLocation, setWindowState } from "./utils"; | import { getConfig, getConfigLocation, setWindowState } from "./utils"; | ||||||
| import * as path from "path"; | import * as path from "path"; | ||||||
| import { createSettingsWindow } from "./settings/main"; | import { createSettingsWindow } from "./settings/main"; | ||||||
| import { platform } from "process"; |  | ||||||
| let tray: any = null; | let tray: any = null; | ||||||
| let defaultIcon = "ac_plug_colored"; |  | ||||||
| app.whenReady().then(async () => { | app.whenReady().then(async () => { | ||||||
|     let finishedSetup = (await getConfig("doneSetup")); |     let finishedSetup = (await getConfig("doneSetup")); | ||||||
|     if ((await getConfig("windowStyle")) == "basic") { |     if ((await getConfig("windowStyle")) == "basic") { | ||||||
|  | @ -89,6 +87,12 @@ app.whenReady().then(async () => { | ||||||
|                     { |                     { | ||||||
|                         type: "separator" |                         type: "separator" | ||||||
|                     }, |                     }, | ||||||
|  |                     { | ||||||
|  |                         label: `Open ${clientName}`, | ||||||
|  |                         click: function () { | ||||||
|  |                             mainWindow.show(); | ||||||
|  |                         } | ||||||
|  |                     }, | ||||||
|                     { |                     { | ||||||
|                         label: "Open Settings", |                         label: "Open Settings", | ||||||
|                         click: function () { |                         click: function () { | ||||||
|  |  | ||||||
|  | @ -1,7 +1,6 @@ | ||||||
| import * as fs from "fs"; | import * as fs from "fs"; | ||||||
| import { app, dialog } from "electron"; | import { app, dialog } from "electron"; | ||||||
| import path from "path"; | import path from "path"; | ||||||
| import { defaultMaxListeners } from "events"; |  | ||||||
| export var firstRun: boolean; | export var firstRun: boolean; | ||||||
| export var isSetup: boolean; | export var isSetup: boolean; | ||||||
| export var contentPath: string; | export var contentPath: string; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue