diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 592329e..f242a9e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - - id: check-added-large-files +# - id: check-added-large-files - repo: https://github.com/psf/black rev: 22.8.0 diff --git a/frontend/src/lib/assets/music/1-128.mp3 b/frontend/src/lib/assets/music/1-128.mp3 new file mode 100644 index 0000000..af1c0ae Binary files /dev/null and b/frontend/src/lib/assets/music/1-128.mp3 differ diff --git a/frontend/src/lib/assets/music/1_original.mp3 b/frontend/src/lib/assets/music/1_original.mp3 new file mode 100644 index 0000000..088da92 Binary files /dev/null and b/frontend/src/lib/assets/music/1_original.mp3 differ diff --git a/frontend/src/lib/dashboard/main_slider.svelte b/frontend/src/lib/dashboard/main_slider.svelte index fae683d..70ba792 100644 --- a/frontend/src/lib/dashboard/main_slider.svelte +++ b/frontend/src/lib/dashboard/main_slider.svelte @@ -12,6 +12,7 @@ import { QuizQuestionType } from '$lib/quiz_types.js'; import { getLocalization } from '../i18n'; import StartGamePopup from './start_game.svelte'; + import { onMount } from 'svelte'; let start_game = null; const { t } = getLocalization(); @@ -26,6 +27,14 @@ }); window.location.reload(); }; + const close_start_game_if_esc_is_pressed = (key: KeyboardEvent) => { + if (key.code === 'Escape') { + start_game = null; + } + }; + onMount(() => { + document.body.addEventListener('keydown', close_start_game_if_esc_is_pressed); + });
{errorMessage}
{/if} {:else if !game_started} -{$t('words.pin')}: {quiz_data.game_pin}
-{$t('words.pin')}: {quiz_data.game_pin}