feat(settings): block interactions while animating

This commit is contained in:
2026-02-05 21:10:37 +01:00
parent 1236e86981
commit 4eed175e69
3 changed files with 36 additions and 4 deletions

View File

@@ -104,6 +104,7 @@ const animateNotification = (
if (prev !== null && curr === null) {
// slide down
visibleRef.value = prev;
store.animatingNotification = true;
gsap.fromTo(
offsetRef,
{ value: 0 },
@@ -113,16 +114,29 @@ const animateNotification = (
ease: "none",
onComplete: () => {
visibleRef.value = null;
setTimeout(() => {
store.animatingNotification = false;
}, 50);
},
},
);
} else if (prev === null && curr !== null) {
// slide up
store.animatingNotification = true;
visibleRef.value = curr;
gsap.fromTo(
offsetRef,
{ value: 48 },
{ value: 0, duration: 0.2, ease: "none" },
{
value: 0,
duration: 0.2,
ease: "none",
onComplete: () => {
setTimeout(() => {
store.animatingNotification = false;
}, 50);
},
},
);
}
};