Skip to content

Commit

Permalink
[ui]: try to clarify if Card.vue is movie or Full Season
Browse files Browse the repository at this point in the history
  • Loading branch information
tachibana-shin committed May 28, 2023
1 parent 6538d42 commit 04f37f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/apis/parser/__helpers__/getInfoTPost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function getInfoTPost(cheerio: Cheerio<Element>, now: number) {
const name = cheerio.find(".Title:eq(0)").text()

const _chap = cheerio.find(".mli-eps > i:eq(0)").text()
const chap = _chap === "TẤT" ? "Full" : _chap
const chap = _chap === "TẤT" ? "Full_Season" : _chap
const rate = parseFloat(
cheerio.find(".anime-avg-user-rating:eq(0)").text().trim() ||
cheerio.find(".AAIco-star:eq(0)").text().trim()
Expand All @@ -28,7 +28,7 @@ export function getInfoTPost(cheerio: Cheerio<Element>, now: number) {
)

// =============== more =====================
const quality = cheerio.find(".Qlty:eq(0)").text()
const quality = cheerio.find(".Qlty:eq(0)").text() || cheerio.find(".mli-quality:eq(0)").text()

const process = cheerio.find(".AAIco-access_time:eq(0)").text()

Expand Down
9 changes: 4 additions & 5 deletions src/components/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@
</template>

<span v-if="!data.chap">
<template v-if="data.process[0] === data.process[1]">
{{ data.process[0] }} tập
</template>
<template v-else> Tập {{ data.process }} </template>
<template v-if="data.process"> Tập {{ data.process }} </template>
<template v-else-if="data.quality">Movie</template>
</span>
<span v-else-if="data.chap === 'Full_Season'">Full Season</span>
<span v-else>Tập {{ data.chap }}</span>
</BottomBlur>
<Quality
v-if="data.quality"
:class="trending ? 'right-0 absolute' : undefined"
:class="trending ? 'right-0 top-2 absolute' : undefined"
>{{ data.quality }}</Quality
>
<img v-if="trending" :src="ranks[trending - 1]" class="h-[1.5rem]" />
Expand Down

0 comments on commit 04f37f2

Please sign in to comment.