@@ -2,31 +2,30 @@ const { app, BrowserWindow } = require('electron');
2
2
const path = require ( 'path' ) ;
3
3
4
4
function createWindow ( ) {
5
+ const iconPath = path . join ( __dirname , 'th3cyb3rhub-fav.icns' ) ;
6
+
5
7
const win = new BrowserWindow ( {
6
8
width : 800 ,
7
9
height : 600 ,
10
+ icon : iconPath ,
8
11
webPreferences : {
9
- preload : path . join ( __dirname , 'preload.js' ) , // Path to preload.js
10
- contextIsolation : true , // Recommended for security
11
- enableRemoteModule : false // Disable remote module
12
+ preload : path . join ( __dirname , 'preload.js' ) ,
13
+ contextIsolation : true ,
14
+ enableRemoteModule : false
12
15
} ,
13
16
} ) ;
14
17
15
- // Load the built React app from the 'build' folder (adjust the path as necessary)
16
18
win . loadFile ( path . join ( __dirname , '../dist/index.html' ) ) ;
17
19
}
18
20
19
- // Quit the application when all windows are closed
20
21
app . on ( 'window-all-closed' , ( ) => {
21
22
app . quit ( ) ;
22
23
} ) ;
23
24
24
- // Create a window when the application is activated
25
25
app . on ( 'activate' , ( ) => {
26
26
if ( BrowserWindow . getAllWindows ( ) . length === 0 ) {
27
27
createWindow ( ) ;
28
28
}
29
29
} ) ;
30
30
31
- // Start the application and create the window
32
31
app . whenReady ( ) . then ( createWindow ) ;
0 commit comments