feat(gallery): fix router back navigation from gallery and unlock achievements after visiting instead of before

This commit is contained in:
2026-02-13 15:59:45 +01:00
parent d126eed766
commit 43cad4f36b
4 changed files with 9 additions and 4 deletions

View File

@@ -49,6 +49,7 @@ export const useAppStore = defineStore("app", {
settings,
previousScreen: "home" as AppScreen,
screen: "home" as AppScreen,
visitedGallery: false,
camera: null as THREE.Camera | null,
};
},
@@ -76,7 +77,7 @@ export const useAppStore = defineStore("app", {
break;
case "gallery":
achievements.unlock("gallery_visit");
this.visitedGallery = true;
break;
case "contact":

View File

@@ -90,6 +90,7 @@ export const useGalleryStore = defineStore("gallery", {
}
setTimeout(() => {
this.shouldAnimateOutro = true;
navigateTo("/gallery");
}, ANIMATION.NAVIGATE_DELAY);
},

View File

@@ -40,6 +40,12 @@ export const useHomeStore = defineStore("home", {
this.$reset();
this.selectedButton = selectedButton;
this.animateIntro();
if (app.visitedGallery) {
app.visitedGallery = false;
const achievements = useAchievementsStore();
achievements.unlock("gallery_visit");
}
},
animateIntro() {