From f8d23a68f351d2b555f176b48ceaddc12a84597e Mon Sep 17 00:00:00 2001 From: sawka Date: Thu, 27 Oct 2022 15:25:58 -0700 Subject: [PATCH] minor update --- src/main.tsx | 39 +++++++++++++++++++++++++++++---------- src/sh2.less | 6 +++++- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/src/main.tsx b/src/main.tsx index 656d96a7c..ac2110a46 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -136,6 +136,27 @@ function getLineDateStr(ts : number) : string { } } +@mobxReact.observer +class LineAvatar extends React.Component<{line : LineType, cmd : Cmd}, {}> { + render() { + let {line, cmd} = this.props; + let lineNumStr = (line.linenumtemp ? "~" : "") + String(line.linenum); + let status = (cmd != null ? cmd.getStatus() : "done"); + let rtnstate = (cmd != null ? cmd.getRtnState() : false); + return ( +
+ {lineNumStr} + + + + + + +
+ ); + } +} + @mobxReact.observer class LineText extends React.Component<{sw : ScreenWindow, line : LineType}, {}> { render() { @@ -362,6 +383,12 @@ class LineCmd extends React.Component<{sw : ScreenWindow, line : LineType, width this.checkLoad(); this.checkStateDiffLoad(); } + + @boundMethod + handleClick() { + let {line} = this.props; + GlobalCommandRunner.swSelectLine(String(line.linenum), "cmd"); + } render() { let {sw, line, width, staticRender, visible} = this.props; @@ -391,18 +418,10 @@ class LineCmd extends React.Component<{sw : ScreenWindow, line : LineType, width let isFgFocused = isPhysicalFocused && swFocusType == "cmd-fg"; let isStatic = staticRender; return ( -
+
-
- {lineNumStr} - - - - - - -
+
{line.userid}
diff --git a/src/sh2.less b/src/sh2.less index 65da406e0..a464baf79 100644 --- a/src/sh2.less +++ b/src/sh2.less @@ -469,7 +469,7 @@ html, body, #main { } .cmd-rtnstate-diff { - color: @term-white; + color: @term-cyan; .mono-font(12px); white-space: pre; margin-left: 15px; @@ -556,6 +556,10 @@ html, body, #main { margin-right: 10px; border-radius: 5px; position: relative; + + &.rtnstate { + border: 1px solid white; + } .status-icon { font-size: 8px;