mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
small updates for cmd-fg
This commit is contained in:
parent
5c8dabbb2c
commit
aa2e6b471b
@ -337,10 +337,11 @@ class LineCmd extends React.Component<{sw : ScreenWindow, line : LineType, width
|
||||
let isPhysicalFocused = sw.getIsFocused(line.linenum);
|
||||
let swFocusType = sw.focusType.get();
|
||||
let isFocused = isPhysicalFocused && (swFocusType == "cmd" || swFocusType == "cmd-fg");
|
||||
let isFgFocused = isPhysicalFocused && swFocusType == "cmd-fg";
|
||||
let isStatic = staticRender;
|
||||
return (
|
||||
<div className={cn("line", "line-cmd", {"focus": isFocused})} id={"line-" + getLineId(line)} ref={this.lineRef} style={{position: "relative"}} data-lineid={line.lineid} data-linenum={line.linenum} data-windowid={line.windowid} data-cmdid={line.cmdid}>
|
||||
<div className={cn("focus-indicator", {"selected": isSelected}, {"active": isSelected && isFocused})}/>
|
||||
<div className={cn("focus-indicator", {"selected": isSelected}, {"active": isSelected && isFocused}, {"fg-focus": isFgFocused})}/>
|
||||
<div className="line-header">
|
||||
<div className={cn("avatar", "num-"+lineNumStr.length, "status-" + status, {"ephemeral": line.ephemeral})} onClick={this.doRefresh}>
|
||||
{lineNumStr}
|
||||
|
16
src/model.ts
16
src/model.ts
@ -1561,17 +1561,15 @@ class Model {
|
||||
}
|
||||
|
||||
cmdStatusUpdate(sessionId : string, cmdId : string, origStatus : string, newStatus : string) {
|
||||
// TODO force recompute usedrows in terminal when status changes to done
|
||||
console.log("cmd status", sessionId, cmdId, origStatus, "=>", newStatus);
|
||||
let sw = this.getActiveSW();
|
||||
if (sw == null || sw.sessionId != sessionId) {
|
||||
return;
|
||||
let lines = this.getActiveLinesByCmdId(sessionId, cmdId);
|
||||
for (let ptr of lines) {
|
||||
let sw = ptr.sw;
|
||||
let term = sw.getTermWrap(cmdId);
|
||||
if (term != null) {
|
||||
setTimeout(() => term.updateUsedRows(true), 500);
|
||||
}
|
||||
}
|
||||
let term = sw.terms[cmdId];
|
||||
if (term == null) {
|
||||
return;
|
||||
}
|
||||
setTimeout(() => term.updateUsedRows(true), 500);
|
||||
}
|
||||
|
||||
onMetaPageUp() : void {
|
||||
|
@ -483,6 +483,11 @@ html, body, #main {
|
||||
display: block;
|
||||
background-color: @tab-blue;
|
||||
}
|
||||
|
||||
&.active.selected.fg-focus {
|
||||
display: block;
|
||||
background-color: @tab-green;
|
||||
}
|
||||
}
|
||||
|
||||
.avatar {
|
||||
|
Loading…
Reference in New Issue
Block a user