keycloak
This commit is contained in:
@@ -45,6 +45,20 @@ if (payloadNode) {
|
||||
return `<span class="app-icon-fallback${safeClassName}">${escapeHtml(app.icon || 'AP')}</span>`;
|
||||
};
|
||||
|
||||
const updateSessionDisplay = () => {
|
||||
const accountNode = document.querySelector('.tray-pill:last-of-type');
|
||||
|
||||
if (!accountNode) {
|
||||
return;
|
||||
}
|
||||
|
||||
const displayName = payload.session?.display_name;
|
||||
|
||||
if (typeof displayName === 'string' && displayName.trim() !== '') {
|
||||
accountNode.textContent = displayName;
|
||||
}
|
||||
};
|
||||
|
||||
const buildTaskbarButtonContent = (record) => `
|
||||
<span class="taskbar-app-button-badge">${buildAppIconMarkup(record.definition, 'taskbar-app-icon')}</span>
|
||||
<span class="taskbar-app-button-label">${escapeHtml(record.title)}</span>
|
||||
@@ -702,6 +716,8 @@ if (payloadNode) {
|
||||
iconsRoot?.appendChild(icon);
|
||||
});
|
||||
|
||||
updateSessionDisplay();
|
||||
|
||||
startButton?.setAttribute('aria-expanded', 'false');
|
||||
startButton?.addEventListener('click', () => {
|
||||
if (!startMenu || !startButton) {
|
||||
|
||||
Reference in New Issue
Block a user