mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
Feat/Confirmation box for save options to preset (#4172)
This commit is contained in:
parent
f927aa5788
commit
b16439fc9c
2 changed files with 18 additions and 13 deletions
|
@ -514,6 +514,7 @@ deck-config-advanced-settings = Advanced Settings
|
||||||
deck-config-smooth-graph = Smooth graph
|
deck-config-smooth-graph = Smooth graph
|
||||||
deck-config-suspend-leeches = Suspend leeches
|
deck-config-suspend-leeches = Suspend leeches
|
||||||
deck-config-save-options-to-preset = Save Changes to Preset
|
deck-config-save-options-to-preset = Save Changes to Preset
|
||||||
|
deck-config-save-options-to-preset-confirm = Overwrite the options in your current preset with the options that are currently set in the simulator?
|
||||||
# Radio button in the FSRS simulation diagram (Deck options -> FSRS) selecting
|
# Radio button in the FSRS simulation diagram (Deck options -> FSRS) selecting
|
||||||
# to show the total number of cards that can be recalled or retrieved on a
|
# to show the total number of cards that can be recalled or retrieved on a
|
||||||
# specific date.
|
# specific date.
|
||||||
|
|
|
@ -447,19 +447,23 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
class="btn {computing ? 'btn-warning' : 'btn-primary'}"
|
class="btn {computing ? 'btn-warning' : 'btn-primary'}"
|
||||||
disabled={computing}
|
disabled={computing}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$config.newPerDay = simulateFsrsRequest.newLimit;
|
if (confirm(tr.deckConfigSaveOptionsToPresetConfirm())) {
|
||||||
$config.reviewsPerDay = simulateFsrsRequest.reviewLimit;
|
$config.newPerDay = simulateFsrsRequest.newLimit;
|
||||||
$config.maximumReviewInterval = simulateFsrsRequest.maxInterval;
|
$config.reviewsPerDay = simulateFsrsRequest.reviewLimit;
|
||||||
$config.desiredRetention = simulateFsrsRequest.desiredRetention;
|
$config.maximumReviewInterval =
|
||||||
$newCardsIgnoreReviewLimit =
|
simulateFsrsRequest.maxInterval;
|
||||||
simulateFsrsRequest.newCardsIgnoreReviewLimit;
|
$config.desiredRetention =
|
||||||
$config.reviewOrder = simulateFsrsRequest.reviewOrder;
|
simulateFsrsRequest.desiredRetention;
|
||||||
$config.leechAction = suspendLeeches
|
$newCardsIgnoreReviewLimit =
|
||||||
? DeckConfig_Config_LeechAction.SUSPEND
|
simulateFsrsRequest.newCardsIgnoreReviewLimit;
|
||||||
: DeckConfig_Config_LeechAction.TAG_ONLY;
|
$config.reviewOrder = simulateFsrsRequest.reviewOrder;
|
||||||
$config.leechThreshold = leechThreshold;
|
$config.leechAction = suspendLeeches
|
||||||
$config.easyDaysPercentages = [...easyDayPercentages];
|
? DeckConfig_Config_LeechAction.SUSPEND
|
||||||
onPresetChange();
|
: DeckConfig_Config_LeechAction.TAG_ONLY;
|
||||||
|
$config.leechThreshold = leechThreshold;
|
||||||
|
$config.easyDaysPercentages = [...easyDayPercentages];
|
||||||
|
onPresetChange();
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{tr.deckConfigSaveOptionsToPreset()}
|
{tr.deckConfigSaveOptionsToPreset()}
|
||||||
|
|
Loading…
Reference in a new issue