Show message on pass

This commit is contained in:
Luc Mcgrady 2025-06-05 23:14:24 +01:00
parent e642eb535e
commit 300d050460
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C
2 changed files with 15 additions and 6 deletions

View file

@ -493,6 +493,7 @@ deck-config-fsrs-bad-fit-warning = Your memory is difficult for FSRS to predict.
- Understand before you memorize.
After you follow these suggestions, it may take weeks or months before parameters become optimal.
deck-config-fsrs-good-fit = FSRS is well adjusted to your memory.
deck-config-fsrs-params-no-reviews = No reviews found. Make sure this preset is assigned to all decks (including subdecks) that you want to optimize, and try again.

View file

@ -190,12 +190,20 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
)) ||
resp.params.length === 0;
const health_check_passed =
resp.healthCheckPassed && !resp.healthCheckPassed;
if (health_check_passed) {
setTimeout(() => alert(tr.deckConfigFsrsBadFitWarning()));
} else if (already_optimal) {
if (resp.healthCheckPassed !== undefined) {
if (resp.healthCheckPassed) {
setTimeout(
() => alert(tr.deckConfigFsrsGoodFit()),
200,
);
} else {
setTimeout(
() => alert(tr.deckConfigFsrsBadFitWarning()),
200,
);
}
}
else if (already_optimal) {
const msg = resp.fsrsItems
? tr.deckConfigFsrsParamsOptimal()
: tr.deckConfigFsrsParamsNoReviews();