diff --git a/components/modals/ItemDetailsModal.vue b/components/modals/ItemDetailsModal.vue new file mode 100644 index 00000000..fa471ceb --- /dev/null +++ b/components/modals/ItemDetailsModal.vue @@ -0,0 +1,52 @@ + + + diff --git a/pages/item/_id.vue b/pages/item/_id.vue index af088da7..943edcf6 100644 --- a/pages/item/_id.vue +++ b/pages/item/_id.vue @@ -1,59 +1,81 @@ @@ -110,7 +136,9 @@ export default { return { resettingProgress: false, isProcessingReadUpdate: false, - showSelectLocalFolder: false + showSelectLocalFolder: false, + showMoreMenu: false, + showDetailsModal: false } }, computed: { @@ -173,6 +201,10 @@ export default { if (this.isPodcast) return this.mediaMetadata.author return this.mediaMetadata.authorName }, + narratorName() { + if (this.isPodcast) return null + return this.mediaMetadata.narratorName + }, description() { return this.mediaMetadata.description || '' }, @@ -226,6 +258,10 @@ export default { if (!this.media.tracks) return 0 return this.media.tracks.length || 0 }, + numChapters() { + if (!this.media.chapters) return 0 + return this.media.chapters.length || 0 + }, isMissing() { return this.libraryItem.isMissing }, @@ -257,9 +293,41 @@ export default { }, isCasting() { return this.$store.state.isCasting + }, + moreMenuItems() { + if (this.isLocal) { + return [ + { + text: 'Manage Local Files', + value: 'manageLocal' + }, + { + text: 'View Details', + value: 'details' + } + ] + } else { + return [ + { + text: 'View Details', + value: 'details' + } + ] + } } }, methods: { + moreMenuAction(action) { + this.showMoreMenu = false + if (action === 'manageLocal') { + this.$router.push(`/localMedia/item/${this.libraryItemId}`) + } else if (action === 'details') { + this.showDetailsModal = true + } + }, + moreButtonPress() { + this.showMoreMenu = true + }, readBook() { this.$store.commit('openReader', this.libraryItem) }, @@ -446,4 +514,11 @@ export default { this.$socket.off('item_updated', this.itemUpdated) } } - \ No newline at end of file + + + \ No newline at end of file