trying stuff and setting up auto
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { app, BrowserWindow, ipcMain, Display, screen } from 'electron';
|
||||
|
||||
import Channels, { DEFAULT_APP_PRESET, DimensionChangeRequest } from './electron/constants';
|
||||
import { handleGoogleLogin } from './electron/handleLogin';
|
||||
// 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).
|
||||
@@ -25,6 +26,8 @@ const createWindow = (): void => {
|
||||
...DEFAULT_APP_PRESET,
|
||||
webPreferences: {
|
||||
preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY,
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
},
|
||||
// titleBarStyle: "hiddenInset",
|
||||
frame: false,
|
||||
@@ -46,6 +49,13 @@ const createWindow = (): void => {
|
||||
app
|
||||
.whenReady()
|
||||
.then(createWindow)
|
||||
.then(() => {
|
||||
// activate login
|
||||
ipcMain.on(Channels.ACTIVATE_LOG_IN, async (event, arg) => {
|
||||
console.log('initiating log in');
|
||||
await handleGoogleLogin();
|
||||
});
|
||||
})
|
||||
.then(() => {
|
||||
// dynamically changing the window bounds
|
||||
ipcMain.on(Channels.RESIZE_WINDOW, (event, req: DimensionChangeRequest) => {
|
||||
|
||||
Reference in New Issue
Block a user