fix empty content recent page
This commit is contained in:
parent
00253d43ce
commit
8fed9b6c66
@ -13,26 +13,14 @@
|
|||||||
<EmptyContent
|
<EmptyContent
|
||||||
v-if="pageLoading"
|
v-if="pageLoading"
|
||||||
icon="icon-loading" />
|
icon="icon-loading" />
|
||||||
<template
|
|
||||||
v-if="tableData.length === 0 && !pageLoading">
|
|
||||||
<EmptyContent
|
|
||||||
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
|
<EmptyContent
|
||||||
v-if="tableData.length === 0 && !pageLoading"
|
v-if="tableData.length === 0 && !pageLoading"
|
||||||
v-show="$route.name==='SEARCH'"
|
:icon="emptyContentIcon">
|
||||||
icon="icon-search">
|
{{ emptyContentMessage }}
|
||||||
No search results
|
|
||||||
<template #desc>
|
<template #desc>
|
||||||
No stations were found matching your search term
|
{{ emptyContentDesc }}
|
||||||
</template>
|
</template>
|
||||||
</EmptyContent>
|
</EmptyContent>
|
||||||
</template>
|
|
||||||
</AppContent>
|
</AppContent>
|
||||||
<Sidebar
|
<Sidebar
|
||||||
:show-sidebar="showSidebar"
|
:show-sidebar="showSidebar"
|
||||||
@ -79,6 +67,36 @@ export default {
|
|||||||
player() {
|
player() {
|
||||||
return this.$store.state.player
|
return this.$store.state.player
|
||||||
},
|
},
|
||||||
|
emptyContentMessage() {
|
||||||
|
if (this.$route.name === 'FAVORITES') {
|
||||||
|
return 'No favorites yet'
|
||||||
|
} else if (this.$route.name === 'RECENT') {
|
||||||
|
return 'No recent stations yet'
|
||||||
|
} else if (this.$route.name === 'SEARCH') {
|
||||||
|
return 'No search results'
|
||||||
|
}
|
||||||
|
return 'No stations here'
|
||||||
|
},
|
||||||
|
emptyContentIcon() {
|
||||||
|
if (this.$route.name === 'FAVORITES') {
|
||||||
|
return 'icon-star'
|
||||||
|
} else if (this.$route.name === 'RECENT') {
|
||||||
|
return 'icon-recent'
|
||||||
|
} else if (this.$route.name === 'SEARCH') {
|
||||||
|
return 'icon-search'
|
||||||
|
}
|
||||||
|
return 'icon-radio'
|
||||||
|
},
|
||||||
|
emptyContentDesc() {
|
||||||
|
if (this.$route.name === 'FAVORITES') {
|
||||||
|
return 'Stations you mark as favorite will show up here'
|
||||||
|
} else if (this.$route.name === 'RECENT') {
|
||||||
|
return 'Stations you recently played will show up here'
|
||||||
|
} else if (this.$route.name === 'SEARCH') {
|
||||||
|
return 'No stations were found matching your search term'
|
||||||
|
}
|
||||||
|
return 'No stations here'
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route: 'onRoute',
|
$route: 'onRoute',
|
||||||
|
Loading…
Reference in New Issue
Block a user