2020-06-30 09:53:54 +02:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<content-with-heading>
|
|
|
|
<template slot="heading-left">
|
|
|
|
<p class="title is-4">Radio</p>
|
|
|
|
</template>
|
|
|
|
<template slot="content">
|
|
|
|
<p class="heading has-text-centered-mobile">{{ tracks.total }} tracks</p>
|
2020-10-04 17:31:47 +02:00
|
|
|
<list-tracks :tracks="tracks.items"></list-tracks>
|
2020-06-30 09:53:54 +02:00
|
|
|
</template>
|
|
|
|
</content-with-heading>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { LoadDataBeforeEnterMixin } from './mixin'
|
|
|
|
import ContentWithHeading from '@/templates/ContentWithHeading'
|
2020-10-04 17:31:47 +02:00
|
|
|
import ListTracks from '@/components/ListTracks'
|
2020-06-30 09:53:54 +02:00
|
|
|
import webapi from '@/webapi'
|
|
|
|
|
|
|
|
const streamsData = {
|
|
|
|
load: function (to) {
|
|
|
|
return webapi.library_radio_streams()
|
|
|
|
},
|
|
|
|
|
|
|
|
set: function (vm, response) {
|
|
|
|
vm.tracks = response.data.tracks
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'PageRadioStreams',
|
|
|
|
mixins: [LoadDataBeforeEnterMixin(streamsData)],
|
2020-10-04 17:31:47 +02:00
|
|
|
components: { ContentWithHeading, ListTracks },
|
2020-06-30 09:53:54 +02:00
|
|
|
|
|
|
|
data () {
|
|
|
|
return {
|
2020-10-04 17:31:47 +02:00
|
|
|
tracks: { items: [] }
|
2020-06-30 09:53:54 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
</style>
|