From 1f73d40e1ee996413b1f43fb78f511d65676ee31 Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Fri, 6 Feb 2026 13:11:58 +0100 Subject: [PATCH] feat(settings/user/birthday): intro and outro animation --- .../BottomScreen/Menus/User/Birthday.vue | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/app/components/Settings/BottomScreen/Menus/User/Birthday.vue b/app/components/Settings/BottomScreen/Menus/User/Birthday.vue index 42a0625..5684d08 100644 --- a/app/components/Settings/BottomScreen/Menus/User/Birthday.vue +++ b/app/components/Settings/BottomScreen/Menus/User/Birthday.vue @@ -8,7 +8,32 @@ const BIRTHDAY_DAY = 25; const BIRTHDAY_MONTH = 4; const BIRTHDAY_YEAR = 2002; -const handleActivateB = () => { +const monthRef = useTemplateRef>("month"); +const dayRef = useTemplateRef>("day"); +const yearRef = useTemplateRef>("year"); + +const animateIntro = async () => { + await Promise.all([ + monthRef.value?.animateIntro(), + dayRef.value?.animateIntro(), + yearRef.value?.animateIntro(), + ]); +}; + +const animateOutro = async () => { + await Promise.all([ + monthRef.value?.animateOutro(), + dayRef.value?.animateOutro(), + yearRef.value?.animateOutro(), + ]); +}; + +onMounted(() => { + animateIntro(); +}); + +const handleActivateB = async () => { + await animateOutro(); store.closeSubMenu(); }; @@ -42,7 +67,10 @@ const handleActivateA = () => { confirmationModal.open({ text, - onClosed: () => store.closeSubMenu(), + onClosed: async () => { + await animateOutro(); + store.closeSubMenu(); + }, timeout: 2000, }); }; @@ -53,18 +81,21 @@ defineOptions({ render: () => null });