2018-08-11 01:47:10 -04:00
|
|
|
<template>
|
|
|
|
<div>
|
2020-07-01 01:29:03 -04:00
|
|
|
<tabs-audiobooks></tabs-audiobooks>
|
|
|
|
|
2018-08-11 01:47:10 -04:00
|
|
|
<content-with-heading>
|
|
|
|
<template slot="heading-left">
|
|
|
|
<p class="title is-4">Audiobooks</p>
|
|
|
|
<p class="heading">{{ albums.total }} audiobooks</p>
|
|
|
|
</template>
|
|
|
|
<template slot="content">
|
2020-09-20 02:13:19 -04:00
|
|
|
<list-albums :albums="albums.items"></list-albums>
|
2018-08-11 01:47:10 -04:00
|
|
|
</template>
|
|
|
|
</content-with-heading>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { LoadDataBeforeEnterMixin } from './mixin'
|
2020-07-01 01:29:03 -04:00
|
|
|
import TabsAudiobooks from '@/components/TabsAudiobooks'
|
2018-08-11 01:47:10 -04:00
|
|
|
import ContentWithHeading from '@/templates/ContentWithHeading'
|
2020-09-20 02:13:19 -04:00
|
|
|
import ListAlbums from '@/components/ListAlbums'
|
2018-08-11 01:47:10 -04:00
|
|
|
import webapi from '@/webapi'
|
|
|
|
|
|
|
|
const albumsData = {
|
|
|
|
load: function (to) {
|
2020-06-30 04:24:11 -04:00
|
|
|
return webapi.library_albums('audiobook')
|
2018-08-11 01:47:10 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
set: function (vm, response) {
|
|
|
|
vm.albums = response.data
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
2020-09-20 02:15:46 -04:00
|
|
|
name: 'PageAudiobooksAlbums',
|
2020-04-11 13:43:53 -04:00
|
|
|
mixins: [LoadDataBeforeEnterMixin(albumsData)],
|
2020-09-20 02:13:19 -04:00
|
|
|
components: { TabsAudiobooks, ContentWithHeading, ListAlbums },
|
2018-08-11 01:47:10 -04:00
|
|
|
|
|
|
|
data () {
|
|
|
|
return {
|
2020-09-20 02:13:19 -04:00
|
|
|
albums: { items: [] }
|
2018-12-15 03:56:09 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
2018-08-11 01:47:10 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
</style>
|