Add explicit info

This commit is contained in:
mfcar 2023-02-22 12:48:12 +00:00
parent 8c84640484
commit c14d13440f
No known key found for this signature in database
9 changed files with 62 additions and 15 deletions

View file

@ -28,7 +28,7 @@
</div>
</div>
<div v-else class="px-4 flex-grow">
<h1>{{ book.title }}</h1>
<h1>{{ book.title }}<widgets-explicit-indicator :explicit="book.explicit" /></h1>
<p class="text-base text-gray-300 whitespace-nowrap truncate">by {{ book.author }}</p>
<p v-if="book.genres" class="text-xs text-gray-400 leading-5">{{ book.genres.join(', ') }}</p>
<p class="text-xs text-gray-400 leading-5">{{ book.trackCount }} Episodes</p>
@ -78,4 +78,4 @@ export default {
this.selectedCover = this.bookCovers.length ? this.bookCovers[0] : this.book.cover || null
}
}
</script>
</script>

View file

@ -8,7 +8,7 @@
<!-- Alternative bookshelf title/author/sort -->
<div v-if="isAlternativeBookshelfView || isAuthorBookshelfView" class="absolute left-0 z-50 w-full" :style="{ bottom: `-${titleDisplayBottomOffset}rem` }">
<p class="truncate" :style="{ fontSize: 0.9 * sizeMultiplier + 'rem' }">
{{ displayTitle }}
{{ displayTitle }}<widgets-explicit-indicator :explicit="isExplicit" />
</p>
<p class="truncate text-gray-400" :style="{ fontSize: 0.8 * sizeMultiplier + 'rem' }">{{ displayLineTwo || '&nbsp;' }}</p>
<p v-if="displaySortLine" class="truncate text-gray-400" :style="{ fontSize: 0.8 * sizeMultiplier + 'rem' }">{{ displaySortLine }}</p>
@ -193,6 +193,9 @@ export default {
isMusic() {
return this.mediaType === 'music'
},
isExplicit() {
return this.mediaMetadata.explicit || false
},
placeholderUrl() {
const config = this.$config || this.$nuxt.$config
return `${config.routerBasePath}/book_placeholder.jpg`