show empty pages
This commit is contained in:
parent
7319726fb5
commit
6853e83a7f
@ -3,14 +3,16 @@
|
|||||||
<Navigation
|
<Navigation
|
||||||
:station-data="tableData" />
|
:station-data="tableData" />
|
||||||
<AppContent>
|
<AppContent>
|
||||||
<Breadcrumbs class="breadcrumbs">
|
<Breadcrumbs
|
||||||
|
v-if="tableData.length > 0"
|
||||||
|
class="breadcrumbs">
|
||||||
<Breadcrumb title="Home" href="/" />
|
<Breadcrumb title="Home" href="/" />
|
||||||
<Breadcrumb
|
<Breadcrumb
|
||||||
:title="t('radio', 'Top')"
|
:title="t('radio', 'Top')"
|
||||||
href="/Top" />
|
href="/Top" />
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<Table
|
<Table
|
||||||
v-if="!pageLoading"
|
v-if="!pageLoading && tableData.length > 0"
|
||||||
:station-data="tableData"
|
:station-data="tableData"
|
||||||
:favorites="favorites"
|
:favorites="favorites"
|
||||||
@doPlay="doPlay"
|
@doPlay="doPlay"
|
||||||
@ -18,6 +20,24 @@
|
|||||||
<EmptyContent
|
<EmptyContent
|
||||||
v-if="pageLoading"
|
v-if="pageLoading"
|
||||||
icon="icon-loading" />
|
icon="icon-loading" />
|
||||||
|
<EmptyContent
|
||||||
|
v-if="tableData.length === 0 && !pageLoading"
|
||||||
|
v-show="$route.name==='FAVORITES'"
|
||||||
|
icon="icon-star">
|
||||||
|
No favorites yet
|
||||||
|
<template #desc>
|
||||||
|
Stations you mark as favorite will show up here
|
||||||
|
</template>
|
||||||
|
</EmptyContent>
|
||||||
|
<EmptyContent
|
||||||
|
v-if="tableData.length === 0 && !pageLoading"
|
||||||
|
v-show="$route.name==='SEARCH'"
|
||||||
|
icon="icon-search">
|
||||||
|
No search results
|
||||||
|
<template #desc>
|
||||||
|
No stations were found matching your search term
|
||||||
|
</template>
|
||||||
|
</EmptyContent>
|
||||||
</AppContent>
|
</AppContent>
|
||||||
</Content>
|
</Content>
|
||||||
</template>
|
</template>
|
||||||
@ -182,10 +202,20 @@ export default {
|
|||||||
let queryURI = queryBase
|
let queryURI = queryBase
|
||||||
let sortBy = 'clickcount'
|
let sortBy = 'clickcount'
|
||||||
|
|
||||||
|
// Inital page loading
|
||||||
if (vm.offset === 0) {
|
if (vm.offset === 0) {
|
||||||
vm.pageLoading = true
|
vm.pageLoading = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skip loading more stations on certain sites
|
||||||
|
if (vm.offset > 0
|
||||||
|
&& (vm.$route.name === 'FAVORITES'
|
||||||
|
|| vm.$route.name === 'RECENT')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(vm.$route.name)
|
||||||
|
|
||||||
if (menuState === 'TOP') {
|
if (menuState === 'TOP') {
|
||||||
sortBy = 'clickcount'
|
sortBy = 'clickcount'
|
||||||
} else if (menuState === 'NEW') {
|
} else if (menuState === 'NEW') {
|
||||||
|
Loading…
Reference in New Issue
Block a user