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:
21
src/app.js
21
src/app.js
@@ -750,24 +750,15 @@ function updateNavigationButtons() {
|
||||
const engineState = lessonEngine.getCurrentState();
|
||||
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.gameControls?.classList.toggle("centered", isPlayground);
|
||||
|
||||
if (isPlayground) {
|
||||
// Change prev button to "Back" in playground mode
|
||||
elements.prevBtn.textContent = t("back");
|
||||
elements.prevBtn.disabled = false;
|
||||
elements.prevBtn.classList.remove("btn-disabled");
|
||||
} 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);
|
||||
}
|
||||
// Update button states
|
||||
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() {
|
||||
|
||||
@@ -17,12 +17,9 @@ export async function handleOAuthCallback() {
|
||||
|
||||
// Check if hash contains OAuth tokens (access_token, error, etc.)
|
||||
if (!hash.includes("access_token") && !hash.includes("error_description") && !hash.includes("refresh_token")) {
|
||||
console.log("[Auth] No OAuth tokens in hash");
|
||||
return false;
|
||||
}
|
||||
|
||||
console.log("[Auth] OAuth callback detected in URL hash");
|
||||
|
||||
try {
|
||||
const supabaseModule = await import("./supabase.js");
|
||||
if (!supabaseModule.isConfigured) {
|
||||
|
||||
Reference in New Issue
Block a user