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">
|
|
|
|
import * as tr from "anki/i18n";
|
|
|
|
import SpinBox from "./SpinBox.svelte";
|
|
|
|
import SpinBoxFloat from "./SpinBoxFloat.svelte";
|
|
|
|
import StepsInput from "./StepsInput.svelte";
|
|
|
|
import EnumSelector from "./EnumSelector.svelte";
|
2021-04-16 15:29:21 +02:00
|
|
|
import type { DeckConfigState } from "./lib";
|
2021-04-12 06:18:30 +02:00
|
|
|
|
2021-04-16 15:29:21 +02:00
|
|
|
export let state: DeckConfigState;
|
|
|
|
let config = state.currentConfig;
|
|
|
|
let defaults = state.defaults;
|
2021-04-12 06:18:30 +02:00
|
|
|
|
|
|
|
const leechChoices = [tr.actionsSuspendCard(), tr.schedulingTagOnly()];
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<h2>Lapses</h2>
|
|
|
|
|
|
|
|
<StepsInput
|
|
|
|
label="Relearning steps"
|
|
|
|
subLabel="Relearning steps, separated by spaces."
|
|
|
|
defaultValue={defaults.relearnSteps}
|
2021-04-16 15:29:21 +02:00
|
|
|
value={$config.relearnSteps}
|
|
|
|
on:changed={(evt) => ($config.relearnSteps = evt.detail.value)} />
|
2021-04-12 06:18:30 +02:00
|
|
|
|
|
|
|
<SpinBoxFloat
|
|
|
|
label={tr.schedulingNewInterval()}
|
|
|
|
subLabel="The multiplier applied to review cards when answering Again."
|
|
|
|
min={0}
|
|
|
|
max={1}
|
|
|
|
defaultValue={defaults.lapseMultiplier}
|
2021-04-16 15:29:21 +02:00
|
|
|
value={$config.lapseMultiplier}
|
|
|
|
on:changed={(evt) => ($config.lapseMultiplier = evt.detail.value)} />
|
2021-04-12 06:18:30 +02:00
|
|
|
|
|
|
|
<SpinBox
|
|
|
|
label={tr.schedulingMinimumInterval()}
|
|
|
|
subLabel="The minimum new interval a lapsed card will be given after relearning."
|
|
|
|
min={1}
|
|
|
|
defaultValue={defaults.minimumLapseInterval}
|
2021-04-16 15:29:21 +02:00
|
|
|
bind:value={$config.minimumLapseInterval} />
|
2021-04-12 06:18:30 +02:00
|
|
|
|
|
|
|
<SpinBox
|
|
|
|
label={tr.schedulingLeechThreshold()}
|
|
|
|
subLabel="Number of times Again needs to be pressed on a review card to make it a leech."
|
|
|
|
min={1}
|
|
|
|
defaultValue={defaults.leechThreshold}
|
2021-04-16 15:29:21 +02:00
|
|
|
bind:value={$config.leechThreshold} />
|
2021-04-12 06:18:30 +02:00
|
|
|
|
|
|
|
<EnumSelector
|
|
|
|
label={tr.schedulingLeechAction()}
|
|
|
|
subLabel=""
|
|
|
|
choices={leechChoices}
|
|
|
|
defaultValue={defaults.leechAction}
|
2021-04-16 15:29:21 +02:00
|
|
|
bind:value={$config.leechAction} />
|
2021-04-12 06:18:30 +02:00
|
|
|
</div>
|