major change

This commit is contained in:
root
2026-03-27 00:03:48 +07:00
parent 9b1d5753cb
commit f89fcbee1c
9 changed files with 2143 additions and 463 deletions

View File

@@ -34,6 +34,37 @@
t.classList.add('show');
setTimeout(() => t.classList.remove('show'), 3000);
}
// User dropdown
function toggleUserDropdown() {
const menu = document.getElementById('user-dropdown-menu');
menu.classList.toggle('open');
}
function closeUserDropdown() {
const menu = document.getElementById('user-dropdown-menu');
if(menu) menu.classList.remove('open');
}
document.addEventListener('click', (e) => {
const wrap = document.getElementById('user-dropdown-wrap');
if (wrap && !wrap.contains(e.target)) closeUserDropdown();
});
// Close modals on overlay click
document.querySelectorAll('.modal-overlay').forEach(mo => {
mo.addEventListener('click', (e) => {
if (e.target === mo) mo.classList.remove('active');
});
});
// Auto open change-pw modal if there was a pw msg
<?php
$pw_msg_bottom = $_SESSION['pw_change_msg_bottom'] ?? null;
if($pw_msg_bottom):
?>
document.addEventListener('DOMContentLoaded', () => {
document.getElementById('change-pw-modal').classList.add('active');
});
<?php endif; ?>
</script>
</body>
</html>