mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
pass in default width/height of window
This commit is contained in:
@@ -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({
|
||||||
|
|||||||
Reference in New Issue
Block a user