Fixed error for Ratings page and stats page & added controlls to make Rating system and Ratings page optional (admin can turn it on or off for the server)

This commit is contained in:
fannta1990 2026-02-09 10:58:17 +01:00
parent 3a8075a077
commit e4e2770fbd
10 changed files with 128 additions and 49 deletions

View file

@ -68,7 +68,7 @@
<div v-show="isNarratorsPage" class="h-full w-0.5 bg-yellow-400 absolute top-0 left-0" />
</nuxt-link>
<nuxt-link v-if="isBookLibrary" :to="`/library/${currentLibraryId}/ratings`" class="w-full h-20 flex flex-col items-center justify-center text-white/80 border-b border-primary/70 hover:bg-primary cursor-pointer relative" :class="isRatingsPage ? 'bg-primary/80' : 'bg-bg/60'">
<nuxt-link v-if="isBookLibrary && enableReviews && showReviewsInSidebar" :to="`/library/${currentLibraryId}/ratings`" class="w-full h-20 flex flex-col items-center justify-center text-white/80 border-b border-primary/70 hover:bg-primary cursor-pointer relative" :class="isRatingsPage ? 'bg-primary/80' : 'bg-bg/60'">
<span class="material-symbols text-2xl">star</span>
<p class="pt-1 text-center leading-4" style="font-size: 0.9rem">{{ $strings.ButtonRatings }}</p>
@ -207,6 +207,12 @@ export default {
numIssues() {
return this.$store.state.libraries.issues || 0
},
enableReviews() {
return this.$store.getters['getServerSetting']('enableReviews')
},
showReviewsInSidebar() {
return this.$store.getters['getServerSetting']('showReviewsInSidebar')
},
versionData() {
return this.$store.state.versionData || {}
},