Add Escape key to close settings modal

This commit is contained in:
2026-06-28 17:39:59 +02:00
parent db13b39b2b
commit 5534191268
2 changed files with 8 additions and 17 deletions

View File

@@ -442,7 +442,14 @@ class AniWorldApp {
this.hideConfigModal();
});
// Scheduler configuration
document.addEventListener('keydown', (e) => {
const modal = document.getElementById('config-modal');
if (e.key === 'Escape' && modal && !modal.classList.contains('hidden')) {
this.hideConfigModal();
}
});
// Scheduler configuration
document.getElementById('scheduled-rescan-enabled').addEventListener('change', () => {
this.toggleSchedulerTimeInput();
});