lines spacer to have content scroll up from bottom

This commit is contained in:
sawka 2022-08-26 22:07:12 -07:00
parent 9f794d6590
commit 3a8f3dab38
2 changed files with 8 additions and 3 deletions

View File

@ -556,7 +556,7 @@ class CmdInput extends React.Component<{}, {}> {
</If>
<If condition={infoMsg && infoMsg.infoerror != null}>
<div className="info-error">
{infoMsg.infoerror}
[error] {infoMsg.infoerror}
</div>
</If>
</div>
@ -783,6 +783,7 @@ class ScreenWindowView extends React.Component<{sw : ScreenWindow}, {}> {
<span>{sw.name.get()}{sw.shouldFollow.get() ? "*" : ""}</span>
</div>
<div key="lines" className="lines" onScroll={this.scrollHandler} id={this.getLinesDOMId()} style={linesStyle}>
<div className="lines-spacer"></div>
<For each="line" of={win.lines} index="idx">
<Line key={line.lineid} line={line} sw={sw} width={this.width.get()} interObs={this.interObs} initVis={idx > win.lines.length-1-7} cmdRefNum={cmdRefMap[line.lineid] ?? 0}/>
</For>

View File

@ -396,7 +396,7 @@ html, body, #main {
overflow: hidden;
flex-shrink: 0;
&:first-child {
&:nth-child(2) {
margin: 0px 5px 5px 5px;
padding: 0px 5px 5px 5px;
border-top: none;
@ -560,9 +560,13 @@ body .xterm .xterm-viewport {
padding-right: 0px;
flex-grow: 1;
.line:first-child {
.line:nth-child(2) {
padding-top: 1px;
}
.lines-spacer {
flex-grow: 1;
}
}
.cmd-input {