Commit 8fed9b6c authored by onny's avatar onny

fix empty content recent page

parent 00253d43
Pipeline #212 failed with stages
in 11 minutes and 41 seconds
......@@ -13,26 +13,14 @@
<EmptyContent
v-if="pageLoading"
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
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>
</template>
<EmptyContent
v-if="tableData.length === 0 && !pageLoading"
:icon="emptyContentIcon">
{{ emptyContentMessage }}
<template #desc>
{{ emptyContentDesc }}
</template>
</EmptyContent>
</AppContent>
<Sidebar
:show-sidebar="showSidebar"
......@@ -79,6 +67,36 @@ export default {
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: {
$route: 'onRoute',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment