From 6fcaa5d3d4f4f5b9033e55399444da605bc4c0b37ff1d836afd422ceb81037f0 Mon Sep 17 00:00:00 2001 From: AidarKC Date: Tue, 1 Sep 2026 18:55:20 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B8=20=D0=B2=20?= =?UTF-8?q?=D0=BB=D0=B8=D1=87=D0=BD=D1=8B=D1=85=20=D1=81=D0=BE=D0=BE=D0=B1?= =?UTF-8?q?=D1=89=D0=B5=D0=BD=D0=B8=D1=8F=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION.properties | 2 +- shine-UI/js/pages/chat-view.js | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) 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(() => {});