mirror of
				https://github.com/smartfrigde/armcord.git
				synced 2024-08-14 23:56:58 +00:00 
			
		
		
		
	Add start minimized option
This commit is contained in:
		
							parent
							
								
									a01b9f3f8a
								
							
						
					
					
						commit
						f8c785e9b3
					
				
					 5 changed files with 31 additions and 2 deletions
				
			
		|  | @ -124,6 +124,7 @@ | |||
|                     inviteWebsocket: true, | ||||
|                     mobileMode: false, | ||||
|                     trayIcon: "default", | ||||
|                     startMinimized: false, | ||||
|                     performanceMode: "none" | ||||
|                 }); | ||||
|                 setTimeout(() => window.armcordinternal.restart(), 5000); | ||||
|  | @ -155,6 +156,7 @@ | |||
|                             automaticPatches: false, | ||||
|                             performanceMode: "none", | ||||
|                             alternativePaste: false, | ||||
|                             startMinimized: false, | ||||
|                             trayIcon: "default", | ||||
|                             mods: options.mod, | ||||
|                             inviteWebsocket: true | ||||
|  | @ -170,6 +172,7 @@ | |||
|                         automaticPatches: false, | ||||
|                         mobileMode: false, | ||||
|                         mods: "none", | ||||
|                         startMinimized: false, | ||||
|                         alternativePaste: false, | ||||
|                         performanceMode: "none", | ||||
|                         trayIcon: "default", | ||||
|  |  | |||
|  | @ -52,6 +52,14 @@ | |||
|         </div> | ||||
|         <br /> | ||||
| 
 | ||||
|         <div class="switch acMinimized"> | ||||
|             <label class="header" data-string="settings-startMinimized"></label> | ||||
|             <input id="startMinimized" class="tgl tgl-light left" data-setting="startMinimized" type="checkbox" /> | ||||
|             <label class="tgl-btn left" for="startMinimized"></label> | ||||
|             <p class="description" data-string="settings-startMinimized-desc"></p> | ||||
|         </div> | ||||
|         <br /> | ||||
| 
 | ||||
|         <div class="switch acPatches"> | ||||
|             <label class="header" data-string="settings-patches"></label> | ||||
|             <input id="patches" class="tgl tgl-light left" data-setting="automaticPatches" type="checkbox" /> | ||||
|  |  | |||
|  | @ -49,6 +49,7 @@ export function setup() { | |||
|         performanceMode: "none", | ||||
|         skipSplash: false, | ||||
|         inviteWebsocket: true, | ||||
|         startMinimized: false, | ||||
|         mobileMode: false, | ||||
|         trayIcon: "default", | ||||
|         doneSetup: false | ||||
|  | @ -244,6 +245,7 @@ export interface Settings { | |||
|     mobileMode: boolean; | ||||
|     skipSplash: boolean; | ||||
|     performanceMode: string; | ||||
|     startMinimized: boolean; | ||||
|     inviteWebsocket: boolean; | ||||
|     trayIcon: string; | ||||
|     doneSetup: boolean; | ||||
|  |  | |||
|  | @ -51,11 +51,18 @@ contextMenu({ | |||
|     ] | ||||
| }); | ||||
| async function doAfterDefiningTheWindow() { | ||||
|     if (await getConfig("startMinimized")) { | ||||
|         mainWindow.hide(); | ||||
|     } else { | ||||
|         mainWindow.show(); | ||||
|     } | ||||
|     if (transparency && process.platform === "win32") { | ||||
|         import("@pyke/vibe").then((vibe) => { | ||||
|         import("@pyke/vibe").then(async (vibe) => { | ||||
|             vibe.applyEffect(mainWindow, "acrylic"); | ||||
|             vibe.forceTheme(mainWindow, "dark"); | ||||
|             mainWindow.show(); | ||||
|             if ((await getConfig("startMinimized")) == false) { | ||||
|                 mainWindow.show(); | ||||
|             } | ||||
|         }); | ||||
|     } | ||||
|     var ignoreProtocolWarning = await getConfig("ignoreProtocolWarning"); | ||||
|  | @ -251,12 +258,18 @@ async function doAfterDefiningTheWindow() { | |||
|     } else { | ||||
|         await mainWindow.loadFile(path.join(__dirname, "/content/splash.html")); | ||||
|     } | ||||
|     if (await getConfig("startMinimized")) { | ||||
|         mainWindow.hide(); | ||||
|     } else { | ||||
|         mainWindow.show(); | ||||
|     } | ||||
| } | ||||
| export function createCustomWindow() { | ||||
|     mainWindow = new BrowserWindow({ | ||||
|         width: 300, | ||||
|         height: 350, | ||||
|         title: "ArmCord", | ||||
|         show: false, | ||||
|         darkTheme: true, | ||||
|         icon: iconPath, | ||||
|         frame: false, | ||||
|  | @ -276,6 +289,7 @@ export function createNativeWindow() { | |||
|         title: "ArmCord", | ||||
|         darkTheme: true, | ||||
|         icon: iconPath, | ||||
|         show: false, | ||||
|         frame: true, | ||||
|         autoHideMenuBar: true, | ||||
|         webPreferences: { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue