fix stuff

This commit is contained in:
lxsang 2018-10-01 17:13:47 +00:00
parent eb7dddc423
commit e6405d047f
6 changed files with 36 additions and 12 deletions

View File

@ -4,7 +4,7 @@ This project is generated by AntOS Development Kit
## Howto ## Howto
1. Open the project.apj file with AntOSDK (simply double Click on it) 1. Open the project.apj file with AntOSDK (simply double Click on it)
2. Modify the UI in *assets/scheme.html* 2. Modify the UI in *assets/scheme.html*
3. Modify application code in *coffees/main.coffee* 3. Modify application code in *coffees/main.coffee*
4. Modify CSS style in *css/main.css* 4. Modify CSS style in *css/main.css*
5. Other files need to be copied: put in to assets 5. Other files need to be copied: put in to assets
@ -14,7 +14,7 @@ This project is generated by AntOS Development Kit
Click **Menu> Build > Build Option** or simply hit **ALT-Y** Click **Menu> Build > Build Option** or simply hit **ALT-Y**
In the build options dialog, add or remove files that need to be In the build options dialog, add or remove files that need to be
included into the build included into the build
Click **Save** Click **Save**

View File

@ -4,7 +4,7 @@ This project is generated by AntOS Development Kit
## Howto ## Howto
1. Open the project.apj file with AntOSDK (simply double Click on it) 1. Open the project.apj file with AntOSDK (simply double Click on it)
2. Modify the UI in *assets/scheme.html* 2. Modify the UI in *assets/scheme.html*
3. Modify application code in *coffees/main.coffee* 3. Modify application code in *coffees/main.coffee*
4. Modify CSS style in *css/main.css* 4. Modify CSS style in *css/main.css*
5. Other files need to be copied: put in to assets 5. Other files need to be copied: put in to assets
@ -14,7 +14,7 @@ This project is generated by AntOS Development Kit
Click **Menu> Build > Build Option** or simply hit **ALT-Y** Click **Menu> Build > Build Option** or simply hit **ALT-Y**
In the build options dialog, add or remove files that need to be In the build options dialog, add or remove files that need to be
included into the build included into the build
Click **Save** Click **Save**

File diff suppressed because one or more lines are too long

View File

@ -31,7 +31,7 @@ class ConnectionDialog extends this.OS.GUI.BasicDialog
{ label: "__(Cancel)", onclick: (d) -> d.quit() } { label: "__(Cancel)", onclick: (d) -> d.quit() }
], ],
filldata: (d) -> filldata: (d) ->
(d.find "content1").value = "176.180.44.70:9999" (d.find "content1").value = "/opt/www/vnc.conf"
(d.find "content3").set "items", [ (d.find "content3").set "items", [
{ text: "16 bits", value: 16 }, { text: "16 bits", value: 16 },
{ text: "32 bits", value: 32, selected:true}] { text: "32 bits", value: 32, selected:true}]
@ -56,10 +56,15 @@ class RemoteDesktop extends this.OS.GUI.BaseApplication
ws: 'wss://localhost:9192/wvnc', ws: 'wss://localhost:9192/wvnc',
worker: "#{me._api.handler.get}/#{me.meta().path}/decoder.js" worker: "#{me._api.handler.get}/#{me.meta().path}/decoder.js"
} }
@client.onerror = (m) ->
me.error m
me.showConnectionDialog()
@client.onpassword = ()-> @client.onpassword = ()->
return new Promise (r,e)-> return new Promise (r,e)->
r("demopass") me.openDialog "PromptDialog", (d) ->
@client.init().then () -> r(d)
, __("VNC password"), { label: __("VNC password"), value: "demopass", type: "password" }
@client.init().then () ->
me.showConnectionDialog() me.showConnectionDialog()
showConnectionDialog: () -> showConnectionDialog: () ->
@ -67,4 +72,7 @@ class RemoteDesktop extends this.OS.GUI.BaseApplication
@openDialog new ConnectionDialog, (d) -> @openDialog new ConnectionDialog, (d) ->
me.client.connect d.server, d me.client.connect d.server, d
, __("Connection") , __("Connection")
cleanup: () ->
@client.disconnect() if @client
this.OS.register "RemoteDesktop", RemoteDesktop this.OS.register "RemoteDesktop", RemoteDesktop

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"name":"RemoteDesktop","root":"home://workspace/RemoteDesktop","css":[],"javascripts":["javascripts/wvnc.js"],"coffees":["coffees/main.coffee"],"copies":["assets/scheme.html","package.json","README.md","javascripts/decoder.js","javascripts/wvnc_asm.js"]} {"name":"RemoteDesktop","root":"home://workspace/RemoteDesktop","css":[],"javascripts":["javascripts/wvnc.js"],"coffees":["coffees/main.coffee"],"copies":["assets/scheme.html","package.json","README.md","javascripts/decoder.js","javascripts/wvnc_asm.js","javascripts/wvnc_asm.wasm"]}