RemoteDesktop: v0.1.16 - Allow to enable/disable mouse capture in remote desktop, remove some unused toolbar buttons

This commit is contained in:
DanyLE 2023-01-08 00:21:02 +01:00
parent b3db4861ef
commit a2a602f5b2
13 changed files with 24 additions and 22 deletions

View File

@ -7,6 +7,7 @@ Further information on **wvnc**: [https://blog.lxsang.me/post/id/23](https://blo
## Change logs
* 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.14 - Add toolbar for canvas size control
* v0.1.13 - support AntOS v2.0.x

View File

@ -1,7 +1,7 @@
afx-app-window[data-id="RemoteDesktop"] div[data-id="container"]
{
background-color: #272822;
overflow: hidden;
overflow: auto;
}
afx-app-window[data-id="RemoteDesktop"] canvas[data-id="screen"]
{

View File

@ -8,10 +8,9 @@
<div data-width = "5" ></div>
<afx-slider data-id="zoom" ></afx-slider>
<div data-width = "5" ></div>
<afx-button iconclass="bi bi-box-arrow-down" data-id="scroll_down" data-width="content"></afx-button>
<afx-button iconclass="bi bi-box-arrow-up" data-id="scroll_up" data-width="content"></afx-button>
<afx-button iconclass="bi bi-box-arrow-left" data-id="scroll_left" data-width="content"></afx-button>
<afx-button iconclass="bi bi-box-arrow-right" data-id="scroll_right" data-width="content"></afx-button>
<afx-switch data-id="capture_mouse" swon="true" data-width="content" style="line-height:35px;"></afx-switch>
<afx-label text="__(Mouse capture)" data-width="content" style="line-height:35px;"></afx-label>
<div data-width = "2" ></div>
</afx-hbox>
</afx-vbox>
</afx-app-window>

View File

@ -7,6 +7,7 @@ Further information on **wvnc**: [https://blog.lxsang.me/post/id/23](https://blo
## Change logs
* 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.14 - Add toolbar for canvas size control
* v0.1.13 - support AntOS v2.0.x

View File

@ -1,7 +1,7 @@
afx-app-window[data-id="RemoteDesktop"] div[data-id="container"]
{
background-color: #272822;
overflow: hidden;
overflow: auto;
}
afx-app-window[data-id="RemoteDesktop"] canvas[data-id="screen"]
{

File diff suppressed because one or more lines are too long

View File

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

View File

@ -8,10 +8,9 @@
<div data-width = "5" ></div>
<afx-slider data-id="zoom" ></afx-slider>
<div data-width = "5" ></div>
<afx-button iconclass="bi bi-box-arrow-down" data-id="scroll_down" data-width="content"></afx-button>
<afx-button iconclass="bi bi-box-arrow-up" data-id="scroll_up" data-width="content"></afx-button>
<afx-button iconclass="bi bi-box-arrow-left" data-id="scroll_left" data-width="content"></afx-button>
<afx-button iconclass="bi bi-box-arrow-right" data-id="scroll_right" data-width="content"></afx-button>
<afx-switch data-id="capture_mouse" swon="true" data-width="content" style="line-height:35px;"></afx-switch>
<afx-label text="__(Mouse capture)" data-width="content" style="line-height:35px;"></afx-label>
<div data-width = "2" ></div>
</afx-hbox>
</afx-vbox>
</afx-app-window>

View File

@ -10,6 +10,7 @@ class WVNC
@canvas = document.getElementById @canvas if typeof @canvas is 'string'
@decoder = new Worker worker
@enableEvent = false
@mouseCapture = true
@pingto = false
me = @
@mouseMask = 0
@ -47,15 +48,18 @@ class WVNC
return false
me.canvas.onmousemove = (e) ->
return unless me.mouseCapture
sendMouseLocation e
me.canvas.onmousedown = (e) ->
return unless me.mouseCapture
state = 1 << e.button
me.mouseMask = me.mouseMask | state
sendMouseLocation e
#e.preventDefault()
me.canvas.onmouseup = (e) ->
return unless me.mouseCapture
state = 1 << e.button
me.mouseMask = me.mouseMask & (~state)
sendMouseLocation e
@ -109,6 +113,7 @@ class WVNC
# mouse wheel event
@canvas.addEventListener 'wheel', (e) ->
return unless me.enableEvent
return unless me.mouseCapture
#if (e.deltaY < 0) # up
p = getMousePos e
e.preventDefault()

View File

@ -34,6 +34,7 @@ ConnectionDialog.scheme = """
<div data-height="5"></div>
<afx-label text="__(JPEG quality)" data-height="30" class="header" ></afx-label>
<afx-slider data-id ="jq" data-height="30" ></afx-slider>
<div></div>
<afx-hbox data-height = '35'>
<div style=' text-align:right;'>
<afx-button data-id = "bt-ok" text = "__(Connect)"></afx-button>
@ -65,6 +66,7 @@ CredentialDialog.scheme = """
<afx-vbox padding="5">
<afx-input label="__(Username)" data-height="55" data-id="txtUser"></afx-input>
<afx-input label="__(Password)" data-height="55" type="password" data-id="txtPass"></afx-input>
<div></div>
<afx-hbox data-height = '35'>
<div style=' text-align:right;'>
<afx-button data-id = "bt-ok" text = "__(Ok)"></afx-button>
@ -87,14 +89,9 @@ class RemoteDesktop extends this.OS.application.BaseApplication
@zoom.max = 200
@zoom.value = 100
@zoom.onvaluechange = (e) => @setScale()
@find("scroll_down").onbtclick = (e) =>
@container.scrollTop += 20
@find("scroll_up").onbtclick = (e) =>
@container.scrollTop -= 20
@find("scroll_left").onbtclick = (e) =>
@container.scrollLeft -= 20
@find("scroll_right").onbtclick = (e) =>
@container.scrollLeft += 20
@switch = @find "capture_mouse"
@switch.onswchange = (e) =>
@client.mouseCapture = @switch.swon
@btreset.onbtclick = (e) =>
w = $(@container).width()
h = $(@container).height()

View File

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

View File

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