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">
|
2022-02-03 05:52:11 +01:00
|
|
|
import DynamicallySlottable from "../components/DynamicallySlottable.svelte";
|
|
|
|
import Item from "../components/Item.svelte";
|
2022-02-04 09:36:34 +01:00
|
|
|
import * as tr from "../lib/ftl";
|
|
|
|
import type { DeckOptionsState } from "./lib";
|
|
|
|
import SwitchRow from "./SwitchRow.svelte";
|
|
|
|
import TitledContainer from "./TitledContainer.svelte";
|
2021-05-27 23:19:05 +02:00
|
|
|
|
|
|
|
export let state: DeckOptionsState;
|
2021-05-29 17:32:12 +02:00
|
|
|
export let api: Record<string, never>;
|
|
|
|
|
2022-02-04 09:36:34 +01:00
|
|
|
const config = state.currentConfig;
|
|
|
|
const defaults = state.defaults;
|
2021-05-27 23:19:05 +02:00
|
|
|
</script>
|
|
|
|
|
2022-02-03 05:52:11 +01:00
|
|
|
<TitledContainer title={tr.deckConfigAudioTitle()}>
|
|
|
|
<DynamicallySlottable slotHost={Item} {api}>
|
|
|
|
<Item>
|
|
|
|
<SwitchRow
|
|
|
|
bind:value={$config.disableAutoplay}
|
|
|
|
defaultValue={defaults.disableAutoplay}
|
|
|
|
>
|
|
|
|
{tr.deckConfigDisableAutoplay()}
|
|
|
|
</SwitchRow>
|
|
|
|
</Item>
|
2021-05-27 23:19:05 +02:00
|
|
|
|
2022-02-03 05:52:11 +01:00
|
|
|
<Item>
|
|
|
|
<SwitchRow
|
|
|
|
bind:value={$config.skipQuestionWhenReplayingAnswer}
|
|
|
|
defaultValue={defaults.skipQuestionWhenReplayingAnswer}
|
|
|
|
markdownTooltip={tr.deckConfigAlwaysIncludeQuestionAudioTooltip()}
|
|
|
|
>
|
|
|
|
{tr.deckConfigSkipQuestionWhenReplaying()}
|
|
|
|
</SwitchRow>
|
|
|
|
</Item>
|
|
|
|
</DynamicallySlottable>
|
2021-05-27 23:19:05 +02:00
|
|
|
</TitledContainer>
|