From 8a53c15897c8ca7ae31086a41b01e6c42cbba075 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Wed, 1 Dec 2021 15:12:07 -0800 Subject: [PATCH] Improved guest share list in device group tab. --- views/default.handlebars | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/views/default.handlebars b/views/default.handlebars index d613b0a3..cc6ec576 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -11710,7 +11710,7 @@ // Show device shares if ((deviceShares != null) && (deviceSharesNode == currentMesh._id) && (deviceShares.length > 0)) { - x += '

'; + x += '

' + "Active Device Sharing" + '
'; count = 1; for (var i = 0; i < deviceShares.length; i++) { var dshare = deviceShares[i], trash = ''; @@ -11728,7 +11728,12 @@ } var guestName = EscapeHtml(dshare.guestName); if (dshare.publicid.startsWith('AS:node/')) { guestName = '' + "Agent Self-Share" + ''; } - x += ''; + var node = getNodeFromId(dshare.nodeid); + if (node != null) { + var gray = ((node.conn > 0)?'':' gray'); + var computer = '
 ' + EscapeHtml(node.name) + ''; + x += ''; + } } x += '
' + "Active Device Sharing" + '
 ' + guestName + '
' + trash + '
' + details + '
' + computer + '
 ' + guestName + '
' + trash + '
' + details + '
'; } else { @@ -11760,11 +11765,7 @@ // If we are full administrator on this mesh, allow deletion of the mesh if (meshrights == 0xFFFFFFFF) { - if (count == 0) { - x += '
' + "Delete Group" + '
'; - } else { - y += '
' + "Delete Group" + '
'; - } + y += '
' + "Delete Group" + '
'; } QH('p20info', x);