diff --git a/src/player.jsx b/src/player.jsx
index b8a77f8..53c75c3 100644
--- a/src/player.jsx
+++ b/src/player.jsx
@@ -44,6 +44,13 @@
return value;
}
+ let scrollToBottom = function(id) {
+ const el = document.getElementById(id);
+ if (el) {
+ el.scrollTop = el.scrollHeight;
+ }
+ }
+
/*
* An auto-loading buffer of recording's packets.
*/
@@ -488,7 +495,14 @@
render() {
return(
-
+
);
}
@@ -520,6 +534,7 @@
this.zoom = this.zoom.bind(this);
this.fastForwardToTS = this.fastForwardToTS.bind(this);
this.sendInput = this.sendInput.bind(this);
+ this.clearInputPlayer = this.clearInputPlayer.bind(this);
this.state = {
cols: 80,
@@ -807,7 +822,12 @@
this.setState({speedExp: 0});
}
+ clearInputPlayer() {
+ this.setState({input: null});
+ }
+
rewindToStart() {
+ this.clearInputPlayer();
this.reset();
this.sync();
}
@@ -955,6 +975,9 @@
this.speed = Math.pow(2, this.state.speedExp);
this.sync();
}
+ if (this.state.input != prevState.input) {
+ scrollToBottom("input-textarea");
+ }
}
render() {
@@ -1017,75 +1040,79 @@
// ensure react never reuses this div by keying it with the terminal widget
return (
-
-
-
- {this.state.title}
-
-
-
-
-
-
-
-
-
-
-
{speedStr}
-
-
-
-
-
-
-
-
- {error}
-
+
+
+
+
+
+ {this.state.title}
+
+
+
+
+
+
+
+
+
+
+
{speedStr}
+
+
+
+
+
+
+
+
+ {error}
+
+
+
);
}
diff --git a/src/recordings.css b/src/recordings.css
index f7d6965..80b7be5 100644
--- a/src/recordings.css
+++ b/src/recordings.css
@@ -377,8 +377,26 @@ table.listing-ct > thead th:last-child, tr.listing-ct-item td:last-child {
margin-bottom: 0;
}
+#recording-wrap {
+ height: 100%;
+}
+
+#input-textarea {
+ width: 100%;
+ heigth: 100%;
+ font-family: monospace;
+}
+
+#input-player-wrap {
+ height: 100%;
+}
+
.logs-view-log-time {
display: inline-block;
width: 150px;
vertical-align: middle;
}
+
+#input-player textarea{
+ resize: none;
+}
diff --git a/src/recordings.jsx b/src/recordings.jsx
index 25c7e79..748c6d8 100644
--- a/src/recordings.jsx
+++ b/src/recordings.jsx
@@ -495,7 +495,7 @@
-
+
{_("Recording")}
@@ -539,9 +539,7 @@
-
- {player}
-
+ {player}
);