diff --git a/client/components/app/LazyBookshelf.vue b/client/components/app/LazyBookshelf.vue index 3c036ece..085a8074 100644 --- a/client/components/app/LazyBookshelf.vue +++ b/client/components/app/LazyBookshelf.vue @@ -18,6 +18,9 @@

{{ emptyMessage }}

+
+ Clear Filter +
@@ -86,6 +89,7 @@ export default { emptyMessage() { if (this.page === 'series') return `You have no series` if (this.page === 'collections') return "You haven't made any collections yet" + if (this.hasFilter) return `No Results for filter "${this.filterValue}"` return 'No results' }, entityName() { @@ -120,6 +124,17 @@ export default { hasFilter() { return this.filterBy && this.filterBy !== 'all' }, + filterName() { + if (!this.filterBy) return '' + var filter = this.filterBy.split('.')[0] + filter = filter.substr(0, 1).toUpperCase() + filter.substr(1) + return filter + }, + filterValue() { + if (!this.filterBy) return '' + if (!this.filterBy.includes('.')) return '' + return this.$decode(this.filterBy.split('.')[1]) + }, currentLibraryId() { return this.$store.state.libraries.currentLibraryId }, @@ -175,6 +190,9 @@ export default { showBookshelfTextureModal() { this.$store.commit('globals/setShowBookshelfTextureModal', true) }, + clearFilter() { + this.$store.dispatch('user/updateUserSettings', { filterBy: 'all' }) + }, editEntity(entity) { if (this.entityName === 'books' || this.entityName === 'series-books') { var bookIds = this.entities.map((e) => e.id) diff --git a/client/components/cards/AudiobookSearchCard.vue b/client/components/cards/AudiobookSearchCard.vue index 159f02b0..13fa980e 100644 --- a/client/components/cards/AudiobookSearchCard.vue +++ b/client/components/cards/AudiobookSearchCard.vue @@ -10,7 +10,7 @@

by {{ authorFL }}

-

+
@@ -71,6 +71,7 @@ export default { if (this.matchKey === 'tags') return `

Tags: ${html}

` if (this.matchKey === 'authorFL') return `by ${html}` if (this.matchKey === 'isbn') return `

ISBN: ${html}

` + if (this.matchKey === 'asin') return `

ASIN: ${html}

` if (this.matchKey === 'series') return `

Series: ${html}

` return `${html}` } diff --git a/client/components/controls/FilterSelect.vue b/client/components/controls/FilterSelect.vue index 6d7d3b08..e466788f 100644 --- a/client/components/controls/FilterSelect.vue +++ b/client/components/controls/FilterSelect.vue @@ -14,7 +14,7 @@ -
+