mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
display correct username
This commit is contained in:
parent
9a22055c27
commit
c16a9a955e
1 changed files with 5 additions and 5 deletions
|
@ -254,7 +254,7 @@
|
|||
</div>
|
||||
<div class="main">
|
||||
<div id="user-info-div">
|
||||
<h4>faye @ dev-welcome</h4>
|
||||
<h4></h4>
|
||||
<div class="dropdown">
|
||||
<button id="visibility-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Online
|
||||
|
@ -327,8 +327,9 @@
|
|||
$("#dev-div").append("<p>" + data.users[i].username + "is online but not in a domain</p>");
|
||||
} else {
|
||||
$("#dev-div").append("<li>" + data.users[i].username + " @ " + data.users[i].location.root.name + "</li>");
|
||||
// Don't display yourself
|
||||
if (data.users[i].username !== myUsername) {
|
||||
if (data.users[i].username === myUsername) {
|
||||
$("#user-info-div h4").text(data.users[i].username + " @ " + data.users[i].location.root.name);
|
||||
} else {
|
||||
console.log(data.users[i].username + " @ " + data.users[i].location.root.name);
|
||||
// Create a list item and put user info in data-* attributes, also make it trigger the jump to confirmation modal
|
||||
$("<li></li>", {
|
||||
|
@ -383,8 +384,7 @@
|
|||
if (event.type === "user-info") {
|
||||
myUsername = event.data.username;
|
||||
myVisibility = event.data.visibility;
|
||||
$("#dev-div").append("<p>myUsername is " + myUsername + "</p>");
|
||||
$("#dev-div").append("<p>myVisibility is " + myVisibility + "</p>");
|
||||
$("#user-info-div h4").text(myUsername);
|
||||
var buttonText = "Online";
|
||||
if (myVisibility === "none") {
|
||||
buttonText = "Appear Offline";
|
||||
|
|
Loading…
Reference in a new issue