mirror of
https://github.com/syssecfsu/witty.git
synced 2024-12-24 11:42:34 +01:00
replay UI is almost done
This commit is contained in:
parent
7a65c02495
commit
c144151c42
@ -1,7 +1,7 @@
|
||||
#terminal {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 10px 0 20px;
|
||||
margin: 10px 0 10px;
|
||||
}
|
||||
|
||||
#terminal #terminal_view {
|
||||
|
@ -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()
|
||||
|
7
main.go
7
main.go
@ -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")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user