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
This commit is contained in:
bymyself
2025-09-01 14:37:30 -07:00
parent 7c88dbc969
commit bb767a5c33

View File

@@ -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 () => {