Fix for 2851. Added user account link.
Ylian Saint-Hilaire committed
Jul 2, 2021 at 13:09 UTC
3a6947b4838cd177fc70c4001700655089403eb4
2 files changed
+5
-7
meshrelay.js
+1
-4
@@ -1188,10 +1188,7 @@ function CreateLocalRelayEx(parent, ws, req, domain, user, cookie) {
1188
ws.flushSink = function () { try { ws._socket.resume(); } catch (ex) { console.log(ex); } };
1189
1190
// When data is received from the mesh relay web socket
1191
- ws.on('message', function (data) {
1192
- if (typeof data != 'string') { try { ws._socket.pause(); obj.client.write(data, ws.flushSink); } catch (ex) { } }
1193
- else { console.log("RelayString: " + data); }
1194
- }); // Perform relay
1191
+ ws.on('message', function (data) { if (typeof data != 'string') { try { ws._socket.pause(); obj.client.write(data, ws.flushSink); } catch (ex) { } } }); // Perform relay
1192
1193
// If error, close both sides of the relay.
1194
ws.on('error', function (err) { parent.relaySessionErrorCount++; obj.close(); });
views/default.handlebars
+4
-3
@@ -1446,9 +1446,10 @@
1446
1447
// Setup logout control
1448
var logoutControl = '';
1449
- if (logoutControls)
1450
- if (logoutControls.name != null) { logoutControl = format("Welcome {0}.", logoutControls.name); }
1451
- if (logoutControls.logoutUrl != null) { logoutControl += format(' <a href="' + logoutControls.logoutUrl + '" style="color:white">' + "Logout" + '</a>'); }
1449
+ if (logoutControls) {
1450
+ if (logoutControls.name != null) { logoutControl = ('<span onclick=go(2) style="color:white;cursor:pointer">' + format("Welcome {0}.", logoutControls.name) + '</span>'); }
1451
+ if (logoutControls.logoutUrl != null) { logoutControl += format(' <a href="' + logoutControls.logoutUrl + '" style="color:white">' + "Logout" + '</a>'); }
1452
+ }
1453
if (args.hide & 1) { QH('logoutControlSpan2', logoutControl); } else { QH('logoutControlSpan', logoutControl); }
1454
1455
// Setup the context menu