diff --git a/components/cards/LazyBookCard.vue b/components/cards/LazyBookCard.vue index 93141c14..899d80f2 100644 --- a/components/cards/LazyBookCard.vue +++ b/components/cards/LazyBookCard.vue @@ -319,9 +319,6 @@ export default { userIsRoot() { return this.store.getters['user/getIsRoot'] }, - _socket() { - return this.$root.socket || this.$nuxt.$root.socket - }, titleFontSize() { return 0.75 * this.sizeMultiplier }, diff --git a/components/cards/LazyListBookCard.vue b/components/cards/LazyListBookCard.vue index a7b84563..192930df 100644 --- a/components/cards/LazyListBookCard.vue +++ b/components/cards/LazyListBookCard.vue @@ -278,9 +278,6 @@ export default { userIsRoot() { return this.store.getters['user/getIsRoot'] }, - _socket() { - return this.$root.socket || this.$nuxt.$root.socket - }, titleFontSize() { return 0.75 * this.sizeMultiplier }, diff --git a/components/home/BookshelfNavBar.vue b/components/home/BookshelfNavBar.vue index 4ae1f518..7036499d 100644 --- a/components/home/BookshelfNavBar.vue +++ b/components/home/BookshelfNavBar.vue @@ -22,9 +22,13 @@ export default { currentLibraryIcon() { return this.currentLibrary ? this.currentLibrary.icon : 'database' }, + userHasPlaylists() { + return this.$store.state.libraries.numUserPlaylists + }, items() { + let items = [] if (this.isPodcast) { - return [ + items = [ { to: '/bookshelf', routeName: 'bookshelf', @@ -50,56 +54,62 @@ export default { text: 'Library' } ] + } else { + items = [ + { + to: '/bookshelf', + routeName: 'bookshelf', + iconPack: 'abs-icons', + icon: 'home', + iconClass: 'text-xl', + text: 'Home' + }, + { + to: '/bookshelf/library', + routeName: 'bookshelf-library', + iconPack: 'abs-icons', + icon: this.currentLibraryIcon, + iconClass: 'text-lg', + text: 'Library' + }, + { + to: '/bookshelf/series', + routeName: 'bookshelf-series', + iconPack: 'abs-icons', + icon: 'columns', + iconClass: 'text-lg pt-px', + text: 'Series' + }, + { + to: '/bookshelf/collections', + routeName: 'bookshelf-collections', + iconPack: 'material-icons-outlined', + icon: 'collections_bookmark', + iconClass: 'text-xl', + text: 'Collections' + } + // { + // to: '/bookshelf/authors', + // routeName: 'bookshelf-authors', + // iconPack: 'abs-icons', + // icon: 'authors', + // iconClass: 'text-2xl pb-px', + // text: 'Authors' + // } + ] } - return [ - { - to: '/bookshelf', - routeName: 'bookshelf', - iconPack: 'abs-icons', - icon: 'home', - iconClass: 'text-xl', - text: 'Home' - }, - { - to: '/bookshelf/library', - routeName: 'bookshelf-library', - iconPack: 'abs-icons', - icon: this.currentLibraryIcon, - iconClass: 'text-lg', - text: 'Library' - }, - { - to: '/bookshelf/series', - routeName: 'bookshelf-series', - iconPack: 'abs-icons', - icon: 'columns', - iconClass: 'text-lg pt-px', - text: 'Series' - }, - { - to: '/bookshelf/collections', - routeName: 'bookshelf-collections', - iconPack: 'material-icons-outlined', - icon: 'collections_bookmark', - iconClass: 'text-xl', - text: 'Collections' - }, - // { - // to: '/bookshelf/authors', - // routeName: 'bookshelf-authors', - // iconPack: 'abs-icons', - // icon: 'authors', - // iconClass: 'text-2xl pb-px', - // text: 'Authors' - // }, - { + + if (this.userHasPlaylists) { + items.push({ to: '/bookshelf/playlists', routeName: 'bookshelf-playlists', iconPack: 'material-icons', icon: 'queue_music', text: 'Playlists' - } - ] + }) + } + + return items }, routeName() { return this.$route.name diff --git a/components/modals/playlists/AddCreateModal.vue b/components/modals/playlists/AddCreateModal.vue new file mode 100644 index 00000000..33abb375 --- /dev/null +++ b/components/modals/playlists/AddCreateModal.vue @@ -0,0 +1,225 @@ + + + diff --git a/components/modals/playlists/PlaylistRow.vue b/components/modals/playlists/PlaylistRow.vue new file mode 100644 index 00000000..8ab8c12c --- /dev/null +++ b/components/modals/playlists/PlaylistRow.vue @@ -0,0 +1,42 @@ + + + \ No newline at end of file diff --git a/components/tables/podcast/EpisodeRow.vue b/components/tables/podcast/EpisodeRow.vue index 673613f2..5bc3fee7 100644 --- a/components/tables/podcast/EpisodeRow.vue +++ b/components/tables/podcast/EpisodeRow.vue @@ -26,6 +26,10 @@ + +
audio_file {{ downloadItem ? 'downloading' : 'download' }} @@ -134,6 +138,9 @@ export default { } }, methods: { + addToPlaylist() { + this.$emit('addToPlaylist', this.episode) + }, async selectFolder() { var folderObj = await AbsFileSystem.selectFolder({ mediaType: this.mediaType }) if (folderObj.error) { diff --git a/components/tables/podcast/EpisodesTable.vue b/components/tables/podcast/EpisodesTable.vue index 69d46814..76b6bcb9 100644 --- a/components/tables/podcast/EpisodesTable.vue +++ b/components/tables/podcast/EpisodesTable.vue @@ -15,7 +15,7 @@