anki/ts/deckoptions/AudioOptions.svelte

34 lines
1.1 KiB
Svelte
Raw Normal View History

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";
import CheckBoxRow from "./CheckBoxRow.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.deckConfigAudioTitle()} {api}>
<CheckBoxRow
bind:value={$config.disableAutoplay}
defaultValue={defaults.disableAutoplay}
>
{tr.deckConfigDisableAutoplay()}
</CheckBoxRow>
2021-05-27 23:19:05 +02:00
<CheckBoxRow
bind:value={$config.skipQuestionWhenReplayingAnswer}
defaultValue={defaults.skipQuestionWhenReplayingAnswer}
markdownTooltip={tr.deckConfigAlwaysIncludeQuestionAudioTooltip()}
>
{tr.schedulingAlwaysIncludeQuestionSideWhenReplaying()}
</CheckBoxRow>
2021-05-27 23:19:05 +02:00
</TitledContainer>