mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-03-12 13:29:15 +01:00
fix resize event. fix emain communication to local-server (use 127.0.0.1 to force ipv4)
This commit is contained in:
parent
d289026a98
commit
139639b990
11
src/emain.ts
11
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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user