mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-05 02:25:45 +02:00
Add local library items to bookshelf and landing page
This commit is contained in:
parent
4f8b13b23d
commit
9fd3dc6978
15 changed files with 279 additions and 125 deletions
|
@ -33,6 +33,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { Capacitor } from '@capacitor/core'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
libraryItem: {
|
||||
|
@ -60,6 +62,10 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
isLocal() {
|
||||
if (!this.libraryItem) return false
|
||||
return this.libraryItem.isLocal
|
||||
},
|
||||
squareAspectRatio() {
|
||||
return this.bookCoverAspectRatio === 1
|
||||
},
|
||||
|
@ -98,6 +104,10 @@ export default {
|
|||
return '/book_placeholder.jpg'
|
||||
},
|
||||
fullCoverUrl() {
|
||||
if (this.isLocal) {
|
||||
if (this.hasCover) return Capacitor.convertFileSrc(this.cover)
|
||||
return this.placeholderUrl
|
||||
}
|
||||
if (this.downloadCover) return this.downloadCover
|
||||
if (!this.libraryItem) return null
|
||||
var store = this.$store || this.$nuxt.$store
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue