Skip to content

Commit

Permalink
feat: fix name next chap lost
Browse files Browse the repository at this point in the history
  • Loading branch information
tachibana-shin committed Dec 21, 2023
1 parent 7832797 commit d12044d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions src/components/truyen-tranh/readers/ReaderHorizontal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
>
<router-link
class="w-full h-120px flex items-center justify-center my-auto text-20px text-weight-medium absolute top-1/2 left-1/2 translate--1/2"
:to="nextEpisode"
:to="nextEpisode.route"
:replace="APP_STANDALONE"
@click.stop
@mousedown.stop.prevent
Expand Down Expand Up @@ -103,7 +103,7 @@
>
<router-link
class="w-full h-120px flex items-center justify-center my-auto text-20px text-weight-medium absolute top-1/2 left-1/2 translate--1/2"
:to="nextEpisode"
:to="nextEpisode.route"
:replace="APP_STANDALONE"
@click.stop
@mousedown.stop.prevent
Expand Down Expand Up @@ -135,8 +135,8 @@ import ChapterPageModeSingle from "./__components__/ChapterPageModeSingle.vue"
const props = defineProps<{
pages: readonly (Promise<string> | string)[]
pagesNext?: string[]
nextEpisode: Chapter["route"] | null
prevEpisode: Chapter["route"] | null
nextEpisode: Chapter | null
prevEpisode: Chapter | null
singlePage: boolean // 517px
rightToLeft: boolean
Expand Down Expand Up @@ -244,8 +244,8 @@ function prev() {
// change episode
if (props.prevEpisode)
if (requestedPrev.value) {
if (APP_STANDALONE) void router.replace(props.prevEpisode)
else void router.push(props.prevEpisode)
if (APP_STANDALONE) void router.replace(props.prevEpisode.route)
else void router.push(props.prevEpisode.route)
} else {
// show notify
requestedPrev.value = true
Expand All @@ -270,8 +270,8 @@ function next() {
// change episode
if (props.nextEpisode)
if (requestedNext.value) {
if (APP_STANDALONE) void router.replace(props.nextEpisode)
else void router.push(props.nextEpisode)
if (APP_STANDALONE) void router.replace(props.nextEpisode.route)
else void router.push(props.nextEpisode.route)
} else {
// show notify
requestedNext.value = true
Expand Down
6 changes: 3 additions & 3 deletions src/components/truyen-tranh/readers/ReaderVertical.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<router-link
v-if="nextEpisode"
class="w-full h-120px flex items-center justify-center"
:to="nextEpisode"
:to="nextEpisode.route"
:replace="APP_STANDALONE"
@click.stop
ref="btnNextEpRef"
Expand Down Expand Up @@ -114,8 +114,8 @@ const props = defineProps<{
currentPage: number
zoom: number
nextEpisode: Chapter["route"] | null
prevEpisode: Chapter["route"] | null
nextEpisode: Chapter | null
prevEpisode: Chapter | null
}>()
const emit = defineEmits<{
(name: "update:zoom", value: number): void
Expand Down
8 changes: 4 additions & 4 deletions src/pages/~[sourceId]/comic/[comic]/chap-[chap].vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ meta:
:max-page="maxPage"
v-model:current-page="currentPage"
v-model:zoom="zoom"
:next-episode="nextEpisode?.value.route ?? null"
:prev-episode="prevEpisode?.value.route ?? null"
:next-episode="nextEpisode?.value ?? null"
:prev-episode="prevEpisode?.value ?? null"
/>
<ReaderVertical
v-else
ref="readerVerticalRef"
:pages="pages"
v-model:current-page="currentPage"
v-model:zoom="zoom"
:next-episode="nextEpisode?.value.route ?? null"
:prev-episode="prevEpisode?.value.route ?? null"
:next-episode="nextEpisode?.value ?? null"
:prev-episode="prevEpisode?.value ?? null"
@action:next-ch="nextCh"
/>

Expand Down

0 comments on commit d12044d

Please sign in to comment.