feat: dev shortcut Ctrl+Shift+X to wipe IndexedDB and restart

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-29 21:03:57 +02:00
co-authored by Claude Opus 4.6
parent 7131a3522d
commit 5f9c35db1e
+9
View File
@@ -188,6 +188,15 @@ export async function initApp(): Promise<void> {
e.preventDefault(); e.preventDefault();
showParentCodePrompt(); showParentCodePrompt();
} }
// Dev shortcut: Ctrl+Shift+X to wipe all data and restart
if (e.ctrlKey && e.shiftKey && e.key === "X") {
e.preventDefault();
if (confirm("DEV: Alle Daten löschen und neu starten?")) {
const delReq = indexedDB.deleteDatabase("zauberwald");
delReq.onsuccess = () => location.reload();
delReq.onerror = () => location.reload();
}
}
}); });
const progress = await getProgress(db); const progress = await getProgress(db);