mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-12 10:24:20 +08:00
showing on the user list whos typing
This commit is contained in:
parent
b14fc7e4be
commit
673d283746
3 changed files with 15 additions and 1 deletions
|
|
@ -4640,6 +4640,10 @@ $(document).on("click", "#top .logo", (e) => {
|
|||
changePage("test");
|
||||
});
|
||||
|
||||
$(document).on("click", "#top .config .text-button", (e) => {
|
||||
$(e.currentTarget).blur();
|
||||
});
|
||||
|
||||
$(document).on("click", "#top .config .wordCount .text-button", (e) => {
|
||||
const wrd = $(e.currentTarget).attr("wordCount");
|
||||
if (wrd == "custom") {
|
||||
|
|
|
|||
|
|
@ -90,6 +90,9 @@ function mp_refreshUserList() {
|
|||
if (user.isReady) {
|
||||
icons += '<i class="fas fa-check"></i>';
|
||||
}
|
||||
if (user.isTyping) {
|
||||
icons += '<i class="fas fa-keyboard"></i>';
|
||||
}
|
||||
let pointsString;
|
||||
if (user.points == undefined) {
|
||||
pointsString = "";
|
||||
|
|
@ -100,7 +103,7 @@ function mp_refreshUserList() {
|
|||
<div class='user ${user.sid === MP.id ? "me" : ""}'>
|
||||
<div class='name'>${
|
||||
user.name
|
||||
} ${icons}</div><div class='points'>${pointsString}</div>
|
||||
}${icons}</div><div class='points'>${pointsString}</div>
|
||||
</div>
|
||||
`);
|
||||
$(".pageTest #result .tribeResultChat .userlist .list").append(`
|
||||
|
|
@ -1199,8 +1202,12 @@ MP.socket.on("mp_room_points", (data) => {
|
|||
});
|
||||
|
||||
MP.socket.on("mp_room_back_to_lobby", (data) => {
|
||||
Object.keys(MP.room.users).forEach((sid) => {
|
||||
MP.room.users[sid].isTyping = false;
|
||||
});
|
||||
$(".tribePlayers").addClass("hidden");
|
||||
changePage("tribe");
|
||||
mp_refreshUserList();
|
||||
});
|
||||
|
||||
MP.socket.on("mp_room_user_info_update", (data) => {
|
||||
|
|
|
|||
|
|
@ -2933,6 +2933,9 @@ key {
|
|||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: var(--text-color);
|
||||
.fas {
|
||||
margin-left: 0.25rem;
|
||||
}
|
||||
.points {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue