mirror of
https://github.com/owntone/owntone-server.git
synced 2025-07-16 04:11:55 -04:00
44 lines
1.0 KiB
Vue
44 lines
1.0 KiB
Vue
<template>
|
|
<content-with-heading>
|
|
<template #heading>
|
|
<heading-title :content="heading" />
|
|
</template>
|
|
<template #content>
|
|
<list-tracks :items="tracks" />
|
|
</template>
|
|
</content-with-heading>
|
|
</template>
|
|
|
|
<script>
|
|
import ContentWithHeading from '@/templates/ContentWithHeading.vue'
|
|
import { GroupedList } from '@/lib/GroupedList'
|
|
import HeadingTitle from '@/components/HeadingTitle.vue'
|
|
import ListTracks from '@/components/ListTracks.vue'
|
|
import webapi from '@/webapi'
|
|
|
|
export default {
|
|
name: 'PageRadioStreams',
|
|
components: { ContentWithHeading, HeadingTitle, ListTracks },
|
|
beforeRouteEnter(to, from, next) {
|
|
webapi.library_radio_streams().then((radios) => {
|
|
next((vm) => {
|
|
vm.tracks = new GroupedList(radios.data.tracks)
|
|
})
|
|
})
|
|
},
|
|
data() {
|
|
return {
|
|
tracks: new GroupedList()
|
|
}
|
|
},
|
|
computed: {
|
|
heading() {
|
|
return {
|
|
subtitle: [{ count: this.tracks.total, key: 'count.stations' }],
|
|
title: this.$t('page.radio.title')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|