fix(dashboard): hero-аватар показывает загруженную картинку, а не только инициалы
This commit is contained in:
@@ -1874,8 +1874,8 @@
|
|||||||
if (!user) throw new Error('Not logged in');
|
if (!user) throw new Error('Not logged in');
|
||||||
|
|
||||||
document.getElementById('user-name').textContent = user?.name?.split(' ')[0] || 'Студент';
|
document.getElementById('user-name').textContent = user?.name?.split(' ')[0] || 'Студент';
|
||||||
document.getElementById('dh-avatar').textContent =
|
// Hero-аватар: загруженная картинка (avatar_url) или инициалы — как в сайдбаре
|
||||||
(user?.name || 'LS').split(' ').slice(0, 2).map(w => w[0]?.toUpperCase() || '').join('') || 'LS';
|
LS.renderNavAvatar(document.getElementById('dh-avatar'), user);
|
||||||
LS.showBoardIfAllowed();
|
LS.showBoardIfAllowed();
|
||||||
if (isTeacher) {
|
if (isTeacher) {
|
||||||
document.getElementById('btn-admin').style.display = '';
|
document.getElementById('btn-admin').style.display = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user