Multicolumn Bluesky client powered by Angular
1const {app, BrowserWindow} = require('electron')
2const url = require("url");
3const path = require("path");
4
5let mainWindow
6
7function createWindow () {
8 mainWindow = new BrowserWindow({
9 width: 1440,
10 height: 800,
11 webPreferences: {
12 nodeIntegration: true
13 },
14 frame: false,
15 titleBarStyle: 'hidden',
16 ...(process.platform !== 'darwin' ? { titleBarOverlay: {
17 color: 'white',
18 height: 21
19 } } : {})
20 })
21
22 mainWindow.loadURL(
23 url.format({
24 pathname: path.join(__dirname, `docs/index.html`),
25 protocol: "file:",
26 slashes: true
27 })
28 );
29 // Open the DevTools.
30 // mainWindow.webContents.openDevTools()
31
32 mainWindow.on('closed', function () {
33 mainWindow = null
34 })
35}
36
37app.on('ready', createWindow)
38
39app.on('window-all-closed', function () {
40 if (process.platform !== 'darwin') app.quit()
41})
42
43app.on('activate', function () {
44 if (mainWindow === null) createWindow()
45})