Skip to content

Commit f75a617

Browse files
committed
Convert to an Electron App
1 parent 0f0fc2e commit f75a617

26 files changed

Lines changed: 990 additions & 0 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

index.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const { app, BrowserWindow } = require('electron');
2+
const path = require('node:path');
3+
4+
const createWindow = () => {
5+
const mainWindow = new BrowserWindow({
6+
width: 800,
7+
height: 600,
8+
autoHideMenuBar: true,
9+
icon: __dirname + '/src/assets/favicon.ico',
10+
});
11+
12+
mainWindow.loadFile('./src/index.html');
13+
14+
}
15+
16+
app.whenReady().then(() => {
17+
createWindow();
18+
19+
app.on('activate', () => {
20+
if (BrowserWindow.getAllWindows().length === 0) createWindow()
21+
});
22+
});
23+
24+
app.on('window-all-closed', () => {
25+
if (process.platform !== 'darwin') app.quit();
26+
});

0 commit comments

Comments
 (0)