Fix for 2851. Added user account link.

This commit is contained in:
Ylian Saint-Hilaire 2021-07-02 13:09:38 -07:00
parent c06715682e
commit 3a6947b483
2 changed files with 5 additions and 7 deletions

View File

@ -1188,10 +1188,7 @@ function CreateLocalRelayEx(parent, ws, req, domain, user, cookie) {
ws.flushSink = function () { try { ws._socket.resume(); } catch (ex) { console.log(ex); } };
// When data is received from the mesh relay web socket
ws.on('message', function (data) {
if (typeof data != 'string') { try { ws._socket.pause(); obj.client.write(data, ws.flushSink); } catch (ex) { } }
else { console.log("RelayString: " + data); }
}); // Perform relay
ws.on('message', function (data) { if (typeof data != 'string') { try { ws._socket.pause(); obj.client.write(data, ws.flushSink); } catch (ex) { } } }); // Perform relay
// If error, close both sides of the relay.
ws.on('error', function (err) { parent.relaySessionErrorCount++; obj.close(); });

View File

@ -1446,9 +1446,10 @@
// Setup logout control
var logoutControl = '';
if (logoutControls)
if (logoutControls.name != null) { logoutControl = format("Welcome {0}.", logoutControls.name); }
if (logoutControls.logoutUrl != null) { logoutControl += format(' <a href="' + logoutControls.logoutUrl + '" style="color:white">' + "Logout" + '</a>'); }
if (logoutControls) {
if (logoutControls.name != null) { logoutControl = ('<span onclick=go(2) style="color:white;cursor:pointer">' + format("Welcome {0}.", logoutControls.name) + '</span>'); }
if (logoutControls.logoutUrl != null) { logoutControl += format(' <a href="' + logoutControls.logoutUrl + '" style="color:white">' + "Logout" + '</a>'); }
}
if (args.hide & 1) { QH('logoutControlSpan2', logoutControl); } else { QH('logoutControlSpan', logoutControl); }
// Setup the context menu