diff --git a/frontend/src/lib/components/buttons/brown.svelte b/frontend/src/lib/components/buttons/brown.svelte index 53ed8c0..5f3aba0 100644 --- a/frontend/src/lib/components/buttons/brown.svelte +++ b/frontend/src/lib/components/buttons/brown.svelte @@ -10,6 +10,8 @@ export let href: undefined | string = undefined; export let target: undefined | string = '_self'; + + export let type: undefined | string = 'button'; {#if href} @@ -26,6 +28,7 @@ {:else} +
+ {$t('words.submit')} +
{:else} @@ -218,13 +215,12 @@ bind:value={custom_field_value} /> {/if} - + +
+ {$t('words.submit')} +
{/if} diff --git a/frontend/src/lib/play/question.svelte b/frontend/src/lib/play/question.svelte index 2d17984..d07b9f3 100644 --- a/frontend/src/lib/play/question.svelte +++ b/frontend/src/lib/play/question.svelte @@ -12,6 +12,7 @@ import { kahoot_icons } from './kahoot_mode_assets/kahoot_icons'; import CircularTimer from '$lib/play/circular_progress.svelte'; import { flip } from 'svelte/animate'; + import BrownButton from '$lib/components/buttons/brown.svelte'; const { t } = getLocalization(); @@ -74,6 +75,7 @@ }; const select_complex_answer = (data) => { + selected_answer = 'a'; const new_array = []; for (let i = 0; i < data.length; i++) { new_array.push({ answer: data[i].answer }); @@ -162,7 +164,7 @@ {#if question.type === QuizQuestionType.ABCD || question.type === QuizQuestionType.VOTING}
-
+
{#each question.answers as answer, i}
- +
+ selectAnswer(slider_value[0])} + >{$t('words.submit')} + +
{/await} {:else if question.type === QuizQuestionType.TEXT} @@ -224,21 +228,23 @@
-
- +
+
+ { + selectAnswer(text_input); + }} + > + {$t('words.submit')} + +
{:else if question.type === QuizQuestionType.ABCD} {#if solution === undefined} @@ -295,7 +301,7 @@ }} class="disabled:opacity-50 transition shadow-lg bg-black bg-opacity-30 w-full flex justify-center rounded-lg p-2 hover:bg-opacity-20 transition" type="button" - disabled={i === 0} + disabled={i === 0 || selected_answer} >
{/each} - +
+ { + select_complex_answer(question.answers); + }}>{$t('words.submit')} +
{/if} diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index baeab3f..908873a 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -126,6 +126,11 @@ background-color: #4e6e58; background-size: cover; color: white; + + :global(#pips-slider) { + --pip: white; + --pip-active: white; + } } @keyframes background_animation { diff --git a/frontend/src/routes/play/+page.svelte b/frontend/src/routes/play/+page.svelte index 0a220f7..92c388e 100644 --- a/frontend/src/routes/play/+page.svelte +++ b/frontend/src/routes/play/+page.svelte @@ -151,7 +151,7 @@ {#if !gameMeta.started && gameData === undefined} {:else if JSON.stringify(final_results) !== JSON.stringify([null])} - + {:else if gameData !== undefined && question_index === ''}