aboutsummaryrefslogtreecommitdiffstats
path: root/termcast_server/index.html
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-09-23 20:49:50 -0400
committerJesse Luehrs <doy@tozt.net>2014-09-23 20:49:50 -0400
commit30729ca5c0a389781d6029d0134ac508db741475 (patch)
tree94785ca45cde5ec7405e1965180b8534bafeb181 /termcast_server/index.html
parent18cbe913dc4ccde27aa518713d2f4f3376f9dba9 (diff)
downloadpython-termcast-server-30729ca5c0a389781d6029d0134ac508db741475.tar.gz
python-termcast-server-30729ca5c0a389781d6029d0134ac508db741475.zip
actually draw the screen contents
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") {