adding styling and other things basic like constants for electron

This commit is contained in:
talksik
2022-05-27 20:30:43 -05:00
parent 64486bc1ca
commit 7e40949fc8
7 changed files with 130 additions and 12 deletions
+4 -3
View File
@@ -1,4 +1,5 @@
import { app, BrowserWindow } from 'electron';
import { DEFAULT_APP_PRESET } from './electron/constants';
// This allows TypeScript to pick up the magic constant that's auto-generated by Forge's Webpack
// plugin that tells the Electron app where to look for the Webpack-bundled app code (depending on
// whether you're running in development or production).
@@ -11,17 +12,17 @@ if (require('electron-squirrel-startup')) {
}
const createWindow = (): void => {
// Create the browser window.
const mainWindow = new BrowserWindow({
height: 600,
width: 800,
...DEFAULT_APP_PRESET,
});
// and load the index.html of the app.
mainWindow.loadURL(MAIN_WINDOW_WEBPACK_ENTRY);
// Open the DevTools.
mainWindow.webContents.openDevTools();
mainWindow.webContents.openDevTools({"mode": "detach"});
};
// This method will be called when Electron has finished