diff --git a/client/components/app/BookShelf.vue b/client/components/app/BookShelf.vue index 68ec5166..7c3c71f5 100644 --- a/client/components/app/BookShelf.vue +++ b/client/components/app/BookShelf.vue @@ -30,8 +30,10 @@
-
No {{ showGroups ? 'Series' : 'Audiobooks' }}
+

No Results

+
No {{ showGroups ? 'Series' : 'Audiobooks' }}
Clear Filter + Back to Library
@@ -41,7 +43,12 @@ export default { props: { page: String, - selectedSeries: String + selectedSeries: String, + searchResults: { + type: Array, + default: () => [] + }, + searchQuery: String }, data() { return { @@ -62,6 +69,11 @@ export default { this.$nextTick(() => { this.setBookshelfEntities() }) + }, + searchResults() { + this.$nextTick(() => { + this.setBookshelfEntities() + }) } }, computed: { @@ -96,11 +108,13 @@ export default { return this.$store.getters['user/getUserSetting']('filterBy') }, showGroups() { - return this.page !== '' && !this.selectedSeries + return this.page !== '' && this.page !== 'search' && !this.selectedSeries }, entities() { if (this.page === '') { return this.$store.getters['audiobooks/getFilteredAndSorted']() + } else if (this.page === 'search') { + return this.searchResults || [] } else { var seriesGroups = this.$store.getters['audiobooks/getSeriesGroups']() if (this.selectedSeries) { diff --git a/client/components/app/BookShelfToolbar.vue b/client/components/app/BookShelfToolbar.vue index acf90b1d..08475a67 100644 --- a/client/components/app/BookShelfToolbar.vue +++ b/client/components/app/BookShelfToolbar.vue @@ -1,21 +1,32 @@ @@ -24,7 +35,12 @@ export default { props: { page: String, - selectedSeries: String + selectedSeries: String, + searchResults: { + type: Array, + default: () => [] + }, + searchQuery: String }, data() { return { @@ -39,6 +55,8 @@ export default { numShowing() { if (this.page === '') { return this.$store.getters['audiobooks/getFiltered']().length + } else if (this.page === 'search') { + return (this.searchResults || []).length } else { var groups = this.$store.getters['audiobooks/getSeriesGroups']() if (this.selectedSeries) { @@ -65,6 +83,9 @@ export default { } }, methods: { + searchBackArrow() { + this.$router.replace('/library') + }, seriesBackArrow() { this.$router.replace('/library/series') this.$emit('update:selectedSeries', null) diff --git a/client/components/cards/BookCard.vue b/client/components/cards/BookCard.vue index 5a98d38b..1fd74a02 100644 --- a/client/components/cards/BookCard.vue +++ b/client/components/cards/BookCard.vue @@ -29,7 +29,7 @@ -
+
diff --git a/client/components/controls/GlobalSearch.vue b/client/components/controls/GlobalSearch.vue index 9513052a..58ceb275 100644 --- a/client/components/controls/GlobalSearch.vue +++ b/client/components/controls/GlobalSearch.vue @@ -1,6 +1,8 @@