1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

electron main class

This commit is contained in:
Kyle Spearrin
2018-02-13 23:38:18 -05:00
parent baaebdd2ad
commit 216c77fa25
8 changed files with 152 additions and 142 deletions

View File

@@ -1,11 +1,14 @@
import { isDev } from '../scripts/utils';
import { app, BrowserWindow, screen } from 'electron';
import * as path from 'path';
import * as url from 'url';
import { Main } from '../main';
export class WindowMain {
win: BrowserWindow;
constructor(private dev: boolean) { }
constructor(private main: Main) { }
init(): Promise<any> {
return new Promise((resolve, reject) => {
@@ -65,7 +68,7 @@ export class WindowMain {
}));
// Open the DevTools.
if (this.dev) {
if (isDev()) {
this.win.webContents.openDevTools();
}