2021-09-08 16:15:54 +02:00
|
|
|
<template>
|
|
|
|
<div class="w-full h-full overflow-y-auto overflow-x-hidden px-4 py-6">
|
2022-03-26 17:59:34 +01:00
|
|
|
<div class="w-full mb-4">
|
2022-05-11 00:03:41 +02:00
|
|
|
<tables-chapters-table v-if="chapters.length" :library-item="libraryItem" keep-open />
|
|
|
|
<div v-if="!chapters.length" class="py-4 text-center">
|
|
|
|
<p class="mb-8 text-xl">No Chapters</p>
|
|
|
|
<ui-btn v-if="userCanUpdate" :to="`/audiobook/${libraryItem.id}/chapters`">Add Chapters</ui-btn>
|
2022-03-17 18:25:12 +01:00
|
|
|
</div>
|
2022-03-26 17:59:34 +01:00
|
|
|
</div>
|
2021-09-08 16:15:54 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
2022-03-11 01:45:02 +01:00
|
|
|
libraryItem: {
|
2021-09-08 16:15:54 +02:00
|
|
|
type: Object,
|
|
|
|
default: () => {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
2022-03-17 18:25:12 +01:00
|
|
|
return {}
|
2021-09-08 16:15:54 +02:00
|
|
|
},
|
2022-03-17 18:25:12 +01:00
|
|
|
computed: {
|
|
|
|
media() {
|
|
|
|
return this.libraryItem ? this.libraryItem.media || {} : {}
|
|
|
|
},
|
2022-03-26 17:59:34 +01:00
|
|
|
chapters() {
|
|
|
|
return this.media.chapters || []
|
2022-05-11 00:03:41 +02:00
|
|
|
},
|
|
|
|
userCanUpdate() {
|
|
|
|
return this.$store.getters['user/getUserCanUpdate']
|
2021-09-08 16:15:54 +02:00
|
|
|
}
|
|
|
|
},
|
2022-03-17 18:25:12 +01:00
|
|
|
methods: {}
|
2021-09-08 16:15:54 +02:00
|
|
|
}
|
|
|
|
</script>
|