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:
13
src/app.js
13
src/app.js
@@ -750,25 +750,16 @@ 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.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.prevBtn.disabled = !engineState.canGoPrev;
|
||||||
elements.nextBtn.disabled = !engineState.canGoNext;
|
elements.nextBtn.disabled = !engineState.canGoNext;
|
||||||
|
|
||||||
elements.prevBtn.classList.toggle("btn-disabled", !engineState.canGoPrev);
|
elements.prevBtn.classList.toggle("btn-disabled", !engineState.canGoPrev);
|
||||||
elements.nextBtn.classList.toggle("btn-disabled", !engineState.canGoNext);
|
elements.nextBtn.classList.toggle("btn-disabled", !engineState.canGoNext);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function nextLesson() {
|
function nextLesson() {
|
||||||
const prevModuleId = lessonEngine.getCurrentState().module?.id;
|
const prevModuleId = lessonEngine.getCurrentState().module?.id;
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user