From cff9973dcf3deb12778137345ebabf87cad9c15e Mon Sep 17 00:00:00 2001 From: Maxim Dolgolyov Date: Sun, 31 May 2026 08:03:02 +0300 Subject: [PATCH] =?UTF-8?q?fix(biochem):=20=D0=B0=D0=B2=D0=B0=D1=82=D0=B0?= =?UTF-8?q?=D1=80=D0=BA=D0=B0=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20LS.render?= =?UTF-8?q?NavAvatar=20=D0=BD=D0=B0=20=D0=B2=D1=81=D0=B5=D1=85=20=D1=81?= =?UTF-8?q?=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B0=D1=85=20=D0=BC=D0=BE?= =?UTF-8?q?=D0=B4=D1=83=D0=BB=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Заменил ручное ava.textContent=initials на LS.renderNavAvatar(ava, user) в biochem.html / -library / -reactions / -properties. biochem-pathways.html уже был корректен. Co-Authored-By: Claude Sonnet 4.6 --- frontend/biochem-library.html | 2 +- frontend/biochem-properties.html | 2 +- frontend/biochem-reactions.html | 2 +- frontend/biochem.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/biochem-library.html b/frontend/biochem-library.html index 5e239f4..de09ac6 100644 --- a/frontend/biochem-library.html +++ b/frontend/biochem-library.html @@ -368,7 +368,7 @@ if (!user) location.href = '/login'; const nav = document.getElementById('nav-user'); const ava = document.getElementById('nav-avatar'); if (nav) nav.textContent = user?.name?.split(' ')[0] || 'Пользователь'; -if (ava) ava.textContent = (user?.name||'LS').split(' ').slice(0,2).map(w=>w[0]?.toUpperCase()||'').join('')||'LS'; +LS.renderNavAvatar(ava, user); if (isAdmin) document.getElementById('btn-admin').style.display = ''; if (isTeacher) document.getElementById('btn-classes').style.display = ''; LS.showBoardIfAllowed(); diff --git a/frontend/biochem-properties.html b/frontend/biochem-properties.html index f5e6bdf..6dc28e1 100644 --- a/frontend/biochem-properties.html +++ b/frontend/biochem-properties.html @@ -249,7 +249,7 @@ if (!user) location.href = '/login'; const nav = document.getElementById('nav-user'); const ava = document.getElementById('nav-avatar'); if (nav) nav.textContent = user?.name?.split(' ')[0] || 'Пользователь'; -if (ava) ava.textContent = (user?.name||'LS').split(' ').slice(0,2).map(w=>w[0]?.toUpperCase()||'').join('')||'LS'; +LS.renderNavAvatar(ava, user); if (isAdmin) document.getElementById('btn-admin').style.display = ''; if (isTeacher) document.getElementById('btn-classes').style.display = ''; LS.showBoardIfAllowed(); diff --git a/frontend/biochem-reactions.html b/frontend/biochem-reactions.html index 3bd6de8..a57123d 100644 --- a/frontend/biochem-reactions.html +++ b/frontend/biochem-reactions.html @@ -369,7 +369,7 @@ if (!user) location.href = '/login'; const nav = document.getElementById('nav-user'); const ava = document.getElementById('nav-avatar'); if (nav) nav.textContent = user?.name?.split(' ')[0] || 'Пользователь'; -if (ava) ava.textContent = (user?.name||'LS').split(' ').slice(0,2).map(w=>w[0]?.toUpperCase()||'').join('')||'LS'; +LS.renderNavAvatar(ava, user); if (isAdmin) document.getElementById('btn-admin').style.display = ''; if (isTeacher) document.getElementById('btn-classes').style.display = ''; LS.showBoardIfAllowed(); diff --git a/frontend/biochem.html b/frontend/biochem.html index 2ddd791..19ee569 100644 --- a/frontend/biochem.html +++ b/frontend/biochem.html @@ -532,7 +532,7 @@ if (!user) location.href = '/login'; const nav = document.getElementById('nav-user'); const ava = document.getElementById('nav-avatar'); if (nav) nav.textContent = user?.name?.split(' ')[0] || 'Пользователь'; -if (ava) ava.textContent = (user?.name||'LS').split(' ').slice(0,2).map(w=>w[0]?.toUpperCase()||'').join('')||'LS'; +LS.renderNavAvatar(ava, user); if (isAdmin) { document.getElementById('btn-admin').style.display=''; } if (isTeacher) { document.getElementById('btn-classes').style.display=''; } LS.showBoardIfAllowed();