diff --git a/src/emain.ts b/src/emain.ts index 60a22742..8709f613 100644 --- a/src/emain.ts +++ b/src/emain.ts @@ -13,8 +13,8 @@ import {v4 as uuidv4} from "uuid"; const PromptAppPathVarName = "PROMPT_APP_PATH"; const PromptDevVarName = "PROMPT_DEV"; const AuthKeyFile = "prompt.authkey"; -const DevServerEndpoint = "http://localhost:8090"; -const ProdServerEndpoint = "http://localhost:1619"; +const DevServerEndpoint = "http://127.0.0.1:8090"; +const ProdServerEndpoint = "http://127.0.0.1:1619"; let isDev = (process.env[PromptDevVarName] != null); let scHome = getPromptHomeDir(); @@ -265,8 +265,8 @@ function createMainWindow(clientData) { } }); win.webContents.on("will-navigate", shNavHandler); - win.on("resized", debounce(400, mainResizeHandler)); - win.on("moved", debounce(400, mainResizeHandler)); + win.on("resized", debounce(400, (e) => mainResizeHandler(e, win))); + win.on("moved", debounce(400, (e) => mainResizeHandler(e, win))); win.on("focus", () => { wasInFg = true; wasActive = true; @@ -292,8 +292,7 @@ function createMainWindow(clientData) { return win; } -function mainResizeHandler(e) { - let win = e.sender; +function mainResizeHandler(e, win) { if (win == null || win.isDestroyed() || win.fullScreen) { return; } diff --git a/src/model.ts b/src/model.ts index 6cc5631b..56754efd 100644 --- a/src/model.ts +++ b/src/model.ts @@ -19,10 +19,10 @@ dayjs.extend(localizedFormat) var GlobalUser = "sawka"; const RemotePtyRows = 8; // also in main.tsx const RemotePtyCols = 80; -const ProdServerEndpoint = "http://localhost:1619"; -const ProdServerWsEndpoint = "ws://localhost:1623"; -const DevServerEndpoint = "http://localhost:8090"; -const DevServerWsEndpoint = "ws://localhost:8091"; +const ProdServerEndpoint = "http://127.0.0.1:1619"; +const ProdServerWsEndpoint = "ws://127.0.0.1:1623"; +const DevServerEndpoint = "http://127.0.0.1:8090"; +const DevServerWsEndpoint = "ws://127.0.0.1:8091"; const DefaultTermFontSize = 12; const MinFontSize = 8; const MaxFontSize = 15;