Spaces:
Running
Running
File size: 743 Bytes
db2676d 659d490 ead5792 db2676d 8320f93 db2676d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
// 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;
}
}
}
});
|