ADD name of the button after button number (1 → again...)

This commit is contained in:
GithubAnon0000 2025-05-02 23:41:32 +02:00
parent 963fcf7c60
commit 95bb1cfdef

View file

@ -223,7 +223,19 @@ export function renderButtons(
const timesPressed = tr.statisticsAnswerButtonsButtonPressed();
const correctStr = tr.statisticsHoursCorrect(totalCorrect(d.group));
const pressedStr = `${timesPressed}: ${totalPressedStr(d)}`;
return `${button}: ${d.buttonNum}<br>${pressedStr}<br>${correctStr}`;
let buttonText: string;
if (d.buttonNum === 1) {
buttonText = tr.studyingAgain();
} else if (d.buttonNum === 2) {
buttonText = tr.studyingHard();
} else if (d.buttonNum === 3) {
buttonText = tr.studyingGood();
} else if (d.buttonNum === 4) {
buttonText = tr.studyingEasy();
}
return `${button}: ${d.buttonNum} (${buttonText})<br>${pressedStr}<br>${correctStr}`;
}
svg.select("g.hover-columns")