add: Mobile menu button in top-left corner

This commit is contained in:
DiTus
2026-03-21 08:18:57 +01:00
parent 03a1262100
commit ee58df6169
2 changed files with 36 additions and 7 deletions

View File

@ -32,11 +32,23 @@ window.updateIndicatorCandles = drawIndicatorsOnChart;
window.IndicatorRegistry = IndicatorRegistry;
document.addEventListener('DOMContentLoaded', async () => {
// Attach toggle sidebar event listener
// Attach toggle sidebar event listeners
const toggleBtn = document.getElementById('sidebarToggleBtn');
if (toggleBtn) {
toggleBtn.addEventListener('click', toggleSidebar);
}
// Mobile menu button
const mobileMenuBtn = document.getElementById('mobileMenuBtn');
if (mobileMenuBtn) {
mobileMenuBtn.addEventListener('click', (e) => {
e.stopPropagation();
const sidebar = document.getElementById('rightSidebar');
if (sidebar) {
sidebar.classList.toggle('collapsed');
}
});
}
// Initialize timezone selector
const timezoneSelect = document.getElementById('timezoneSelect');