diff --git a/apps/web/src/app/games/memory-quiz/page.tsx b/apps/web/src/app/games/memory-quiz/page.tsx index a62f9718..df56db3c 100644 --- a/apps/web/src/app/games/memory-quiz/page.tsx +++ b/apps/web/src/app/games/memory-quiz/page.tsx @@ -952,6 +952,7 @@ function InputPhase({ state, dispatch }: { state: SorobanQuizState; dispatch: Re // Keyboard detection state const [hasPhysicalKeyboard, setHasPhysicalKeyboard] = useState(null) const [keyboardDetectionAttempted, setKeyboardDetectionAttempted] = useState(false) + const [showOnScreenKeyboard, setShowOnScreenKeyboard] = useState(false) // Detect physical keyboard availability useEffect(() => { @@ -1142,7 +1143,7 @@ function InputPhase({ state, dispatch }: { state: SorobanQuizState; dispatch: Re
- {/* On-screen number pad for devices without physical keyboard */} + {/* Toggle button for on-screen keyboard (only shown when no physical keyboard detected) */} {hasPhysicalKeyboard === false && state.guessesRemaining > 0 && (
+ +
+ )} + + {/* Collapsible on-screen number pad */} + {hasPhysicalKeyboard === false && state.guessesRemaining > 0 && showOnScreenKeyboard && ( +
- 📱 Tap to enter numbers + 📱 Tap to enter numbers +
{[1, 2, 3, 4, 5, 6, 7, 8, 9].map(digit => ( ))} - {/* Bottom row: 0 and backspace */} +
+
-
- -
+
)} @@ -1719,6 +1781,17 @@ const globalAnimations = ` 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } } + +@keyframes slideUp { + from { + opacity: 0; + transform: translateX(-50%) translateY(20px); + } + to { + opacity: 1; + transform: translateX(-50%) translateY(0); + } +} ` export default function MemoryQuizPage() {