replay UI is almost done

This commit is contained in:
Zhi Wang 2022-01-15 07:13:42 -05:00
parent 7a65c02495
commit c144151c42
3 changed files with 11 additions and 4 deletions

View File

@ -1,7 +1,7 @@
#terminal {
display: flex;
justify-content: center;
margin: 10px 0 20px;
margin: 10px 0 10px;
}
#terminal #terminal_view {

View File

@ -58,12 +58,12 @@
// print something to test output and scroll
var str = [
' ┌────────────────────────────────────────────────────────────────────────────┐\n',
' │ Powered by \u001b[32;1mGo, Gin, websocket, pty, and xterm.js\x1b[0m │\n',
' │ \u001b[32;1mhttps://github.com/syssecfsu/witty\x1b[0m <- click it! \n',
' └────────────────────────────────────────────────────────────────────────────┘\n',
''
].join('');
term.writeln(str);
term.writeln (str)
}
Init()

View File

@ -131,6 +131,13 @@ func main() {
term_conn.StopRecord(id)
})
// create a viewer of an interactive session
rt.GET("/replay/*id", func(c *gin.Context) {
id := c.Param("id")
log.Println("replay/ called with", id)
c.HTML(http.StatusOK, "replay.html", nil)
})
// handle static files
rt.Static("/assets", "./assets")