Remove v-if prop anti-pattern, clean up, add reader mode

This commit is contained in:
2024-02-18 14:36:50 +03:00
parent 3853e8fa20
commit 9386c1d158
21 changed files with 131 additions and 204 deletions
+7 -3
View File
@@ -8,8 +8,8 @@ const router = useRouter()
const route = useRoute()
const card = ref<HTMLElement | null>(null)
const pageStore = usePageStore()
const { pages } = storeToRefs(pageStore)
const { pages, reader } = storeToRefs(usePageStore())
const swipe = useSwipe(card, {
passive: true,
onSwipeEnd: (_touch: TouchEvent, _direction: UseSwipeDirection) => {
@@ -41,7 +41,11 @@ const swipe = useSwipe(card, {
<template>
<main
ref="card"
class="dimensions background rounded-1-sm overflow-auto d-flex flex-column gap-3 gap-sm-2 px-4 pt-4 pb-3"
class="dimensions background h-animated overflow-auto d-flex flex-column gap-3 gap-sm-2 px-4 pt-4 pb-3"
:class="{
'rounded-1-sm': !reader,
'mh-0': reader,
}"
>
<Options />
<Navigation />