aboutsummaryrefslogtreecommitdiffstats
path: root/termcast_server/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'termcast_server/index.html')
-rw-r--r--termcast_server/index.html17
1 files changed, 15 insertions, 2 deletions
diff --git a/termcast_server/index.html b/termcast_server/index.html
index 74c1d3e..373587f 100644
--- a/termcast_server/index.html
+++ b/termcast_server/index.html
@@ -8,6 +8,11 @@
.term {
display: none;
+ font-family: monospace;
+}
+
+.term .td {
+ width: 1em;
}
</style>
<script>
@@ -35,8 +40,16 @@ socket.onmessage = function (e) {
else if (type == "update_screen") {
document.querySelector('.menu').style.setProperty('display', 'none');
var termdiv = document.querySelector('.term');
- // XXX
- termdiv.innerHTML = "<h1>It's a terminal</h1>";
+ term = '<table class="screen">';
+ data.screen.forEach(function (row) {
+ term += '<tr>';
+ row.forEach(function (cell) {
+ term += '<td>' + cell.contents + '</td>';
+ });
+ term += '</td>';
+ });
+ term += '</table>';
+ termdiv.innerHTML = term;
termdiv.style.setProperty('display', 'block');
}
else if (type == "streamer_disconnect") {