From 950d10091d7d9f278d7d979760d8633b72de9597 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 27 Nov 2022 13:44:54 -0600 Subject: [PATCH] Add playlists to bookshelf item context menu --- client/components/cards/LazyBookCard.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index 32c41224..f29617fe 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -410,6 +410,10 @@ export default { { func: 'toggleFinished', text: this.itemIsFinished ? this.$strings.MessageMarkAsNotFinished : this.$strings.MessageMarkAsFinished + }, + { + func: 'openPlaylists', + text: this.$strings.LabelAddToPlaylist } ] if (this.continueListeningShelf) { @@ -448,6 +452,10 @@ export default { text: this.$strings.LabelAddToCollection }) } + items.push({ + func: 'openPlaylists', + text: this.$strings.LabelAddToPlaylist + }) } if (this.userCanUpdate) { items.push({ @@ -739,6 +747,10 @@ export default { this.store.commit('setSelectedLibraryItem', this.libraryItem) this.store.commit('globals/setShowCollectionsModal', true) }, + openPlaylists() { + this.store.commit('globals/setSelectedPlaylistItems', [{ libraryItem: this.libraryItem, episode: this.recentEpisode }]) + this.store.commit('globals/setShowPlaylistsModal', true) + }, createMoreMenu() { if (!this.$refs.moreIcon) return