Обновить assets/js/chat.js
This commit is contained in:
parent
4c9630a299
commit
3da3777285
@ -68,7 +68,7 @@ async function sendMessage() {
|
||||
|
||||
const usernameElement = document.createElement('div');
|
||||
usernameElement.classList.add('username');
|
||||
usernameElement.textContent = await getUserName();
|
||||
usernameElement.textContent = await getUserName(); // Отображение имени пользователя
|
||||
|
||||
const textElement = document.createElement('div');
|
||||
textElement.classList.add('text');
|
||||
@ -88,6 +88,7 @@ async function sendMessage() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function openMembersList() {
|
||||
renderMembersList();
|
||||
document.getElementById("members-list").style.display = "block";
|
||||
@ -157,6 +158,18 @@ async function editMessage(new_message) {
|
||||
currentHistoryId = response.update[0].HistoryId;
|
||||
}
|
||||
}
|
||||
|
||||
function editChat() {
|
||||
const newName = prompt("Введите новое имя комнаты:");
|
||||
if (newName) {
|
||||
document.getElementById('room-name').textContent = newName;
|
||||
}
|
||||
}
|
||||
|
||||
function exitChat() {
|
||||
window.location.href = 'list-rooms.nytl.html';
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", async function() {
|
||||
currentChatID = await getChatID();
|
||||
});
|
Loading…
Reference in New Issue
Block a user