added loading placeholder when searching; added loading placeholder when changing tabs in search tab
This commit is contained in:
@@ -61,8 +61,6 @@ const FavoritesTab = new Vue({
|
||||
this.artists = artists
|
||||
this.playlists = playlists
|
||||
|
||||
console.log('update ok')
|
||||
|
||||
// Removing animation class only when the animation has completed an iteration
|
||||
// Prevents animation ugly stutter
|
||||
this.$refs.reloadButton.addEventListener(
|
||||
|
||||
@@ -131,6 +131,10 @@ const MainSearch = new Vue({
|
||||
}
|
||||
},
|
||||
handleMainSearch(result) {
|
||||
// Hiding loading placeholder
|
||||
document.getElementById('content').style.display = ''
|
||||
document.getElementById('search_placeholder').classList.toggle('loading_placeholder--hidden')
|
||||
|
||||
let resetObj = { data: [], next: 0, total: 0, loaded: false }
|
||||
|
||||
this.results.allTab = result
|
||||
|
||||
@@ -46,6 +46,10 @@ function handleSearchBarKeyup(e) {
|
||||
if (term !== MainSearch.results.query || main_selected == 'search_tab') {
|
||||
document.getElementById('search_tab_content').style.display = 'none'
|
||||
socket.emit('mainSearch', { term })
|
||||
|
||||
// Showing loading placeholder
|
||||
document.getElementById('content').style.display = 'none'
|
||||
document.getElementById('search_placeholder').classList.toggle('loading_placeholder--hidden')
|
||||
} else {
|
||||
document.getElementById('search_tab_content').style.display = 'block'
|
||||
document.getElementById('main_search_tablink').click()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export const socket = io.connect(window.location.href)
|
||||
|
||||
socket.on('connect', () => {
|
||||
document.getElementById('loading_overlay').classList.remove('active')
|
||||
document.getElementById('start_app_placeholder').classList.add('loading_placeholder--hidden')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user