adminbot-brainhub / script.js
gutzu1015's picture
remove the nav bar retain the header
8320f93 verified
Raw
History Blame Contribute Delete
743 Bytes
// Main script file for the admin dashboard
document.addEventListener('DOMContentLoaded', function() {
// Initialize feather icons
if (typeof feather !== 'undefined') {
feather.replace();
}
// Update header user name if custom-header is present
const customHeader = document.querySelector('custom-header');
if (customHeader && customHeader.shadowRoot) {
const userNameEl = customHeader.shadowRoot.querySelector('.user-name');
if (userNameEl) {
// Try to get from localStorage, otherwise default
const storedName = localStorage.getItem('userName');
if (storedName) {
userNameEl.textContent = storedName;
}
}
}
});