anki/ts/deckoptions/BuryOptions.svelte

40 lines
1.4 KiB
Svelte
Raw Normal View History

<!--
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 marked from "marked";
2021-05-27 23:19:05 +02:00
import TitledContainer from "./TitledContainer.svelte";
import ConfigEntryFull from "./ConfigEntryFull.svelte";
import HelpPopup from "./HelpPopup.svelte";
import CheckBox from "./CheckBox.svelte";
2021-05-28 23:59:20 +02:00
import RevertButton from "./RevertButton.svelte";
import type { DeckOptionsState } from "./lib";
export let state: DeckOptionsState;
let config = state.currentConfig;
let defaults = state.defaults;
</script>
2021-05-27 23:19:05 +02:00
<TitledContainer title={tr.deckConfigBuryTitle()}>
<ConfigEntryFull>
2021-05-28 23:59:20 +02:00
<CheckBox bind:value={$config.buryNew}>
{tr.deckConfigBuryNewSiblings()}
<HelpPopup html={marked(tr.deckConfigBuryTooltip())} />
</CheckBox>
2021-05-28 23:59:20 +02:00
<RevertButton defaultValue={defaults.buryNew} bind:value={$config.buryNew} />
</ConfigEntryFull>
<ConfigEntryFull>
2021-05-28 23:59:20 +02:00
<CheckBox bind:value={$config.buryReviews}>
{tr.deckConfigBuryReviewSiblings()}
<HelpPopup html={marked(tr.deckConfigBuryTooltip())} />
</CheckBox>
2021-05-28 23:59:20 +02:00
<RevertButton
defaultValue={defaults.buryReviews}
bind:value={$config.buryReviews}
/>
</ConfigEntryFull>
2021-05-27 23:19:05 +02:00
</TitledContainer>