move xterm lib to assets/external

This commit is contained in:
Zhi Wang 2022-01-07 11:11:37 -05:00
parent 477454e9bf
commit c3606288c8
11 changed files with 9 additions and 6 deletions

View File

@ -1,7 +1,6 @@
This directory contains xterm.js 4.16
To update this to a newer version of xterm.js, run
`npm install xterm.js` in a different directory,
and copy xterm.js and xterm.js.map and xterm.css here.
Do the same to three of xterm.js's addons.
To update the xterm library to a newer version of xterm.js, run
`npm install xterm.js` in a different directory, and then copy
xterm.js and xterm.js.map and xterm.css and the files for three
of xterm.js's addons to the external directory.

View File

@ -224,9 +224,13 @@ func fileHandler(c *gin.Context, fname string) {
} else {
//c.HTML interprets the file as HTML file
//we do not need that for regular files
if strings.HasPrefix(fname, "xterm") {
c.File(fmt.Sprint("./assets/external/", fname))
} else {
c.File(fmt.Sprint("./assets/", fname))
}
}
}
func main() {
fp, err := os.OpenFile("web_term.log", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)