2021-05-27 23:19:05 +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">
|
|
|
|
import * as tr from "lib/i18n";
|
|
|
|
import TitledContainer from "./TitledContainer.svelte";
|
2021-05-29 17:44:08 +02:00
|
|
|
import Item from "components/Item.svelte";
|
2021-05-29 13:30:10 +02:00
|
|
|
import SpinBoxRow from "./SpinBoxRow.svelte";
|
2021-06-12 10:25:11 +02:00
|
|
|
import SwitchRow from "./SwitchRow.svelte";
|
2021-05-27 23:19:05 +02:00
|
|
|
import type { DeckOptionsState } from "./lib";
|
|
|
|
|
|
|
|
export let state: DeckOptionsState;
|
2021-05-29 17:32:12 +02:00
|
|
|
export let api: Record<string, never>;
|
|
|
|
|
2021-05-27 23:19:05 +02:00
|
|
|
let config = state.currentConfig;
|
|
|
|
let defaults = state.defaults;
|
|
|
|
</script>
|
|
|
|
|
2021-05-29 17:32:12 +02:00
|
|
|
<TitledContainer title={tr.deckConfigTimerTitle()} {api}>
|
2021-05-29 17:44:08 +02:00
|
|
|
<Item>
|
|
|
|
<SpinBoxRow
|
|
|
|
bind:value={$config.capAnswerTimeToSecs}
|
|
|
|
defaultValue={defaults.capAnswerTimeToSecs}
|
|
|
|
min={30}
|
|
|
|
max={600}
|
|
|
|
markdownTooltip={tr.deckConfigMaximumAnswerSecsTooltip()}
|
|
|
|
>
|
|
|
|
{tr.deckConfigMaximumAnswerSecs()}
|
|
|
|
</SpinBoxRow>
|
|
|
|
</Item>
|
2021-05-27 23:19:05 +02:00
|
|
|
|
2021-05-29 17:44:08 +02:00
|
|
|
<Item>
|
2021-06-12 10:25:11 +02:00
|
|
|
<SwitchRow
|
2021-05-29 17:44:08 +02:00
|
|
|
bind:value={$config.showTimer}
|
|
|
|
defaultValue={defaults.showTimer}
|
|
|
|
markdownTooltip={tr.deckConfigShowAnswerTimerTooltip()}
|
|
|
|
>
|
|
|
|
{tr.schedulingShowAnswerTimer()}
|
2021-06-12 10:25:11 +02:00
|
|
|
</SwitchRow>
|
2021-05-29 17:44:08 +02:00
|
|
|
</Item>
|
2021-05-27 23:19:05 +02:00
|
|
|
</TitledContainer>
|