From d727f6d58a9eed80466b4f1a04beef8ea2a0d29c Mon Sep 17 00:00:00 2001 From: Eduard Duran Date: Sun, 26 Apr 2026 14:18:38 +0200 Subject: [PATCH] Unlock secret solver via 7 rapid taps on the title Allows mobile users to access the auto-solver without a keyboard. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/App.css | 2 ++ src/App.jsx | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/App.css b/src/App.css index 5e9b290..6ee92b9 100644 --- a/src/App.css +++ b/src/App.css @@ -33,6 +33,8 @@ body { font-weight: 700; color: #343a40; letter-spacing: -0.5px; + user-select: none; + -webkit-user-select: none; } .app-main { diff --git a/src/App.jsx b/src/App.jsx index 3ee73f7..d58a681 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react' +import React, { useState, useEffect, useRef } from 'react' import Board from './components/Board' import NumberPad from './components/NumberPad' import GameControls from './components/GameControls' @@ -36,6 +36,19 @@ function App() { const [autoSolving, setAutoSolving] = useState(false) const [autoBlinkCell, setAutoBlinkCell] = useState(null) const [autoCooldown, setAutoCooldown] = useState(false) + const titleTapsRef = useRef({ count: 0, lastTap: 0 }) + + function handleTitleTap() { + if (solveUnlocked) return + const now = Date.now() + const ref = titleTapsRef.current + ref.count = now - ref.lastTap < 800 ? ref.count + 1 : 1 + ref.lastTap = now + if (ref.count >= 7) { + setSolveUnlocked(true) + ref.count = 0 + } + } useEffect(() => { document.body.style.background = state.darkMode ? '#1a1a2e' : '#f8f9fa' @@ -124,7 +137,7 @@ function App() { return (
-

Sudoku

+

Sudoku