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