adding styling and other things basic like constants for electron
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user