mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-04 18:59:08 +01:00
fix getDefaultSession, set foreground color to be not fff
This commit is contained in:
parent
d679ff7cf3
commit
15c3f2fc10
@ -76,6 +76,7 @@ class Session {
|
|||||||
return termWrap;
|
return termWrap;
|
||||||
}
|
}
|
||||||
termWrap = new TermWrap(line.sessionid, line.cmdid);
|
termWrap = new TermWrap(line.sessionid, line.cmdid);
|
||||||
|
console.log("create term", termWrap);
|
||||||
this.termMap[termKey] = termWrap;
|
this.termMap[termKey] = termWrap;
|
||||||
this.termMapById[termWrap.termId] = termWrap;
|
this.termMapById[termWrap.termId] = termWrap;
|
||||||
termWrap.initialized = true;
|
termWrap.initialized = true;
|
||||||
@ -104,7 +105,12 @@ class Session {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var DefaultSession : Session = null;
|
||||||
|
|
||||||
function getDefaultSession() : Session {
|
function getDefaultSession() : Session {
|
||||||
|
if (DefaultSession != null) {
|
||||||
|
return DefaultSession;
|
||||||
|
}
|
||||||
let windowLines = GlobalLines.get();
|
let windowLines = GlobalLines.get();
|
||||||
let session = new Session();
|
let session = new Session();
|
||||||
session.sessionId = GSessionId;
|
session.sessionId = GSessionId;
|
||||||
@ -113,6 +119,7 @@ function getDefaultSession() : Session {
|
|||||||
session.windows = [
|
session.windows = [
|
||||||
{sessionid: GSessionId, windowid: GWindowId, name: "default", lines: windowLines},
|
{sessionid: GSessionId, windowid: GWindowId, name: "default", lines: windowLines},
|
||||||
];
|
];
|
||||||
|
DefaultSession = session;
|
||||||
return session;
|
return session;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ class TermWrap {
|
|||||||
this.termId = uuidv4();
|
this.termId = uuidv4();
|
||||||
this.sessionId = sessionId;
|
this.sessionId = sessionId;
|
||||||
this.cmdId = cmdId;
|
this.cmdId = cmdId;
|
||||||
this.terminal = new Terminal({rows: 2, cols: 80});
|
this.terminal = new Terminal({rows: 2, cols: 80, theme: {foreground: "#d3d7cf"}});
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
|
Loading…
Reference in New Issue
Block a user