fix Vterm error

This commit is contained in:
lxsang 2020-08-08 21:41:33 +02:00
parent 328172ef90
commit 0841cbce77
6 changed files with 9 additions and 8 deletions

View File

@ -149,7 +149,7 @@
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/vTerm/README.md",
"category": "System",
"author": "Xuan Sang LE",
"version": "0.1.2-a",
"version": "0.1.3-a",
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/vTerm/build/release/vTerm.zip"
},
{

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.1.2-a",
"version":"0.1.3-a",
"category":"System",
"iconclass":"fa fa-terminal",
"mimes":["none"],

Binary file not shown.

View File

@ -27,12 +27,11 @@ class vTerm extends this.OS.application.BaseApplication
@term.loadAddon(@fitAddon)
@term.setOption('fontSize', '12')
@term.open @mterm
@sub = undefined
@term.onKey (d) =>
return unless @sub
@sub.send Antunnel.Msg.DATA, new TextEncoder("utf-8").encode(d.key)
@sub = undefined
@on "focus", () => @term.focus()
@mterm.contextmenuHandle = (e, m) =>
@ -51,6 +50,7 @@ class vTerm extends this.OS.application.BaseApplication
@on "hboxchange", (e) =>
@resizeContent()
checklib = () =>
if not Antunnel.tunnel
@error __("The Antunnel service is not started, please start it first")
@ -62,7 +62,8 @@ class vTerm extends this.OS.application.BaseApplication
@tunnel = Antunnel.tunnel
@openSession()
if not Antunnel
if not window.Antunnel
console.log "require Antunnel"
@_api.requires("pkg://Antunnel/main.js").then () =>
checklib()
.catch (e) =>

View File

@ -6,7 +6,7 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.1.2-a",
"version":"0.1.3-a",
"category":"System",
"iconclass":"fa fa-terminal",
"mimes":["none"],