2020-06-29 16:49:33 +00:00
|
|
|
<template>
|
2020-07-06 19:55:28 +00:00
|
|
|
<section id="content" @scroll="handleContentScroll" ref="content">
|
2020-06-29 16:49:33 +00:00
|
|
|
<div id="container">
|
|
|
|
<ArtistTab />
|
|
|
|
<TheChartsTab />
|
|
|
|
<TheFavoritesTab />
|
|
|
|
<TheErrorsTab />
|
|
|
|
<TheHomeTab />
|
|
|
|
<TheLinkAnalyzerTab />
|
|
|
|
<TheAboutTab />
|
|
|
|
<TheSettingsTab />
|
2020-07-06 19:55:28 +00:00
|
|
|
<TheMainSearch :scrolled-search-type="newScrolled" />
|
2020-06-29 16:49:33 +00:00
|
|
|
<TracklistTab />
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import ArtistTab from '@components/ArtistTab.vue'
|
|
|
|
import TracklistTab from '@components/TracklistTab.vue'
|
|
|
|
|
|
|
|
import TheChartsTab from '@components/TheChartsTab.vue'
|
|
|
|
import TheFavoritesTab from '@components/TheFavoritesTab.vue'
|
|
|
|
import TheErrorsTab from '@components/TheErrorsTab.vue'
|
|
|
|
import TheHomeTab from '@components/TheHomeTab.vue'
|
|
|
|
import TheLinkAnalyzerTab from '@components/TheLinkAnalyzerTab.vue'
|
|
|
|
import TheAboutTab from '@components/TheAboutTab.vue'
|
|
|
|
import TheSettingsTab from '@components/TheSettingsTab.vue'
|
|
|
|
import TheMainSearch from '@components/TheMainSearch.vue'
|
|
|
|
|
2020-07-06 19:55:28 +00:00
|
|
|
import { debounce } from '@/js/utils.js'
|
|
|
|
import EventBus from '@/js/EventBus.js'
|
|
|
|
|
2020-06-29 16:49:33 +00:00
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
ArtistTab,
|
|
|
|
TheChartsTab,
|
|
|
|
TheFavoritesTab,
|
|
|
|
TheErrorsTab,
|
|
|
|
TheHomeTab,
|
|
|
|
TheLinkAnalyzerTab,
|
|
|
|
TheAboutTab,
|
|
|
|
TheSettingsTab,
|
|
|
|
TheMainSearch,
|
|
|
|
TracklistTab
|
2020-07-06 19:55:28 +00:00
|
|
|
},
|
|
|
|
data: () => ({
|
|
|
|
newScrolled: null
|
|
|
|
}),
|
|
|
|
methods: {
|
|
|
|
handleContentScroll: debounce(async function() {
|
|
|
|
if (this.$refs.content.scrollTop + this.$refs.content.clientHeight < this.$refs.content.scrollHeight) return
|
|
|
|
|
|
|
|
if (
|
|
|
|
main_selected !== 'search_tab' ||
|
2020-07-14 20:27:48 +00:00
|
|
|
['track_search', 'album_search', 'artist_search', 'playlist_search'].indexOf(window.search_selected) === -1
|
2020-07-06 19:55:28 +00:00
|
|
|
) {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2020-07-14 20:27:48 +00:00
|
|
|
this.newScrolled = window.search_selected.split('_')[0]
|
2020-07-06 19:55:28 +00:00
|
|
|
|
|
|
|
await this.$nextTick()
|
|
|
|
|
|
|
|
this.newScrolled = null
|
|
|
|
}, 100)
|
2020-06-29 16:49:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
</style>
|