feat(gallery): allow user to interact sooner

This commit is contained in:
2026-01-03 19:35:42 +01:00
parent 772ab0a5d3
commit ae2239d17e

View File

@@ -96,6 +96,8 @@ const typeText = (
const animateIntro = async () => { const animateIntro = async () => {
await nextTick(); await nextTick();
isAnimating.value = true;
typeText(backButtonText, BACK_BUTTON, BACK_BUTTON_DURATION, false, { typeText(backButtonText, BACK_BUTTON, BACK_BUTTON_DURATION, false, {
onStart: () => (showBackButtonIcon.value = true), onStart: () => (showBackButtonIcon.value = true),
}).delay(ANIMATION_SLEEP + FADE_IN_DELAY); }).delay(ANIMATION_SLEEP + FADE_IN_DELAY);
@@ -107,7 +109,7 @@ const animateIntro = async () => {
ANIMATION_SLEEP + FADE_IN_DELAY, ANIMATION_SLEEP + FADE_IN_DELAY,
); );
await gsap.fromTo( gsap.fromTo(
".gallery-item", ".gallery-item",
{ opacity: 0 }, { opacity: 0 },
{ {
@@ -122,8 +124,13 @@ const animateIntro = async () => {
}, },
); );
isAnimating.value = false; setTimeout(
scrollArea.value?.$el.focus(); () => {
isAnimating.value = false;
scrollArea.value?.$el.focus();
},
(ANIMATION_SLEEP + FADE_IN_DURATION) * 1000,
);
}; };
const animateOutro = async () => { const animateOutro = async () => {