mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Merge pull request #464 from selfhost-alt/include-filter-name-in-ui
Include the type of filter being applied in the UI
This commit is contained in:
		
						commit
						6a43672973
					
				| @ -91,7 +91,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}"` | ||||
|       if (this.hasFilter) return `No Results for filter "${this.filterName}: ${this.filterValue}"` | ||||
|       return 'No results' | ||||
|     }, | ||||
|     entityName() { | ||||
|  | ||||
| @ -161,23 +161,29 @@ export default { | ||||
|     selectedText() { | ||||
|       if (!this.selected) return '' | ||||
|       var parts = this.selected.split('.') | ||||
|       var filterName = this.selectItems.find((i) => i.value === parts[0]); | ||||
|       var filterValue = null; | ||||
|       if (parts.length > 1) { | ||||
|         var decoded = this.$decode(parts[1]) | ||||
|         if (decoded.startsWith('aut_')) { | ||||
|           var author = this.authors.find((au) => au.id == decoded) | ||||
|           if (author) return author.name | ||||
|           return '' | ||||
|         } | ||||
|         if (decoded.startsWith('ser_')) { | ||||
|           if (author) filterValue = author.name; | ||||
|         } else if (decoded.startsWith('ser_')) { | ||||
|           var series = this.series.find((se) => se.id == decoded) | ||||
|           if (series) return series.name | ||||
|           return '' | ||||
|           if (series) filterValue = series.name | ||||
|         } else { | ||||
|           filterValue = decoded; | ||||
|         } | ||||
|         return decoded | ||||
|       } | ||||
|       var _sel = this.selectItems.find((i) => i.value === this.selected) | ||||
|       if (!_sel) return '' | ||||
|       return _sel.text | ||||
|       if (filterName && filterValue) { | ||||
|         return `${filterName.text}: ${filterValue}`; | ||||
|       } else if (filterName) { | ||||
|         return filterName.text; | ||||
|       } else if (filterValue) { | ||||
|         return filterValue; | ||||
|       } else { | ||||
|         return '' | ||||
|       } | ||||
|     }, | ||||
|     genres() { | ||||
|       return this.filterData.genres || [] | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user