Update index.php
This commit is contained in:
@@ -1078,7 +1078,7 @@ try {
|
|||||||
actions.appendChild(btn);
|
actions.appendChild(btn);
|
||||||
toast.appendChild(actions);
|
toast.appendChild(actions);
|
||||||
this.toastsContainer.appendChild(toast);
|
this.toastsContainer.appendChild(toast);
|
||||||
}
|
},
|
||||||
showToast(notification) {
|
showToast(notification) {
|
||||||
const toast = document.createElement('div');
|
const toast = document.createElement('div');
|
||||||
toast.className = 'notification-toast';
|
toast.className = 'notification-toast';
|
||||||
@@ -1219,7 +1219,9 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (toggleBtn) {
|
if (toggleBtn) {
|
||||||
|
console.debug('[index] sidebar toggle found:', { toggleBtn: !!toggleBtn, sidebar: !!sidebar });
|
||||||
toggleBtn.addEventListener('click', (e) => {
|
toggleBtn.addEventListener('click', (e) => {
|
||||||
|
console.debug('[index] sidebar-toggle clicked', { isOpen: sidebar && sidebar.classList.contains('open') });
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (sidebar && sidebar.classList.contains('open')) {
|
if (sidebar && sidebar.classList.contains('open')) {
|
||||||
closeSidebar();
|
closeSidebar();
|
||||||
@@ -1229,6 +1231,12 @@ try {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// debug logs for open/close
|
||||||
|
const _openSidebar = openSidebar;
|
||||||
|
const _closeSidebar = closeSidebar;
|
||||||
|
openSidebar = function() { console.debug('[index] openSidebar()'); _openSidebar(); };
|
||||||
|
closeSidebar = function() { console.debug('[index] closeSidebar()'); _closeSidebar(); };
|
||||||
|
|
||||||
// Close sidebar when a nav item is selected (mobile UX improvement)
|
// Close sidebar when a nav item is selected (mobile UX improvement)
|
||||||
document.querySelectorAll('.nav-link[data-tab]').forEach(link => {
|
document.querySelectorAll('.nav-link[data-tab]').forEach(link => {
|
||||||
link.addEventListener('click', () => {
|
link.addEventListener('click', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user