Searching now doesn't resets you to the ALL tab

This commit is contained in:
RemixDev 2020-05-10 13:26:32 +02:00
parent 2b8801d49a
commit a4f3f843e7
4 changed files with 42102 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -110,12 +110,12 @@ const MainSearch = new Vue({
handleMainSearch(result) { handleMainSearch(result) {
let resetObj = { data: [], next: 0, total: 0, loaded: false } let resetObj = { data: [], next: 0, total: 0, loaded: false }
this.results.allTab = result this.results.allTab = result
this.results.query = result.QUERY
this.results.trackTab = { ...resetObj } this.results.trackTab = { ...resetObj }
this.results.albumTab = { ...resetObj } this.results.albumTab = { ...resetObj }
this.results.artistTab = { ...resetObj } this.results.artistTab = { ...resetObj }
this.results.playlistTab = { ...resetObj } this.results.playlistTab = { ...resetObj }
document.getElementById('search_all_tab').click() if (this.results.query == '') document.getElementById('search_all_tab').click()
this.results.query = result.QUERY
document.getElementById('search_tab_content').style.display = 'block' document.getElementById('search_tab_content').style.display = 'block'
document.getElementById('main_search_tablink').click() document.getElementById('main_search_tablink').click()
}, },

View File

@ -42,7 +42,6 @@ function handleSearchBarKeyup(e) {
document.getElementById('search_tab_content').style.display = 'none' document.getElementById('search_tab_content').style.display = 'none'
socket.emit('mainSearch', { term: term }) socket.emit('mainSearch', { term: term })
} else { } else {
document.getElementById('search_all_tab').click()
document.getElementById('search_tab_content').style.display = 'block' document.getElementById('search_tab_content').style.display = 'block'
document.getElementById('main_search_tablink').click() document.getElementById('main_search_tablink').click()
} }