mirror of
https://github.com/owntone/owntone-server.git
synced 2025-07-20 14:01:17 -04:00
[web] Add index for radio stations
This commit is contained in:
parent
c38f35d3f9
commit
56c9408ef9
@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<content-with-heading>
|
<content-with-heading>
|
||||||
|
<template #options>
|
||||||
|
<list-index-buttons :indices="tracks.indices" />
|
||||||
|
</template>
|
||||||
<template #heading>
|
<template #heading>
|
||||||
<heading-title :content="heading" />
|
<heading-title :content="heading" />
|
||||||
</template>
|
</template>
|
||||||
@ -13,16 +16,24 @@
|
|||||||
import ContentWithHeading from '@/templates/ContentWithHeading.vue'
|
import ContentWithHeading from '@/templates/ContentWithHeading.vue'
|
||||||
import { GroupedList } from '@/lib/GroupedList'
|
import { GroupedList } from '@/lib/GroupedList'
|
||||||
import HeadingTitle from '@/components/HeadingTitle.vue'
|
import HeadingTitle from '@/components/HeadingTitle.vue'
|
||||||
|
import ListIndexButtons from '@/components/ListIndexButtons.vue'
|
||||||
import ListTracks from '@/components/ListTracks.vue'
|
import ListTracks from '@/components/ListTracks.vue'
|
||||||
import webapi from '@/webapi'
|
import webapi from '@/webapi'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageRadioStreams',
|
name: 'PageRadioStreams',
|
||||||
components: { ContentWithHeading, HeadingTitle, ListTracks },
|
components: {
|
||||||
|
ContentWithHeading,
|
||||||
|
HeadingTitle,
|
||||||
|
ListIndexButtons,
|
||||||
|
ListTracks
|
||||||
|
},
|
||||||
beforeRouteEnter(to, from, next) {
|
beforeRouteEnter(to, from, next) {
|
||||||
webapi.library_radio_streams().then((tracks) => {
|
webapi.library_radio_streams().then((tracks) => {
|
||||||
next((vm) => {
|
next((vm) => {
|
||||||
vm.tracks = new GroupedList(tracks)
|
vm.tracks = new GroupedList(tracks, {
|
||||||
|
index: { field: 'title_sort', type: String }
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user