From bb767a5c333496d7c08115acc3cb25f868df371b Mon Sep 17 00:00:00 2001 From: bymyself Date: Mon, 1 Sep 2025 14:37:30 -0700 Subject: [PATCH] fix: Add missing whats-new-dismissed event emission in WhatsNewPopup During merge with main, the event emission was lost from the hide() function. - Add defineEmits for 'whats-new-dismissed' event - Emit event in hide() function to maintain test compatibility - Fixes 3 failing unit tests in WhatsNewPopup.test.ts --- src/components/helpcenter/WhatsNewPopup.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/helpcenter/WhatsNewPopup.vue b/src/components/helpcenter/WhatsNewPopup.vue index a1b12bc5b..794c61e9b 100644 --- a/src/components/helpcenter/WhatsNewPopup.vue +++ b/src/components/helpcenter/WhatsNewPopup.vue @@ -75,6 +75,11 @@ import { formatVersionAnchor } from '@/utils/formatUtil' const { locale, t } = useI18n() const releaseStore = useReleaseStore() +// Define emits +const emit = defineEmits<{ + 'whats-new-dismissed': [] +}>() + // Local state for dismissed status const isDismissed = ref(false) @@ -126,6 +131,7 @@ const show = () => { const hide = () => { isDismissed.value = true + emit('whats-new-dismissed') } const closePopup = async () => {