From 416aa3bd60629313b45af69a67e2c6eeb393c46f Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 13 Nov 2021 16:06:32 -0600 Subject: [PATCH] Add: collections no longer experimental & add collections in book card more menu --- client/components/app/SideRail.vue | 2 +- client/components/cards/BookCard.vue | 9 ++++++++- client/components/modals/UserCollectionsModal.vue | 9 +++++++++ client/pages/audiobook/_id/index.vue | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/client/components/app/SideRail.vue b/client/components/app/SideRail.vue index ce2c724c..6e3f6afe 100644 --- a/client/components/app/SideRail.vue +++ b/client/components/app/SideRail.vue @@ -31,7 +31,7 @@
- + diff --git a/client/components/cards/BookCard.vue b/client/components/cards/BookCard.vue index 80b56616..4209524f 100644 --- a/client/components/cards/BookCard.vue +++ b/client/components/cards/BookCard.vue @@ -243,6 +243,10 @@ export default { { func: 'toggleRead', text: `Mark as ${this.userIsRead ? 'Not Read' : 'Read'}` + }, + { + func: 'openCollections', + text: 'Add to Collection' } ] if (this.userCanUpdate) { @@ -252,7 +256,6 @@ export default { text: 'Tracks' }) } - items.push({ func: 'showEditModalMatch', text: 'Match' @@ -347,6 +350,10 @@ export default { // More menu func this.$store.commit('showEditModalOnTab', { audiobook: this.audiobook, tab: 'download' }) }, + openCollections() { + this.$store.commit('setSelectedAudiobook', this.audiobook) + this.$store.commit('globals/setShowUserCollectionsModal', true) + }, createMoreMenu() { if (!this.$refs.moreIcon) return diff --git a/client/components/modals/UserCollectionsModal.vue b/client/components/modals/UserCollectionsModal.vue index 121401e1..53e208e2 100644 --- a/client/components/modals/UserCollectionsModal.vue +++ b/client/components/modals/UserCollectionsModal.vue @@ -1,5 +1,11 @@