Fix defineOgImageComponent, remove swipe actions in reader mode, change onClick to addEventListener

This commit is contained in:
2024-06-19 01:19:57 +03:00
parent 4543680a92
commit 05db0b693e
5 changed files with 45 additions and 46 deletions
+6 -4
View File
@@ -11,6 +11,8 @@ const { pages, reader } = storeToRefs(usePageStore())
const swipe = useSwipe(card, {
passive: true,
onSwipeEnd: (_touch: TouchEvent, _direction: UseSwipeDirection) => {
if (reader.value) return
const currentPage = pages.value.find(
(page) => page.path === route.fullPath,
)!
@@ -38,10 +40,10 @@ const swipe = useSwipe(card, {
const animationComplete = ref(false)
onMounted(() => {
if (card.value)
card.value.addEventListener('animationend', () => {
animationComplete.value = true
})
card.value?.addEventListener(
'animationend',
() => (animationComplete.value = true),
)
})
</script>