mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
add merge to Screen object
This commit is contained in:
parent
c3d3647111
commit
152db74075
18
src/model.ts
18
src/model.ts
@ -181,6 +181,24 @@ class Screen {
|
||||
}
|
||||
|
||||
mergeData(data : ScreenDataType) {
|
||||
if (data.sessionid != this.sessionId || data.screenid != this.screenId) {
|
||||
throw new Error("invalid screen update, ids don't match")
|
||||
}
|
||||
mobx.action(() => {
|
||||
if (data.screenidx != 0) {
|
||||
this.screenIdx.set(data.screenidx);
|
||||
}
|
||||
if (data.screenopts != null) {
|
||||
this.opts.set(data.screenopts);
|
||||
}
|
||||
if (!isBlank(data.name)) {
|
||||
this.name.set(data.name);
|
||||
}
|
||||
if (!isBlank(data.activewindowid)) {
|
||||
this.activeWindowId.set(data.activewindowid);
|
||||
}
|
||||
// TODO merge windows
|
||||
})();
|
||||
}
|
||||
|
||||
updatePtyData(ptyMsg : PtyDataUpdateType) {
|
||||
|
Loading…
Reference in New Issue
Block a user