diff --git a/templates/index.html b/templates/index.html index d8dd941..f469011 100644 --- a/templates/index.html +++ b/templates/index.html @@ -603,6 +603,11 @@ await initWorkingDirectory(); await loadConfigs(); }); + + // Close sidebar on small screens when changing groups + if (window.innerWidth < 768) { + toggleSidebar(); + } } catch (error) { console.error('Error during initialization:', error); } @@ -640,27 +645,125 @@ const description = option.getAttribute('data-description'); document.getElementById('group-description').textContent = description; } + + function toggleSidebar() { + const sidebar = document.querySelector('.sidebar'); + const overlay = document.querySelector('.overlay'); + const schemaEditor = document.getElementById('schema-editor'); + + // No cerrar sidebar si el modal está abierto + if (!schemaEditor.classList.contains('hidden')) { + return; + } + + sidebar.classList.toggle('open'); + overlay.classList.toggle('show'); + } +
-