From 95bb1cfdef007d9702e875fe058aa1a7554b13b2 Mon Sep 17 00:00:00 2001 From: GithubAnon0000 <160563432+GithubAnon0000@users.noreply.github.com> Date: Fri, 2 May 2025 23:41:32 +0200 Subject: [PATCH] =?UTF-8?q?ADD=20name=20of=20the=20button=20after=20button?= =?UTF-8?q?=20number=20(1=20=E2=86=92=20again...)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ts/routes/graphs/buttons.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ts/routes/graphs/buttons.ts b/ts/routes/graphs/buttons.ts index 2805f89c6..137c19d86 100644 --- a/ts/routes/graphs/buttons.ts +++ b/ts/routes/graphs/buttons.ts @@ -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}
${pressedStr}
${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})
${pressedStr}
${correctStr}`; } svg.select("g.hover-columns")