fix: simplify playground navigation - just hide Next button

Previous button stays "Previous" and works the same everywhere.
Only difference in playground: Next button is hidden.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
2026-01-16 15:01:44 +01:00
parent a7dcb3ec6f
commit 062659fa30
2 changed files with 6 additions and 18 deletions

View File

@@ -750,24 +750,15 @@ function updateNavigationButtons() {
const engineState = lessonEngine.getCurrentState(); const engineState = lessonEngine.getCurrentState();
const isPlayground = engineState.lesson?.mode === "playground"; const isPlayground = engineState.lesson?.mode === "playground";
// In playground mode: hide next button, repurpose prev as back button // Hide next button in playground mode
elements.nextBtn.classList.toggle("hidden", isPlayground); elements.nextBtn.classList.toggle("hidden", isPlayground);
elements.gameControls?.classList.toggle("centered", isPlayground); elements.gameControls?.classList.toggle("centered", isPlayground);
if (isPlayground) { // Update button states
// Change prev button to "Back" in playground mode elements.prevBtn.disabled = !engineState.canGoPrev;
elements.prevBtn.textContent = t("back"); elements.nextBtn.disabled = !engineState.canGoNext;
elements.prevBtn.disabled = false; elements.prevBtn.classList.toggle("btn-disabled", !engineState.canGoPrev);
elements.prevBtn.classList.remove("btn-disabled"); elements.nextBtn.classList.toggle("btn-disabled", !engineState.canGoNext);
} else {
// Normal mode: prev/next navigation
elements.prevBtn.textContent = t("previous");
elements.prevBtn.disabled = !engineState.canGoPrev;
elements.nextBtn.disabled = !engineState.canGoNext;
elements.prevBtn.classList.toggle("btn-disabled", !engineState.canGoPrev);
elements.nextBtn.classList.toggle("btn-disabled", !engineState.canGoNext);
}
} }
function nextLesson() { function nextLesson() {

View File

@@ -17,12 +17,9 @@ export async function handleOAuthCallback() {
// Check if hash contains OAuth tokens (access_token, error, etc.) // Check if hash contains OAuth tokens (access_token, error, etc.)
if (!hash.includes("access_token") && !hash.includes("error_description") && !hash.includes("refresh_token")) { if (!hash.includes("access_token") && !hash.includes("error_description") && !hash.includes("refresh_token")) {
console.log("[Auth] No OAuth tokens in hash");
return false; return false;
} }
console.log("[Auth] OAuth callback detected in URL hash");
try { try {
const supabaseModule = await import("./supabase.js"); const supabaseModule = await import("./supabase.js");
if (!supabaseModule.isConfigured) { if (!supabaseModule.isConfigured) {