mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
a2ee3c4d5d
commit
733bb543c9
52 files changed
+18973
-5519
No files matched your search
@@ -28,8 +28,6 @@ export interface SendToViewArgs {
|
||||
}
|
||||
|
||||
export class WindowManager extends Singleton {
|
||||
public mainContentUrl = `http://localhost:${LensProxy.getInstance().port}`;
|
||||
|
||||
protected mainWindow: BrowserWindow;
|
||||
protected splashWindow: BrowserWindow;
|
||||
protected windowState: windowStateKeeper.State;
|
||||
@@ -43,6 +41,10 @@ export class WindowManager extends Singleton {
|
||||
this.bindEvents();
|
||||
}
|
||||
|
||||
get mainUrl() {
|
||||
return `http://localhost:${LensProxy.getInstance().port}`;
|
||||
}
|
||||
|
||||
private async initMainWindow(showSplash: boolean) {
|
||||
// Manage main window size and position with state persistence
|
||||
if (!this.windowState) {
|
||||
@@ -140,8 +142,8 @@ export class WindowManager extends Singleton {
|
||||
|
||||
try {
|
||||
if (showSplash) await this.showSplash();
|
||||
logger.info(`[WINDOW-MANAGER]: Loading Main window from url: ${this.mainContentUrl} ...`);
|
||||
await this.mainWindow.loadURL(this.mainContentUrl);
|
||||
logger.info(`[WINDOW-MANAGER]: Loading Main window from url: ${this.mainUrl} ...`);
|
||||
await this.mainWindow.loadURL(this.mainUrl);
|
||||
} catch (error) {
|
||||
logger.error("Loading main window failed", { error });
|
||||
dialog.showErrorBox("ERROR!", error.toString());
|
||||
|
||||
Reference in new issue
Block a user