mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Flip order of question/answer actions, and ascending/descending ease
https://forums.ankiweb.net/t/anki-24-10-beta/49989/53
This commit is contained in:
parent
de3b1754fa
commit
80ebdf1988
2 changed files with 76 additions and 62 deletions
|
@ -40,14 +40,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
title: tr.deckConfigWaitForAudio(),
|
title: tr.deckConfigWaitForAudio(),
|
||||||
help: tr.deckConfigWaitForAudioTooltip2(),
|
help: tr.deckConfigWaitForAudioTooltip2(),
|
||||||
},
|
},
|
||||||
answerAction: {
|
|
||||||
title: tr.deckConfigAnswerAction(),
|
|
||||||
help: tr.deckConfigAnswerActionTooltip2(),
|
|
||||||
},
|
|
||||||
questionAction: {
|
questionAction: {
|
||||||
title: tr.deckConfigQuestionAction(),
|
title: tr.deckConfigQuestionAction(),
|
||||||
help: tr.deckConfigQuestionActionToolTip(),
|
help: tr.deckConfigQuestionActionToolTip(),
|
||||||
},
|
},
|
||||||
|
answerAction: {
|
||||||
|
title: tr.deckConfigAnswerAction(),
|
||||||
|
help: tr.deckConfigAnswerActionTooltip2(),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
const helpSections = Object.values(settings) as HelpItem[];
|
const helpSections = Object.values(settings) as HelpItem[];
|
||||||
|
|
||||||
|
@ -120,20 +120,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</SwitchRow>
|
</SwitchRow>
|
||||||
</Item>
|
</Item>
|
||||||
|
|
||||||
<Item>
|
|
||||||
<EnumSelectorRow
|
|
||||||
bind:value={$config.answerAction}
|
|
||||||
defaultValue={defaults.answerAction}
|
|
||||||
choices={answerChoices()}
|
|
||||||
>
|
|
||||||
<SettingTitle
|
|
||||||
on:click={() =>
|
|
||||||
openHelpModal(Object.keys(settings).indexOf("answerAction"))}
|
|
||||||
>
|
|
||||||
{settings.answerAction.title}
|
|
||||||
</SettingTitle>
|
|
||||||
</EnumSelectorRow>
|
|
||||||
</Item>
|
|
||||||
<Item>
|
<Item>
|
||||||
<EnumSelectorRow
|
<EnumSelectorRow
|
||||||
bind:value={$config.questionAction}
|
bind:value={$config.questionAction}
|
||||||
|
@ -148,5 +134,19 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</SettingTitle>
|
</SettingTitle>
|
||||||
</EnumSelectorRow>
|
</EnumSelectorRow>
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item>
|
||||||
|
<EnumSelectorRow
|
||||||
|
bind:value={$config.answerAction}
|
||||||
|
defaultValue={defaults.answerAction}
|
||||||
|
choices={answerChoices()}
|
||||||
|
>
|
||||||
|
<SettingTitle
|
||||||
|
on:click={() =>
|
||||||
|
openHelpModal(Object.keys(settings).indexOf("answerAction"))}
|
||||||
|
>
|
||||||
|
{settings.answerAction.title}
|
||||||
|
</SettingTitle>
|
||||||
|
</EnumSelectorRow>
|
||||||
|
</Item>
|
||||||
</DynamicallySlottable>
|
</DynamicallySlottable>
|
||||||
</TitledContainer>
|
</TitledContainer>
|
||||||
|
|
|
@ -71,50 +71,47 @@ export function newSortOrderChoices(): Choice<DeckConfig_Config_NewCardSortOrder
|
||||||
|
|
||||||
export function reviewOrderChoices(fsrs: boolean): Choice<DeckConfig_Config_ReviewCardOrder>[] {
|
export function reviewOrderChoices(fsrs: boolean): Choice<DeckConfig_Config_ReviewCardOrder>[] {
|
||||||
return [
|
return [
|
||||||
{
|
...[
|
||||||
label: tr.deckConfigSortOrderDueDateThenRandom(),
|
{
|
||||||
value: DeckConfig_Config_ReviewCardOrder.DAY,
|
label: tr.deckConfigSortOrderDueDateThenRandom(),
|
||||||
},
|
value: DeckConfig_Config_ReviewCardOrder.DAY,
|
||||||
{
|
},
|
||||||
label: tr.deckConfigSortOrderDueDateThenDeck(),
|
{
|
||||||
value: DeckConfig_Config_ReviewCardOrder.DAY_THEN_DECK,
|
label: tr.deckConfigSortOrderDueDateThenDeck(),
|
||||||
},
|
value: DeckConfig_Config_ReviewCardOrder.DAY_THEN_DECK,
|
||||||
{
|
},
|
||||||
label: tr.deckConfigSortOrderDeckThenDueDate(),
|
{
|
||||||
value: DeckConfig_Config_ReviewCardOrder.DECK_THEN_DAY,
|
label: tr.deckConfigSortOrderDeckThenDueDate(),
|
||||||
},
|
value: DeckConfig_Config_ReviewCardOrder.DECK_THEN_DAY,
|
||||||
{
|
},
|
||||||
label: tr.deckConfigSortOrderAscendingIntervals(),
|
{
|
||||||
value: DeckConfig_Config_ReviewCardOrder.INTERVALS_ASCENDING,
|
label: tr.deckConfigSortOrderAscendingIntervals(),
|
||||||
},
|
value: DeckConfig_Config_ReviewCardOrder.INTERVALS_ASCENDING,
|
||||||
{
|
},
|
||||||
label: tr.deckConfigSortOrderDescendingIntervals(),
|
{
|
||||||
value: DeckConfig_Config_ReviewCardOrder.INTERVALS_DESCENDING,
|
label: tr.deckConfigSortOrderDescendingIntervals(),
|
||||||
},
|
value: DeckConfig_Config_ReviewCardOrder.INTERVALS_DESCENDING,
|
||||||
{
|
},
|
||||||
label: fsrs ? tr.deckConfigSortOrderDescendingDifficulty() : tr.deckConfigSortOrderAscendingEase(),
|
],
|
||||||
value: DeckConfig_Config_ReviewCardOrder.EASE_ASCENDING,
|
...difficultyOrders(fsrs),
|
||||||
},
|
...[
|
||||||
{
|
{
|
||||||
label: fsrs ? tr.deckConfigSortOrderAscendingDifficulty() : tr.deckConfigSortOrderDescendingEase(),
|
label: tr.deckConfigSortOrderRelativeOverdueness(),
|
||||||
value: DeckConfig_Config_ReviewCardOrder.EASE_DESCENDING,
|
value: DeckConfig_Config_ReviewCardOrder.RELATIVE_OVERDUENESS,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: tr.deckConfigSortOrderRelativeOverdueness(),
|
label: tr.deckConfigSortOrderRandom(),
|
||||||
value: DeckConfig_Config_ReviewCardOrder.RELATIVE_OVERDUENESS,
|
value: DeckConfig_Config_ReviewCardOrder.RANDOM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: tr.deckConfigSortOrderRandom(),
|
label: tr.decksOrderAdded(),
|
||||||
value: DeckConfig_Config_ReviewCardOrder.RANDOM,
|
value: DeckConfig_Config_ReviewCardOrder.ADDED,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: tr.decksOrderAdded(),
|
label: tr.decksLatestAddedFirst(),
|
||||||
value: DeckConfig_Config_ReviewCardOrder.ADDED,
|
value: DeckConfig_Config_ReviewCardOrder.REVERSE_ADDED,
|
||||||
},
|
},
|
||||||
{
|
],
|
||||||
label: tr.decksLatestAddedFirst(),
|
|
||||||
value: DeckConfig_Config_ReviewCardOrder.REVERSE_ADDED,
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,3 +194,20 @@ export function questionActionChoices(): Choice<DeckConfig_Config_QuestionAction
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function difficultyOrders(fsrs: boolean): Choice<DeckConfig_Config_ReviewCardOrder>[] {
|
||||||
|
const order = [
|
||||||
|
{
|
||||||
|
label: fsrs ? tr.deckConfigSortOrderDescendingDifficulty() : tr.deckConfigSortOrderAscendingEase(),
|
||||||
|
value: DeckConfig_Config_ReviewCardOrder.EASE_ASCENDING,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: fsrs ? tr.deckConfigSortOrderAscendingDifficulty() : tr.deckConfigSortOrderDescendingEase(),
|
||||||
|
value: DeckConfig_Config_ReviewCardOrder.EASE_DESCENDING,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
if (fsrs) {
|
||||||
|
order.reverse();
|
||||||
|
}
|
||||||
|
return order;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue