2021-05-24 10:25:17 +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 EnumSelector from "./EnumSelector.svelte";
|
|
|
|
|
|
|
|
import type { DeckOptionsState } from "./lib";
|
|
|
|
import { reviewMixChoices } from "./strings";
|
|
|
|
|
|
|
|
export let state: DeckOptionsState;
|
|
|
|
let config = state.currentConfig;
|
|
|
|
let defaults = state.defaults;
|
|
|
|
|
|
|
|
const newGatherPriorityChoices = [
|
|
|
|
tr.deckConfigNewGatherPriorityDeck(),
|
|
|
|
tr.deckConfigNewGatherPriorityPosition(),
|
|
|
|
];
|
|
|
|
const newSortOrderChoices = [
|
|
|
|
tr.deckConfigSortOrderCardTemplateThenPosition(),
|
|
|
|
tr.deckConfigSortOrderCardTemplateThenRandom(),
|
|
|
|
tr.deckConfigSortOrderPosition(),
|
|
|
|
tr.deckConfigSortOrderRandom(),
|
|
|
|
];
|
|
|
|
const reviewOrderChoices = [
|
|
|
|
tr.deckConfigSortOrderDueDateThenRandom(),
|
|
|
|
tr.deckConfigSortOrderAscendingIntervals(),
|
|
|
|
tr.deckConfigSortOrderDescendingIntervals(),
|
|
|
|
];
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<h2>{tr.deckConfigOrderingTitle()}</h2>
|
|
|
|
|
|
|
|
<EnumSelector
|
|
|
|
label={tr.deckConfigNewGatherPriority()}
|
|
|
|
tooltip={tr.deckConfigNewGatherPriorityTooltip()}
|
|
|
|
choices={newGatherPriorityChoices}
|
|
|
|
defaultValue={defaults.newCardGatherPriority}
|
2021-05-26 01:21:33 +02:00
|
|
|
bind:value={$config.newCardGatherPriority}
|
|
|
|
/>
|
2021-05-24 10:25:17 +02:00
|
|
|
|
|
|
|
<EnumSelector
|
|
|
|
label={tr.deckConfigNewCardSortOrder()}
|
|
|
|
tooltip={tr.deckConfigNewCardSortOrderTooltip()}
|
|
|
|
choices={newSortOrderChoices}
|
|
|
|
defaultValue={defaults.newCardSortOrder}
|
2021-05-26 01:21:33 +02:00
|
|
|
bind:value={$config.newCardSortOrder}
|
|
|
|
/>
|
2021-05-24 10:25:17 +02:00
|
|
|
|
|
|
|
<EnumSelector
|
|
|
|
label={tr.deckConfigNewReviewPriority()}
|
|
|
|
tooltip={tr.deckConfigNewReviewPriorityTooltip()}
|
|
|
|
choices={reviewMixChoices()}
|
|
|
|
defaultValue={defaults.newMix}
|
2021-05-26 01:21:33 +02:00
|
|
|
bind:value={$config.newMix}
|
|
|
|
/>
|
2021-05-24 10:25:17 +02:00
|
|
|
|
|
|
|
<EnumSelector
|
|
|
|
label={tr.deckConfigInterdayStepPriority()}
|
|
|
|
tooltip={tr.deckConfigInterdayStepPriorityTooltip()}
|
|
|
|
choices={reviewMixChoices()}
|
|
|
|
defaultValue={defaults.interdayLearningMix}
|
2021-05-26 01:21:33 +02:00
|
|
|
bind:value={$config.interdayLearningMix}
|
|
|
|
/>
|
2021-05-24 10:25:17 +02:00
|
|
|
|
|
|
|
<EnumSelector
|
|
|
|
label={tr.deckConfigReviewSortOrder()}
|
|
|
|
tooltip={tr.deckConfigReviewSortOrderTooltip()}
|
|
|
|
choices={reviewOrderChoices}
|
|
|
|
defaultValue={defaults.reviewOrder}
|
2021-05-26 01:21:33 +02:00
|
|
|
bind:value={$config.reviewOrder}
|
|
|
|
/>
|