Skip to content

Commit

Permalink
Fix save progress, hide pages when it loading image and fix general
Browse files Browse the repository at this point in the history
  • Loading branch information
cesxhin committed Oct 16, 2023
1 parent 8f26c51 commit b6e8351
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
29 changes: 16 additions & 13 deletions src/components/room/bookManga.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<template v-if="!modeList">
<div class="d-flex flex-row align-center justify-center">
<div
v-if="indexPage > 0 && (!modeMobile)"
v-if="indexPage > 0 && (!modeMobile) && !loadingImage"
class="btn-page"
@click="previousPage"
>
Expand All @@ -34,9 +34,9 @@
:src="getUrl()"
class="img-page pa-1"
@click="changePage"
:onerror="openDialogCertificate(hostHTTP)"
:onerror="() => openDialogCertificate(hostHTTP)"
/>
<div v-if="loadingImage" class="d-flex align-center justify-center fill-height">
<div v-if="loadingImage" class="d-flex align-center justify-center fill-height" style="overflow: hidden;">
<v-progress-circular
color="primary"
size="100"
Expand All @@ -46,7 +46,7 @@
</div>
</div>
<div
v-if="data && indexPage < (data.chapterPath.length - 1) && (!modeMobile)"
v-if="data && indexPage < (data.chapterPath.length - 1) && (!modeMobile) && !loadingImage"
class="btn-page"
@click="nextPage"
>
Expand Down Expand Up @@ -77,9 +77,9 @@
ref="imgBooks"
class="img-page"
v-show="!loadingImage"
:onerror="openDialogCertificate(hostHTTP)"
:onerror="() => openDialogCertificate(hostHTTP)"
/>
<div v-if="loadingImage" class="d-flex align-center justify-center fill-height">
<div v-if="loadingImage" class="d-flex align-center justify-center fill-height" style="overflow: hidden;">
<v-progress-circular
bg-color="secondary"
color="primary"
Expand Down Expand Up @@ -465,25 +465,28 @@ async function load() {
progress.value = {
nameCfg: route.query.nameCfg,
name: route.query.name,
nameChapter: route.query.name,
nameChapter: route.query.chapter,
username: store.getUser?.username,
page: 0
}
}
},
null,
null,
true
);
}
if(!isNil(progress.value) && progress.value.nameChapter === result.chapterId)
indexPage.value = progress.value.page;
else
indexPage.value = 0;
await apiAsync(
getRegister({
id: route.query.chapter
}, 'book'),
(rs) => data.value = rs
)
if(!isNil(progress.value) && progress.value.nameChapter === useGet(data.value, 'chapterId'))
indexPage.value = progress.value.page;
else
indexPage.value = 0;
await apiAsync(
getStatus({
Expand Down
5 changes: 4 additions & 1 deletion src/components/room/videoAnime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,10 @@ async function getProgressStatus() {
minutes: 0,
seconds: 0
}
}
},
null,
null,
true
);
}
}
Expand Down

0 comments on commit b6e8351

Please sign in to comment.