diff --git a/src/linecomps.tsx b/src/linecomps.tsx index fb013bd3..ccaa405b 100644 --- a/src/linecomps.tsx +++ b/src/linecomps.tsx @@ -108,7 +108,7 @@ class LineAvatar extends React.Component<{line : LineType, cmd : Cmd}, {}> { let {line} = this.props; if (line != null) { mobx.action(() => { - GlobalModel.lineSettingsModal.set(this.props.line); + GlobalModel.lineSettingsModal.set(line); })(); } } @@ -440,6 +440,18 @@ class LineCmd extends React.Component<{screen : LineContainerModel, line : LineT ); } + @boundMethod + handleLineSettings(e : any) : void { + e.preventDefault(); + e.stopPropagation(); + let {line} = this.props; + if (line != null) { + mobx.action(() => { + GlobalModel.lineSettingsModal.set(line); + })(); + } + } + renderMetaWrap(cmd : Cmd) { let {line} = this.props; let model = GlobalModel; @@ -458,6 +470,9 @@ class LineCmd extends React.Component<{screen : LineContainerModel, line : LineT
({termOpts.rows}x{termOpts.cols})
+
+ +
{this.renderCmdText(cmd, remote)} diff --git a/src/sh2.less b/src/sh2.less index b2d364c3..8d23675a 100644 --- a/src/sh2.less +++ b/src/sh2.less @@ -1451,6 +1451,10 @@ body::-webkit-scrollbar { display: block; } + &:hover .meta .settings { + display: block; + } + .avatar { max-height: 38px; width: 38px; @@ -1581,8 +1585,16 @@ body::-webkit-scrollbar { } } + .settings { + display: none; + color: #aaa; + font-size: 11px; + margin-left: 5px; + margin-top: 5px; + cursor: pointer; + } + .termopts { - display: flex; color: #aaa; margin-top: 5px; .mono-font(11px);