diff --git a/views/default3.handlebars b/views/default3.handlebars
index 5cceb55c..9cefc05c 100644
--- a/views/default3.handlebars
+++ b/views/default3.handlebars
@@ -2176,24 +2176,24 @@
'' +
'
' +
'' +
'' +
'' +
'' +
'' +
@@ -2659,6 +2659,7 @@
userDropdownMenu.style.display = 'block';
QV('uiMenu', false);
QV('topMenu', false);
+ updateNightModeIcon();
} else {
userDropdownMenu.style.display = 'none';
var uiSubmenu = Q('uiSubmenu');
@@ -19502,6 +19503,24 @@
});
}
setupNotificationClickOutside();
+
+ // Update night mode icon and text in dropdown menu
+ function updateNightModeIcon() {
+ var nightModeItem = document.querySelector('.userDropdownMenuItem[onclick*="toggleNightMode"]');
+ if (nightModeItem) {
+ var icon = nightModeItem.querySelector('.userDropdownMenuIcon');
+ var textSpan = nightModeItem.querySelector('span');
+ if (icon && textSpan) {
+ var isNightMode = document.body.classList.contains('night');
+ var iconClass = isNightMode ? 'fa-sun' : 'fa-moon';
+ var text = isNightMode ? "Toggle Light Mode" : "Toggle Dark Mode";
+ var newIcon = document.createElement('i');
+ newIcon.className = 'fa ' + iconClass + ' userDropdownMenuIcon';
+ icon.parentNode.replaceChild(newIcon, icon);
+ textSpan.textContent = text;
+ }
+ }
+ }
// Refresh the notification box
function drawNotifications() {