2021-04-12 06:18:30 +02:00
|
|
|
<!--
|
|
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
-->
|
|
|
|
<script lang="ts">
|
2021-04-22 19:55:26 +02:00
|
|
|
import * as tr from "lib/i18n";
|
2021-04-12 06:18:30 +02:00
|
|
|
import SpinBox from "./SpinBox.svelte";
|
|
|
|
import CheckBox from "./CheckBox.svelte";
|
2021-04-25 10:40:02 +02:00
|
|
|
import type { DeckOptionsState } from "./lib";
|
2021-04-12 06:18:30 +02:00
|
|
|
|
2021-04-25 10:40:02 +02:00
|
|
|
export let state: DeckOptionsState;
|
2021-04-16 15:29:21 +02:00
|
|
|
let config = state.currentConfig;
|
|
|
|
let defaults = state.defaults;
|
2021-04-12 06:18:30 +02:00
|
|
|
</script>
|
|
|
|
|
2021-04-26 15:34:33 +02:00
|
|
|
<h2>{tr.deckConfigTimerTitle()}</h2>
|
2021-04-12 06:18:30 +02:00
|
|
|
|
2021-04-26 15:34:33 +02:00
|
|
|
<SpinBox
|
|
|
|
label={tr.deckConfigMaximumAnswerSecs()}
|
|
|
|
tooltip={tr.deckConfigMaximumAnswerSecsTooltip()}
|
|
|
|
min={30}
|
|
|
|
max={600}
|
|
|
|
defaultValue={defaults.capAnswerTimeToSecs}
|
2021-05-26 01:21:33 +02:00
|
|
|
bind:value={$config.capAnswerTimeToSecs}
|
|
|
|
/>
|
2021-04-12 06:18:30 +02:00
|
|
|
|
2021-04-26 15:34:33 +02:00
|
|
|
<CheckBox
|
|
|
|
id="showAnswerTimer"
|
|
|
|
label={tr.schedulingShowAnswerTimer()}
|
|
|
|
tooltip={tr.deckConfigShowAnswerTimerTooltip()}
|
|
|
|
defaultValue={defaults.showTimer}
|
2021-05-26 01:21:33 +02:00
|
|
|
bind:value={$config.showTimer}
|
|
|
|
/>
|
2021-04-12 06:18:30 +02:00
|
|
|
|
2021-04-26 15:34:33 +02:00
|
|
|
<h2>{tr.deckConfigAudioTitle()}</h2>
|
2021-04-12 06:18:30 +02:00
|
|
|
|
2021-04-26 15:34:33 +02:00
|
|
|
<CheckBox
|
|
|
|
label={tr.deckConfigDisableAutoplay()}
|
|
|
|
defaultValue={defaults.disableAutoplay}
|
2021-05-26 01:21:33 +02:00
|
|
|
bind:value={$config.disableAutoplay}
|
|
|
|
/>
|
2021-04-26 15:34:33 +02:00
|
|
|
|
|
|
|
<CheckBox
|
|
|
|
label={tr.schedulingAlwaysIncludeQuestionSideWhenReplaying()}
|
|
|
|
tooltip={tr.deckConfigAlwaysIncludeQuestionAudioTooltip()}
|
|
|
|
defaultValue={defaults.skipQuestionWhenReplayingAnswer}
|
2021-05-26 01:21:33 +02:00
|
|
|
bind:value={$config.skipQuestionWhenReplayingAnswer}
|
|
|
|
/>
|