[web-src] Start implementing audiobooks authors page

This commit is contained in:
chme
2020-07-01 07:29:03 +02:00
parent 1258427afc
commit 9c4c25f507
6 changed files with 62 additions and 19 deletions

View File

@@ -47,7 +47,7 @@ import * as types from '@/store/mutation_types'
const artistsData = {
load: function (to) {
return webapi.library_artists()
return webapi.library_artists('music')
},
set: function (vm, response) {

View File

@@ -1,5 +1,7 @@
<template>
<div>
<tabs-audiobooks></tabs-audiobooks>
<content-with-heading>
<template slot="heading-left">
<p class="title is-4">Audiobooks</p>
@@ -21,6 +23,7 @@
<script>
import { LoadDataBeforeEnterMixin } from './mixin'
import TabsAudiobooks from '@/components/TabsAudiobooks'
import ContentWithHeading from '@/templates/ContentWithHeading'
import ListItemAlbum from '@/components/ListItemAlbum'
import ModalDialogAlbum from '@/components/ModalDialogAlbum'
@@ -39,7 +42,7 @@ const albumsData = {
export default {
name: 'PageAudiobooks',
mixins: [LoadDataBeforeEnterMixin(albumsData)],
components: { ContentWithHeading, ListItemAlbum, ModalDialogAlbum },
components: { TabsAudiobooks, ContentWithHeading, ListItemAlbum, ModalDialogAlbum },
data () {
return {

View File

@@ -1,22 +1,16 @@
<template>
<div>
<tabs-music></tabs-music>
<tabs-audiobooks></tabs-audiobooks>
<content-with-heading>
<template slot="options">
<index-button-list :index="index_list"></index-button-list>
</template>
<template slot="heading-left">
<p class="title is-4">Artists</p>
<p class="heading">{{ artists.total }} artists</p>
<p class="title is-4">Authors</p>
<p class="heading">{{ artists.total }} authors</p>
</template>
<template slot="heading-right">
<a class="button is-small" :class="{ 'is-info': hide_singles }" @click="update_hide_singles">
<span class="icon">
<i class="mdi mdi-numeric-1-box-multiple-outline"></i>
</span>
<span>Hide singles</span>
</a>
</template>
<template slot="content">
<list-item-artist v-for="artist in artists_filtered"
@@ -38,7 +32,7 @@
<script>
import { LoadDataBeforeEnterMixin } from './mixin'
import ContentWithHeading from '@/templates/ContentWithHeading'
import TabsMusic from '@/components/TabsMusic'
import TabsAudiobooks from '@/components/TabsAudiobooks'
import IndexButtonList from '@/components/IndexButtonList'
import ListItemArtist from '@/components/ListItemArtist'
import ModalDialogArtist from '@/components/ModalDialogArtist'
@@ -47,7 +41,7 @@ import * as types from '@/store/mutation_types'
const artistsData = {
load: function (to) {
return webapi.library_artists()
return webapi.library_artists('audiobook')
},
set: function (vm, response) {
@@ -56,9 +50,9 @@ const artistsData = {
}
export default {
name: 'PageArtists',
name: 'PageAudiobooksArtists',
mixins: [LoadDataBeforeEnterMixin(artistsData)],
components: { ContentWithHeading, TabsMusic, IndexButtonList, ListItemArtist, ModalDialogArtist },
components: { ContentWithHeading, TabsAudiobooks, IndexButtonList, ListItemArtist, ModalDialogArtist },
data () {
return {