Remove v-if prop anti-pattern, clean up, add reader mode
This commit is contained in:
+7
-3
@@ -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 />
|
||||
|
||||
Reference in New Issue
Block a user