Add ESC to close language dropdown; extend language labels and locales; verify build

This commit is contained in:
2026-02-09 21:32:04 +01:00
parent 0f2f97ff3f
commit ee5d3fdb0d
2 changed files with 72 additions and 0 deletions

View File

@@ -158,6 +158,12 @@ const handleOutsideClick = (event) => {
}
};
const handleKeydown = (e) => {
if (e.key === 'Escape') {
isLangOpen.value = false;
}
};
onMounted(() => {
if (!store.loadState()) {
store.initGame(); // Inicjalizacja domyślnej gry jeśli brak zapisu
@@ -185,6 +191,7 @@ onMounted(() => {
displayModeMedia.addListener(updateStandalone);
}
document.addEventListener('click', handleOutsideClick);
document.addEventListener('keydown', handleKeydown);
}
});
@@ -203,6 +210,7 @@ onUnmounted(() => {
displayModeMedia.removeListener(updateStandalone);
}
document.removeEventListener('click', handleOutsideClick);
document.removeEventListener('keydown', handleKeydown);
});
</script>