This commit is contained in:
Axce 2026-01-02 06:20:55 +01:00
parent 5d4525dcae
commit 4c5d8f4414

View File

@ -88,6 +88,15 @@
width: 100%; width: 100%;
} }
.btn-secondary {
background-color: #9ca3af;
color: white;
}
.btn-secondary:hover {
background-color: #6b7280;
}
.btn-success { .btn-success {
background-color: #16a34a; background-color: #16a34a;
color: white; color: white;
@ -382,7 +391,7 @@
<div class="modal-content"> <div class="modal-content">
<h3 id="modalTitle">Définitions</h3> <h3 id="modalTitle">Définitions</h3>
<div id="definitionList" class="definition-list"></div> <div id="definitionList" class="definition-list"></div>
<button class="btn-primary" onclick="closeModal()">Fermer</button> <button class="btn-secondary" onclick="closeModal()">Fermer</button>
</div> </div>
</div> </div>
@ -1068,6 +1077,15 @@
// don't intercept when modifier keys are pressed // don't intercept when modifier keys are pressed
if (e.ctrlKey || e.altKey || e.metaKey) return; if (e.ctrlKey || e.altKey || e.metaKey) return;
if (document.getElementById('gridScreen').style.display === 'none') return; if (document.getElementById('gridScreen').style.display === 'none') return;
if (e.key === 'Escape') {
e.preventDefault();
const modal = document.getElementById('definitionModal');
if (modal.classList.contains('show')) {
closeModal();
}
return;
}
// If modal is open, do not interact with grid via keyboard // If modal is open, do not interact with grid via keyboard
const modal = document.getElementById('definitionModal'); const modal = document.getElementById('definitionModal');
@ -1202,6 +1220,8 @@
renderGrid(); renderGrid();
} }
}); });
</script> </script>
</body> </body>
</html> </html>