feat(achievements): black fade in and out from home and settings screen

This commit is contained in:
2026-01-26 17:54:13 +01:00
parent 1ec5953c71
commit f453839599
14 changed files with 161 additions and 72 deletions

View File

@@ -5,6 +5,6 @@ import Buttons from "./Buttons.vue";
<template>
<Background />
<Buttons />
<AchievementsFadeToBlack />
</template>

View File

@@ -17,7 +17,7 @@ const { selected, selectorPosition } = useButtonNavigation({
settings: [112, 167, 31, 26],
achievements: [225, 167, 31, 26],
},
initialButton: "projects",
initialButton: store.selectedButton,
onButtonClick: (button) => {
if (button === "theme") throw new Error(`Not implemented: ${button}`);
@@ -64,6 +64,10 @@ const { selected, selectorPosition } = useButtonNavigation({
},
});
watch(selected, (newSelected) => {
store.selectedButton = newSelected;
});
const getButtonOffset = (button: (typeof selected)["value"]) => {
if (selected.value === button) return store.outro.buttonOffsetY;
return 0;

View File

@@ -7,8 +7,7 @@ import StatusBar from "./StatusBar.vue";
const store = useHomeStore();
onMounted(() => {
store.$reset();
store.animateIntro();
store.reset();
});
</script>
@@ -17,4 +16,5 @@ onMounted(() => {
<Calendar />
<Clock />
<StatusBar />
<AchievementsFadeToBlack />
</template>