Change: Multiple authors are treated separately for filtering and searching #103

This commit is contained in:
advplyr 2021-10-31 16:40:27 -05:00
parent d38d4dcd62
commit 2c6cfae6a1
5 changed files with 39 additions and 15 deletions

View file

@ -17,11 +17,10 @@
</h1>
<p v-if="subtitle" class="ml-4 text-gray-400 text-2xl">{{ subtitle }}</p>
</div>
<p class="mb-2 mt-0.5 text-gray-100 text-xl">
by <nuxt-link v-if="authorFL" :to="`/library/${libraryId}/bookshelf?filter=authors.${$encode(authorFL)}`" class="hover:underline">{{ authorFL }}</nuxt-link
><span v-else>Unknown</span>
<p v-if="authorFL" class="mb-2 mt-0.5 text-gray-200 text-xl">
by <nuxt-link v-for="(author, index) in authorsList" :key="index" :to="`/library/${libraryId}/bookshelf?filter=authors.${$encode(author)}`" class="hover:underline">{{ author }}<span v-if="index < authorsList.length - 1">,&nbsp;</span></nuxt-link>
</p>
<p v-else class="mb-2 mt-0.5 text-gray-200 text-xl">by Unknown</p>
<nuxt-link v-if="series" :to="`/library/${libraryId}/bookshelf/series?series=${$encode(series)}`" class="hover:underline font-sans text-gray-300 text-lg leading-7 mb-4"> {{ seriesText }}</nuxt-link>
<div v-if="narrator" class="flex py-0.5">
@ -263,6 +262,9 @@ export default {
authorFL() {
return this.book.authorFL
},
authorsList() {
return this.authorFL ? this.authorFL.split(', ') : []
},
authorLF() {
return this.book.authorLF
},