Skip to content

Commit 9874570

Browse files
committed
feat: icons
1 parent 6874066 commit 9874570

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@
2020
"dist/**/*",
2121
"src/main.js"
2222
],
23-
"icon": "dict/assets/th3cyb3rhub-fav.png",
2423
"win": {
24+
"icon": "th3cyb3rhub-fav.ico",
2525
"target": [
2626
"nsis"
2727
],
2828
"sign": false
2929
},
30+
"mac": {
31+
"icon": "th3cyb3rhub-fav.icns"
32+
},
3033
"publish": {
3134
"provider": "github",
3235
"owner": "th3cyb3rhub",

src/main.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,30 @@ const { app, BrowserWindow } = require('electron');
22
const path = require('path');
33

44
function createWindow() {
5+
const iconPath = path.join(__dirname, 'th3cyb3rhub-fav.icns');
6+
57
const win = new BrowserWindow({
68
width: 800,
79
height: 600,
10+
icon: iconPath,
811
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
1215
},
1316
});
1417

15-
// Load the built React app from the 'build' folder (adjust the path as necessary)
1618
win.loadFile(path.join(__dirname, '../dist/index.html'));
1719
}
1820

19-
// Quit the application when all windows are closed
2021
app.on('window-all-closed', () => {
2122
app.quit();
2223
});
2324

24-
// Create a window when the application is activated
2525
app.on('activate', () => {
2626
if (BrowserWindow.getAllWindows().length === 0) {
2727
createWindow();
2828
}
2929
});
3030

31-
// Start the application and create the window
3231
app.whenReady().then(createWindow);

th3cyb3rhub-fav.icns

47.2 KB
Binary file not shown.

th3cyb3rhub-fav.ico

186 KB
Binary file not shown.

0 commit comments

Comments
 (0)