RemoteDesktop: allow saving current connection to setting
All checks were successful
gitea-sync/antosdk-apps/pipeline/head This commit looks good

This commit is contained in:
DanyLE 2023-07-23 13:18:43 +02:00
parent 761c2556cb
commit 3a3f55e7c8
12 changed files with 40 additions and 18 deletions

View File

@ -7,6 +7,7 @@ Further information on **wvnc**: [https://blog.lxsang.me/post/id/23](https://blo
## Change logs ## Change logs
* v0.1.17 - Allow to save current connection to setting
* v0.1.16 - Allow to enable/disable mouse capture in remote desktop, remove some unused toolbar buttons * v0.1.16 - Allow to enable/disable mouse capture in remote desktop, remove some unused toolbar buttons
* v0.1.15 - Only send ACK command when finish rendering the received frame, this allows to vastly improve performance and bandwidth * v0.1.15 - Only send ACK command when finish rendering the received frame, this allows to vastly improve performance and bandwidth
* v0.1.14 - Add toolbar for canvas size control * v0.1.14 - Add toolbar for canvas size control

View File

@ -3,6 +3,10 @@
"targets": { "targets": {
"init": { "init": {
"jobs": [ "jobs": [
{
"name": "vfs-rm_no_error",
"data": ["build/debug","build/release"]
},
{ {
"name": "vfs-mkdir", "name": "vfs-mkdir",
"data": [ "data": [

View File

@ -7,6 +7,7 @@ Further information on **wvnc**: [https://blog.lxsang.me/post/id/23](https://blo
## Change logs ## Change logs
* v0.1.17 - Allow to save current connection to setting
* v0.1.16 - Allow to enable/disable mouse capture in remote desktop, remove some unused toolbar buttons * v0.1.16 - Allow to enable/disable mouse capture in remote desktop, remove some unused toolbar buttons
* v0.1.15 - Only send ACK command when finish rendering the received frame, this allows to vastly improve performance and bandwidth * v0.1.15 - Only send ACK command when finish rendering the received frame, this allows to vastly improve performance and bandwidth
* v0.1.14 - Add toolbar for canvas size control * v0.1.14 - Add toolbar for canvas size control

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
"author": "Dany LE", "author": "Dany LE",
"email": "contact@iohub.dev" "email": "contact@iohub.dev"
}, },
"version":"0.1.16-b", "version":"0.1.17-b",
"dependencies": [], "dependencies": [],
"category":"Internet", "category":"Internet",
"icon": "icon.png", "icon": "icon.png",

View File

@ -6,18 +6,23 @@ class ConnectionDialog extends this.OS.GUI.BasicDialog
main: () -> main: () ->
super.main() super.main()
@find("bbp").data = [ @find("bbp").data = [
{ text: "16 bits", value: 16, selected: true }, { text: "16 bits", value: 16},
{ text: "32 bits", value: 32 } { text: "32 bits", value: 32 }
] ]
@find("jq").value = 40 (@find "txtWVNC").value = @parent.setting.wvnc
(@find "txtServer").value = @parent.setting.server
sel = 0
sel = 1 if @parent.setting.bbc is 32
(@find "bbp").selected = sel
(@find "jq").value = @parent.setting.quality
@find("bt-ok").onbtclick = (e) => @find("bt-ok").onbtclick = (e) =>
return unless @handle return unless @handle
data = @parent.setting.wvnc = (@find "txtWVNC").value
wvnc: (@find "txtWVNC").value @parent.setting.server = (@find "txtServer").value
server: (@find "txtServer").value @parent.setting.bbc = (@find "bbp").selectedItem.data.value
bbp: (@find "bbp").selectedItem.data.value, @parent.setting.quality = (@find "jq").value
quality:(@find "jq").value @handle undefined
@handle data
@quit() @quit()
@find("bt-cancel").onbtclick = (e) => @find("bt-cancel").onbtclick = (e) =>
@ -26,8 +31,8 @@ class ConnectionDialog extends this.OS.GUI.BasicDialog
ConnectionDialog.scheme = """ ConnectionDialog.scheme = """
<afx-app-window width='350' height='320'> <afx-app-window width='350' height='320'>
<afx-vbox padding="5"> <afx-vbox padding="5">
<afx-input label="__(WVNC Websocket)" data-height="50" data-id="txtWVNC" value="wss://app.iohub.dev/wbs/wvnc"></afx-input> <afx-input label="__(WVNC Websocket)" data-height="50" data-id="txtWVNC"></afx-input>
<afx-input label="__(VNC Server)" data-height="50" data-id="txtServer" value="192.168.1.27:5900"></afx-input> <afx-input label="__(VNC Server)" data-height="50" data-id="txtServer" ></afx-input>
<div data-height="5"></div> <div data-height="5"></div>
<afx-label text="__(Bits per pixel)" data-height="30" class="header" ></afx-label> <afx-label text="__(Bits per pixel)" data-height="30" class="header" ></afx-label>
<afx-list-view dropdown = "true" data-id ="bbp" data-height="35" ></afx-list-view> <afx-list-view dropdown = "true" data-id ="bbp" data-height="35" ></afx-list-view>
@ -92,6 +97,16 @@ class RemoteDesktop extends this.OS.application.BaseApplication
@switch = @find "capture_mouse" @switch = @find "capture_mouse"
@switch.onswchange = (e) => @switch.onswchange = (e) =>
@client.mouseCapture = @switch.swon @client.mouseCapture = @switch.swon
proto = "ws"
proto += "s" if window.location.protocol.startsWith "https"
host = "#{window.location.host}"
if window.location.port and window.location.port isnt ""
host += ":#{window.location.port}"
@setting.wvnc = "#{proto}://#{host}/wvnc" unless @setting.wvnc
@setting.server = "127.0.0.1:5900" unless @setting.server
@setting.bbp = 16 unless @setting.bbp
@setting.quality = 40 unless @setting.quality
@btreset.onbtclick = (e) => @btreset.onbtclick = (e) =>
w = $(@container).width() w = $(@container).width()
h = $(@container).height() h = $(@container).height()
@ -177,10 +192,10 @@ class RemoteDesktop extends this.OS.application.BaseApplication
showConnectionDialog: () -> showConnectionDialog: () ->
return unless @client return unless @client
@openDialog new ConnectionDialog, { title: __("Connection")} @openDialog new ConnectionDialog, { title: __("Connection"), data: @setting}
.then (d) => .then (d) =>
@client.ws = d.wvnc @client.ws = @setting.wvnc
@client.connect d.server, d @client.connect @setting.server, @setting
cleanup: () -> cleanup: () ->
@client.disconnect(true) if @client @client.disconnect(true) if @client

View File

@ -7,7 +7,7 @@
"author": "Dany LE", "author": "Dany LE",
"email": "contact@iohub.dev" "email": "contact@iohub.dev"
}, },
"version":"0.1.16-b", "version":"0.1.17-b",
"dependencies": [], "dependencies": [],
"category":"Internet", "category":"Internet",
"icon": "icon.png", "icon": "icon.png",

View File

@ -375,7 +375,7 @@
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/2.0.x/RemoteDesktop/README.md", "description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/2.0.x/RemoteDesktop/README.md",
"category": "Internet", "category": "Internet",
"author": "Dany LE", "author": "Dany LE",
"version": "0.1.16-b", "version": "0.1.17-b",
"dependencies": [],"category":"Internet","icon":"icon.png","mimes":["none"], "dependencies": [],"category":"Internet","icon":"icon.png","mimes":["none"],
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/2.0.x/RemoteDesktop/build/release/RemoteDesktop.zip" "download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/2.0.x/RemoteDesktop/build/release/RemoteDesktop.zip"
}, },

View File

@ -7,6 +7,7 @@ Further information on **wvnc**: [https://blog.lxsang.me/post/id/23](https://blo
## Change logs ## Change logs
* v0.1.17 - Allow to save current connection to setting
* v0.1.16 - Allow to enable/disable mouse capture in remote desktop, remove some unused toolbar buttons * v0.1.16 - Allow to enable/disable mouse capture in remote desktop, remove some unused toolbar buttons
* v0.1.15 - Only send ACK command when finish rendering the received frame, this allows to vastly improve performance and bandwidth * v0.1.15 - Only send ACK command when finish rendering the received frame, this allows to vastly improve performance and bandwidth
* v0.1.14 - Add toolbar for canvas size control * v0.1.14 - Add toolbar for canvas size control

Binary file not shown.

File diff suppressed because one or more lines are too long