Hide language switcher by default; unlock with 5 taps on top-right.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
eric
2026-08-03 09:08:30 -05:00
parent 7453780e06
commit 9c2eeb9df2
5 changed files with 85 additions and 42 deletions

View File

@@ -36,8 +36,11 @@ export function LocaleProvider({ children }: { children: ReactNode }) {
let cancelled = false;
try {
// Prefer auto detection; only keep a locale if user unlocked and switched.
const unlocked = window.sessionStorage.getItem("nomadro-lang-unlock") === "1";
const saved = window.localStorage.getItem(STORAGE_KEY);
if (isLocale(saved)) {
if (unlocked && isLocale(saved)) {
if (!cancelled) {
setLocaleState(saved);
setReady(true);