mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-01 18:21:31 -04:00
[web] Remove blanks in the search query before launching a search
This commit is contained in:
parent
6a93172cb9
commit
5ce78d041d
@ -177,6 +177,7 @@ export default {
|
|||||||
this.search_types = SEARCH_TYPES
|
this.search_types = SEARCH_TYPES
|
||||||
this.search_limit = PAGE_SIZE
|
this.search_limit = PAGE_SIZE
|
||||||
}
|
}
|
||||||
|
this.search_query = this.search_query.trim()
|
||||||
if (!this.search_query || !this.search_query.replace(/^query:/u, '')) {
|
if (!this.search_query || !this.search_query.replace(/^query:/u, '')) {
|
||||||
this.$refs.search_field.focus()
|
this.$refs.search_field.focus()
|
||||||
return
|
return
|
||||||
|
@ -144,7 +144,6 @@ export default {
|
|||||||
this.search_types = [type]
|
this.search_types = [type]
|
||||||
this.search_parameters.limit = PAGE_SIZE_EXPANDED
|
this.search_parameters.limit = PAGE_SIZE_EXPANDED
|
||||||
this.search_parameters.offset = 0
|
this.search_parameters.offset = 0
|
||||||
|
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
open_search(query) {
|
open_search(query) {
|
||||||
@ -168,6 +167,7 @@ export default {
|
|||||||
this.search_types = SEARCH_TYPES
|
this.search_types = SEARCH_TYPES
|
||||||
this.search_parameters.limit = PAGE_SIZE
|
this.search_parameters.limit = PAGE_SIZE
|
||||||
}
|
}
|
||||||
|
this.search_query = this.search_query.trim()
|
||||||
if (!this.search_query) {
|
if (!this.search_query) {
|
||||||
this.$refs.search_field.focus()
|
this.$refs.search_field.focus()
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user