From e1fd74caaf40ea714e9e908e0d25ea6de12a866e Mon Sep 17 00:00:00 2001 From: advplyr Date: Fri, 24 Sep 2021 16:14:33 -0500 Subject: [PATCH] Update chapters modal, search page, fix version check, ignore matching audio file paths on rescan --- client/components/app/BookShelf.vue | 20 +++++++-- client/components/app/BookShelfToolbar.vue | 49 +++++++++++++++------ client/components/cards/BookCard.vue | 2 +- client/components/controls/GlobalSearch.vue | 21 ++++++++- client/components/modals/ChaptersModal.vue | 27 ++++++++++-- client/components/ui/TextInput.vue | 5 ++- client/package.json | 2 +- client/pages/library/_id.vue | 37 ++++++++++++++-- client/plugins/version.js | 2 +- package.json | 2 +- server/Scanner.js | 7 ++- server/objects/Audiobook.js | 4 ++ 12 files changed, 146 insertions(+), 32 deletions(-) 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 @@