diff --git a/VERSION.properties b/VERSION.properties index 7a5c2398..4b6936de 100644 --- a/VERSION.properties +++ b/VERSION.properties @@ -1,2 +1,2 @@ -client.version=1.11.2 +client.version=1.11.3 server.version=1.9.0 diff --git a/shine-UI/js/pages/chat-view.js b/shine-UI/js/pages/chat-view.js index 71dd9512..219cde00 100644 --- a/shine-UI/js/pages/chat-view.js +++ b/shine-UI/js/pages/chat-view.js @@ -128,7 +128,7 @@ function createChatHeaderParts(login, navigate) { loginEl.setAttribute('role', 'heading'); loginEl.setAttribute('aria-level', '1'); loginEl.setAttribute('aria-label', `Чат с ${cleanLogin}`); - loginEl.innerHTML = `${cleanLogin}${cleanLogin}`; + loginEl.innerHTML = `${cleanLogin}`; void loadProfileSnapshot(cleanLogin) .then((snapshot) => { @@ -149,11 +149,19 @@ function createChatHeaderParts(login, navigate) { }); avatarSlot.replaceChildren(upgradedAvatar); if (loginEl.isConnected) { - const display = userDisplayName({ login: cleanLogin, firstName: snapshot?.firstName, lastName: snapshot?.lastName }); + const firstName = String(snapshot?.firstName || '').trim(); + const lastName = String(snapshot?.lastName || '').trim(); + const hasRealName = Boolean(firstName || lastName); + const display = userDisplayName({ login: cleanLogin, firstName, lastName }); const nameNode = loginEl.querySelector('.chat-header-display-name'); const loginNode = loginEl.querySelector('.chat-header-user-login'); - if (nameNode) nameNode.textContent = display; - if (loginNode) loginNode.textContent = cleanLogin; + if (nameNode) { + nameNode.textContent = hasRealName ? display : cleanLogin; + } + if (loginNode) { + loginNode.hidden = !hasRealName; + loginNode.textContent = hasRealName ? cleanLogin : ''; + } } }) .catch(() => {});