| 818 | |
| 819 | // -------- username label ( -------- |
| 820 | function wireUserNameLabel(state) { |
| 821 | const username = (state && state.username) || localStorage.getItem('username') || ''; |
| 822 | const btn = document.getElementById('userDropdownToggle') || document.getElementById('userMenuBtn'); |
| 823 | if (!btn) return; |
| 824 | const label = btn.querySelector('.user-name-label'); |
| 825 | if (!label) return; // don’t inject new DOM |
| 826 | label.textContent = username || ''; |
| 827 | } |
| 828 | |
| 829 | function resolveBrandThemeColor(isDark) { |
| 830 | const branding = window.__FR_BRANDING__ || {}; |