mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-25 16:59:17 +01:00
pass in default width/height of window
This commit is contained in:
parent
2032e14285
commit
36dfdf24f1
@ -17,7 +17,7 @@ export class WindowMain {
|
|||||||
private windowStateChangeTimer: NodeJS.Timer;
|
private windowStateChangeTimer: NodeJS.Timer;
|
||||||
private windowStates: { [key: string]: any; } = {};
|
private windowStates: { [key: string]: any; } = {};
|
||||||
|
|
||||||
constructor(private storageService: StorageService) { }
|
constructor(private storageService: StorageService, private defaultWidth = 950, private defaultHeight: 600) { }
|
||||||
|
|
||||||
init(): Promise<any> {
|
init(): Promise<any> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
@ -73,7 +73,8 @@ export class WindowMain {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async createWindow() {
|
private async createWindow() {
|
||||||
this.windowStates[Keys.mainWindowSize] = await this.getWindowState(Keys.mainWindowSize, 950, 600);
|
this.windowStates[Keys.mainWindowSize] = await this.getWindowState(Keys.mainWindowSize, this.defaultWidth,
|
||||||
|
this.defaultHeight);
|
||||||
|
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
this.win = new BrowserWindow({
|
this.win = new BrowserWindow({
|
||||||
|
Loading…
Reference in New Issue
Block a user