Added: ShowAnswer

This commit is contained in:
Luc Mcgrady 2025-10-04 18:32:40 +01:00
parent cadf59f8d6
commit 85ebdefec0
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C
2 changed files with 2 additions and 1 deletions

View file

@ -47,7 +47,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
{$remaining[2]} {$remaining[2]}
</RemainingNumber> </RemainingNumber>
</span> </span>
<button on:click={() => bridgeCommand("ans")}> <button on:click={() => state.showAnswer()}>
{tr.studyingShowAnswer()} {tr.studyingShowAnswer()}
</button> </button>
{/if} {/if}

View file

@ -34,6 +34,7 @@ export class ReviewerState {
answer: answer || undefined, answer: answer || undefined,
}); });
// TODO: "Congratulation screen" logic // TODO: "Congratulation screen" logic
this.cardData = resp.nextCard
const question = resp.nextCard?.front || ""; const question = resp.nextCard?.front || "";
this.updateHtml(question); this.updateHtml(question);
} }