Added guest sharing icon to desktop tab, #3288
Ylian Saint-Hilaire committed
Nov 19, 2021 at 10:50 UTC
d915dea2e2c322810f357060beb5b48e3190392a
3 files changed
+8
-2
public/images/icon-share2.png
Binary files /dev/null and b/public/images/icon-share2.png differ
public/styles/style.css
+1
-1
@@ -2627,7 +2627,7 @@ a {
2627
-ms-grid-row: 4;
2628
}
2629
2630
-#DeskChatButton, #DeskNotifyButton, #DeskOpenWebButton, #DeskBackgroundButton, #DeskSaveImageButton, #DeskRecordButton, #DeskClipboardInButton, #DeskClipboardOutButton, #DeskRefreshButton, #DeskLockButton, #DeskInputLockedButton, #DeskInputUnLockedButton {
2630
+#DeskChatButton, #DeskNotifyButton, #DeskOpenWebButton, #DeskBackgroundButton, #DeskSaveImageButton, #DeskRecordButton, #DeskClipboardInButton, #DeskClipboardOutButton, #DeskRefreshButton, #DeskLockButton, #DeskInputLockedButton, #DeskInputUnLockedButton, #DeskGuestShareButton {
2631
float: right;
2632
margin-top: 1px;
2633
margin-right: 4px;
views/default.handlebars
+7
-1
@@ -681,6 +681,7 @@
681
<span id=DeskRefreshButton title="Refresh the desktop"><img id=DeskRefreshButtonImage src='images/icon-refresh.png' onclick=deskRefreshFunction() height=16 width=16 style=padding-top:2px /></span>
682
<span id=DeskInputLockedButton title="Remote input is locked"><img id=DeskInputLockedButtonImage src='images/icon-keylock-red.png' onclick=deskInputLockFunction(0) height=16 width=16 style=padding-top:2px /></span>
683
<span id=DeskInputUnLockedButton title="Remote input is unlocked"><img id=DeskInputUnLockedButtonImage src='images/icon-keylock.png' onclick=deskInputLockFunction(1) height=16 width=16 style=padding-top:2px /></span>
684
+ <span id=DeskGuestShareButton title="Share the device with a guest"><img id=DeskInputUnLockedButtonImage src='images/icon-share2.png' onclick=showShareDevice() height=16 width=16 style=padding-top:2px /></span>
685
</div>
686
<div>
687
<select id="deskkeys" cmenu=deskKeyShortcutContextMenu></select>
@@ -6858,7 +6859,12 @@
6859
if ((serverinfo != null) && (serverinfo.altmessenging != null) && (meshrights & 8) && (connectivity & 1)) {
6860
for (var i in serverinfo.altmessenging) { x += '<input type=button value="' + EscapeHtml(serverinfo.altmessenging[i].name) + '" onclick=altDeviceChat(event,' + i + ') />'; }
6861
}
6861
- if ((serverinfo.guestdevicesharing !== false) && (node.agent != null) && (node.agent.caps & 3) && (connectivity & 1) && ((meshrights & 0x80008) == 0x80008) && ((meshrights == 0xFFFFFFFF) || ((meshrights & 0x1000) == 0))) { x += '<input type=button value="' + "Share" + '" title="' + "Create a link to share this device with a guest" + '" onclick=showShareDevice() />'; }
6862
+ if ((serverinfo.guestdevicesharing !== false) && (node.agent != null) && (node.agent.caps & 3) && (connectivity & 1) && ((meshrights & 0x80008) == 0x80008) && ((meshrights == 0xFFFFFFFF) || ((meshrights & 0x1000) == 0))) {
6863
+ x += '<input type=button value="' + "Share" + '" title="' + "Create a link to share this device with a guest" + '" onclick=showShareDevice() />';
6864
+ QV('DeskGuestShareButton', true);
6865
+ } else {
6866
+ QV('DeskGuestShareButton', false);
6867
+ }
6868
6869
// Custom UI
6870
if ((customui != null) && (customui.devicebuttons != null)) {