2020-06-30 10:24:11 +02:00
|
|
|
<template>
|
|
|
|
<div>
|
2020-07-01 07:29:03 +02:00
|
|
|
<tabs-audiobooks></tabs-audiobooks>
|
2020-06-30 10:24:11 +02:00
|
|
|
|
|
|
|
<content-with-heading>
|
|
|
|
<template slot="options">
|
|
|
|
<index-button-list :index="index_list"></index-button-list>
|
|
|
|
</template>
|
|
|
|
<template slot="heading-left">
|
2020-07-01 07:29:03 +02:00
|
|
|
<p class="title is-4">Authors</p>
|
|
|
|
<p class="heading">{{ artists.total }} authors</p>
|
2020-06-30 10:24:11 +02:00
|
|
|
</template>
|
|
|
|
<template slot="heading-right">
|
|
|
|
</template>
|
|
|
|
<template slot="content">
|
2020-09-20 08:13:19 +02:00
|
|
|
<list-artists :artists="artists.items"></list-artists>
|
2020-06-30 10:24:11 +02:00
|
|
|
</template>
|
|
|
|
</content-with-heading>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { LoadDataBeforeEnterMixin } from './mixin'
|
|
|
|
import ContentWithHeading from '@/templates/ContentWithHeading'
|
2020-07-01 07:29:03 +02:00
|
|
|
import TabsAudiobooks from '@/components/TabsAudiobooks'
|
2020-06-30 10:24:11 +02:00
|
|
|
import IndexButtonList from '@/components/IndexButtonList'
|
2020-09-20 08:13:19 +02:00
|
|
|
import ListArtists from '@/components/ListArtists'
|
2020-06-30 10:24:11 +02:00
|
|
|
import webapi from '@/webapi'
|
|
|
|
|
|
|
|
const artistsData = {
|
|
|
|
load: function (to) {
|
2020-07-01 07:29:03 +02:00
|
|
|
return webapi.library_artists('audiobook')
|
2020-06-30 10:24:11 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
set: function (vm, response) {
|
|
|
|
vm.artists = response.data
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
2020-07-01 07:29:03 +02:00
|
|
|
name: 'PageAudiobooksArtists',
|
2020-06-30 10:24:11 +02:00
|
|
|
mixins: [LoadDataBeforeEnterMixin(artistsData)],
|
2020-09-20 08:13:19 +02:00
|
|
|
components: { ContentWithHeading, TabsAudiobooks, IndexButtonList, ListArtists },
|
2020-06-30 10:24:11 +02:00
|
|
|
|
|
|
|
data () {
|
|
|
|
return {
|
2020-09-20 08:13:19 +02:00
|
|
|
artists: { items: [] }
|
2020-06-30 10:24:11 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
index_list () {
|
|
|
|
return [...new Set(this.artists.items
|
|
|
|
.map(artist => artist.name_sort.charAt(0).toUpperCase()))]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
</style>
|