diff --git a/src/main.tsx b/src/main.tsx
index cac5fbf3..46106631 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -318,6 +318,7 @@ class LineCmd extends React.Component<{sw : ScreenWindow, line : LineType, width
}
componentDidMount() {
+ this.componentDidUpdate();
}
componentWillUnmount() {
@@ -384,6 +385,9 @@ class LineCmd extends React.Component<{sw : ScreenWindow, line : LineType, width
if (elem != null) {
curHeight = elem.offsetHeight;
}
+ if (snapshot == null) {
+ snapshot = {height: 0};
+ }
if (snapshot.height != curHeight && this.props.onHeightChange != null) {
this.props.onHeightChange(line.linenum, curHeight, snapshot.height);
}
@@ -479,7 +483,7 @@ class LineCmd extends React.Component<{sw : ScreenWindow, line : LineType, width
- (loading)
+ (loading)
@@ -503,6 +507,9 @@ class LineCmd extends React.Component<{sw : ScreenWindow, line : LineType, width
class Line extends React.Component<{sw : ScreenWindow, line : LineType, width : number, staticRender : boolean, visible : OV
, onHeightChange : HeightChangeCallbackType}, {}> {
render() {
let line = this.props.line;
+ if (line.hidden) {
+ return null;
+ }
if (line.linetype == "text") {
return ;
}
@@ -2449,7 +2456,7 @@ class MainSideBar extends React.Component<{}, {}> {
- - (loading)
+ - (loading)
diff --git a/src/sh2.less b/src/sh2.less
index 8a6c3fb2..d8796eae 100644
--- a/src/sh2.less
+++ b/src/sh2.less
@@ -94,6 +94,7 @@ html, body, #main {
padding: 10px;
height: 100%;
color: #ccc;
+ .mono-font();
code {
background-color: black;
@@ -240,6 +241,10 @@ html, body, #main {
li {
.mono-font();
}
+
+ li.menu-loading-message {
+ .mono-font();
+ }
}
.menu-list.remotes-menu-list {
@@ -456,6 +461,13 @@ html, body, #main {
&.cmd-done .terminal .xterm-cursor {
display: none;
}
+
+ .terminal-loading-message {
+ position: absolute;
+ top: 60px;
+ left: 30px;
+ .mono-font();
+ }
}
.cmd-rtnstate {
diff --git a/src/types.ts b/src/types.ts
index b88f026b..efd62c0e 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -25,9 +25,10 @@ type LineType = {
linelocal : boolean,
linetype : string,
text : string,
- cmdid : string,
- contentheight : number,
- star : number,
+ cmdid? : string,
+ contentheight? : number,
+ star? : number,
+ hidden? : boolean,
ephemeral? : boolean,
remove? : boolean,
};