mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-12-25 11:48:21 +01:00
fix Vterm error
This commit is contained in:
parent
328172ef90
commit
0841cbce77
@ -149,7 +149,7 @@
|
|||||||
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/vTerm/README.md",
|
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/vTerm/README.md",
|
||||||
"category": "System",
|
"category": "System",
|
||||||
"author": "Xuan Sang LE",
|
"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"
|
"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
@ -6,7 +6,7 @@
|
|||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"email": "xsang.le@gmail.com"
|
"email": "xsang.le@gmail.com"
|
||||||
},
|
},
|
||||||
"version":"0.1.2-a",
|
"version":"0.1.3-a",
|
||||||
"category":"System",
|
"category":"System",
|
||||||
"iconclass":"fa fa-terminal",
|
"iconclass":"fa fa-terminal",
|
||||||
"mimes":["none"],
|
"mimes":["none"],
|
||||||
|
Binary file not shown.
@ -27,12 +27,11 @@ class vTerm extends this.OS.application.BaseApplication
|
|||||||
@term.loadAddon(@fitAddon)
|
@term.loadAddon(@fitAddon)
|
||||||
@term.setOption('fontSize', '12')
|
@term.setOption('fontSize', '12')
|
||||||
@term.open @mterm
|
@term.open @mterm
|
||||||
|
@sub = undefined
|
||||||
@term.onKey (d) =>
|
@term.onKey (d) =>
|
||||||
return unless @sub
|
return unless @sub
|
||||||
@sub.send Antunnel.Msg.DATA, new TextEncoder("utf-8").encode(d.key)
|
@sub.send Antunnel.Msg.DATA, new TextEncoder("utf-8").encode(d.key)
|
||||||
|
|
||||||
@sub = undefined
|
|
||||||
|
|
||||||
@on "focus", () => @term.focus()
|
@on "focus", () => @term.focus()
|
||||||
|
|
||||||
@mterm.contextmenuHandle = (e, m) =>
|
@mterm.contextmenuHandle = (e, m) =>
|
||||||
@ -51,6 +50,7 @@ class vTerm extends this.OS.application.BaseApplication
|
|||||||
@on "hboxchange", (e) =>
|
@on "hboxchange", (e) =>
|
||||||
@resizeContent()
|
@resizeContent()
|
||||||
|
|
||||||
|
|
||||||
checklib = () =>
|
checklib = () =>
|
||||||
if not Antunnel.tunnel
|
if not Antunnel.tunnel
|
||||||
@error __("The Antunnel service is not started, please start it first")
|
@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
|
@tunnel = Antunnel.tunnel
|
||||||
@openSession()
|
@openSession()
|
||||||
|
|
||||||
if not Antunnel
|
if not window.Antunnel
|
||||||
|
console.log "require Antunnel"
|
||||||
@_api.requires("pkg://Antunnel/main.js").then () =>
|
@_api.requires("pkg://Antunnel/main.js").then () =>
|
||||||
checklib()
|
checklib()
|
||||||
.catch (e) =>
|
.catch (e) =>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"email": "xsang.le@gmail.com"
|
"email": "xsang.le@gmail.com"
|
||||||
},
|
},
|
||||||
"version":"0.1.2-a",
|
"version":"0.1.3-a",
|
||||||
"category":"System",
|
"category":"System",
|
||||||
"iconclass":"fa fa-terminal",
|
"iconclass":"fa fa-terminal",
|
||||||
"mimes":["none"],
|
"mimes":["none"],
|
||||||
|
Loading…
Reference in New Issue
Block a user