From eddc8168ba7c1aabd6406d12faef34fab8ed9b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sat, 27 Dec 2025 19:51:50 -0600 Subject: [PATCH] feat: helping reveal --- packages/i18n/strings/en.json | 8 ++- .../website/src/components/GuessRenderer.tsx | 7 ++- packages/website/src/components/Guesser.tsx | 50 ++++++++++++++++++- packages/website/src/stores/guess.ts | 2 + 4 files changed, 63 insertions(+), 4 deletions(-) diff --git a/packages/i18n/strings/en.json b/packages/i18n/strings/en.json index 7a4a7ee57..8ccbe5487 100644 --- a/packages/i18n/strings/en.json +++ b/packages/i18n/strings/en.json @@ -917,7 +917,13 @@ "next": "Next", "no_results": "No results" }, - "stats": "{correct} / {total} correct, {streak} streak" + "stats": "{correct} / {total} correct, {streak} streak", + "help": { + "title": "Partially reveal tank?", + "description": "Reveals the tank without showing the name. This round will be considered incorrect and break your streak!", + "cancel": "Cancel", + "reveal": "Reveal" + } }, "tankopedia": { diff --git a/packages/website/src/components/GuessRenderer.tsx b/packages/website/src/components/GuessRenderer.tsx index 65aa71e04..cc349d731 100644 --- a/packages/website/src/components/GuessRenderer.tsx +++ b/packages/website/src/components/GuessRenderer.tsx @@ -9,12 +9,15 @@ const CONTRAST = 2 ** 2; export function GuessRenderer() { const guessState = Guess.use((state) => state.guessState); - const isRevealed = guessState !== GuessState.NotGuessed; + const helpingReveal = Guess.use((state) => state.helpingReveal); + const isRevealed = helpingReveal || guessState !== GuessState.NotGuessed; return ( state.guessState); const correctGuesses = Guess.use((state) => state.correctGuesses); const totalGuesses = Guess.use((state) => state.totalGuesses); + const helpingReveal = Guess.use((state) => state.helpingReveal); const streak = Guess.use((state) => state.streak); const { strings, unwrap } = useLocale(); const input = useRef(null); @@ -171,6 +175,48 @@ export function Guesser() { + + + + + + + + + + {strings.website.tools.guess.help.title} + + + {strings.website.tools.guess.help.description} + + + + + + + + + + + + + +