mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
54 lines
1.0 KiB
Vue
54 lines
1.0 KiB
Vue
<template>
|
|
<div class="w-full h-full overflow-y-auto overflow-x-hidden px-4 py-6">
|
|
<tables-library-files-table expanded :library-item="libraryItem" :is-missing="isMissing" in-modal />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
libraryItem: {
|
|
type: Object,
|
|
default: () => {}
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
tracks: []
|
|
}
|
|
},
|
|
watch: {
|
|
libraryItem: {
|
|
immediate: true,
|
|
handler(newVal) {
|
|
if (newVal) this.init()
|
|
}
|
|
}
|
|
},
|
|
computed: {
|
|
media() {
|
|
return this.libraryItem.media || {}
|
|
},
|
|
userToken() {
|
|
return this.$store.getters['user/getToken']
|
|
},
|
|
userCanUpdate() {
|
|
return this.$store.getters['user/getUserCanUpdate']
|
|
},
|
|
userCanDownload() {
|
|
return this.$store.getters['user/getUserCanDownload']
|
|
},
|
|
isMissing() {
|
|
return this.libraryItem.isMissing
|
|
},
|
|
showDownload() {
|
|
return this.userCanDownload && !this.isMissing
|
|
}
|
|
},
|
|
methods: {
|
|
init() {
|
|
this.tracks = this.media.tracks || []
|
|
}
|
|
}
|
|
}
|
|
</script> |