mirror of
				https://github.com/smartfrigde/armcord.git
				synced 2024-08-14 23:56:58 +00:00 
			
		
		
		
	iconformat depending on os
This commit is contained in:
		
							parent
							
								
									ce7699bb4c
								
							
						
					
					
						commit
						83219fb8d3
					
				
					 1 changed files with 10 additions and 2 deletions
				
			
		
							
								
								
									
										12
									
								
								main.js
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								main.js
									
										
									
									
									
								
							|  | @ -2,9 +2,17 @@ | ||||||
| const { app, BrowserWindow, session, Tray, Menu } = require("electron"); | const { app, BrowserWindow, session, Tray, Menu } = require("electron"); | ||||||
| const path = require("path"); | const path = require("path"); | ||||||
| const contextMenu = require("electron-context-menu"); | const contextMenu = require("electron-context-menu"); | ||||||
|  | const os = require("os"); | ||||||
| require("v8-compile-cache"); | require("v8-compile-cache"); | ||||||
| require("./utils/updater"); | require("./utils/updater"); | ||||||
| 
 | 
 | ||||||
|  | if (os.type() == 'Linux'){ | ||||||
|  |   var iconformat = __dirname + "/discord.png"  | ||||||
|  | } else { | ||||||
|  |   console.log("Running Non-Linux") | ||||||
|  |   var iconformat = __dirname + "/discord.ico"; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| contextMenu({ | contextMenu({ | ||||||
|   prepend: (defaultActions, parameters, browserWindow) => [ |   prepend: (defaultActions, parameters, browserWindow) => [ | ||||||
|     { |     { | ||||||
|  | @ -21,7 +29,7 @@ function createWindow() { | ||||||
|   mainWindow = new BrowserWindow({ |   mainWindow = new BrowserWindow({ | ||||||
|     width: 800, |     width: 800, | ||||||
|     height: 600, |     height: 600, | ||||||
|     icon: __dirname + "/discord.ico", |     icon: iconformat, | ||||||
|     title: "ArmCord", |     title: "ArmCord", | ||||||
|     frame: false, |     frame: false, | ||||||
|     webPreferences: { |     webPreferences: { | ||||||
|  | @ -31,7 +39,7 @@ function createWindow() { | ||||||
|     }, |     }, | ||||||
|   }); |   }); | ||||||
| 
 | 
 | ||||||
|   var appIcon = new Tray(__dirname + "/discord.ico"); |   var appIcon = new Tray(iconformat); | ||||||
|   mainWindow.webContents.userAgent = |   mainWindow.webContents.userAgent = | ||||||
|     "Mozilla/5.0 (X12; FreeBSD x86) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"; //fake useragent
 |     "Mozilla/5.0 (X12; FreeBSD x86) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"; //fake useragent
 | ||||||
|   mainWindow.loadFile("index.html"); |   mainWindow.loadFile("index.html"); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue