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(),
|
2021-06-08 06:01:46 +02:00
|
|
|
tr.deckConfigNewGatherPriorityPositionLowestFirst(),
|
|
|
|
tr.deckConfigNewGatherPriorityPositionHighestFirst(),
|
2021-05-24 10:25:17 +02:00
|
|
|
];
|
|
|
|
const newSortOrderChoices = [
|
2021-06-08 06:01:46 +02:00
|
|
|
tr.deckConfigSortOrderCardTemplateThenLowestPosition(),
|
|
|
|
tr.deckConfigSortOrderCardTemplateThenHighestPosition(),
|
2021-05-24 10:25:17 +02:00
|
|
|
tr.deckConfigSortOrderCardTemplateThenRandom(),
|
2021-06-08 06:01:46 +02:00
|
|
|
tr.deckConfigSortOrderLowestPosition(),
|
|
|
|
tr.deckConfigSortOrderHighestPosition(),
|
2021-05-24 10:25:17 +02:00
|
|
|
tr.deckConfigSortOrderRandom(),
|
|
|
|
];
|
|
|
|
const reviewOrderChoices = [
|
|
|
|
tr.deckConfigSortOrderDueDateThenRandom(),
|
2021-06-01 05:22:39 +02:00
|
|
|
tr.deckConfigSortOrderDueDateThenDeck(),
|
|
|
|
tr.deckConfigSortOrderDeckThenDueDate(),
|
2021-05-24 10:25:17 +02:00
|
|
|
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}
|
|
|
|
/>
|