mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-08 05:23:25 -05:00
382036687a
This should improve performance of long album lists.
68 lines
1.8 KiB
Vue
68 lines
1.8 KiB
Vue
<template>
|
|
<div>
|
|
<content-with-heading>
|
|
<template slot="heading-left">
|
|
<p class="title is-4">Podcasts</p>
|
|
<p class="heading">{{ albums.total }} podcasts</p>
|
|
</template>
|
|
<template slot="content">
|
|
<list-item-album v-for="album in albums.items" :key="album.id" :album="album" :media_kind="'podcast'" @click="open_album(album)">
|
|
<template slot="actions">
|
|
<a @click="open_dialog(album)">
|
|
<span class="icon has-text-dark"><i class="mdi mdi-dots-vertical mdi-18px"></i></span>
|
|
</a>
|
|
</template>
|
|
</list-item-album>
|
|
<modal-dialog-album :show="show_details_modal" :album="selected_album" :media_kind="'podcast'" @close="show_details_modal = false" />
|
|
</template>
|
|
</content-with-heading>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { LoadDataBeforeEnterMixin } from './mixin'
|
|
import ContentWithHeading from '@/templates/ContentWithHeading'
|
|
import ListItemAlbum from '@/components/ListItemAlbum'
|
|
import ModalDialogAlbum from '@/components/ModalDialogAlbum'
|
|
import webapi from '@/webapi'
|
|
|
|
const albumsData = {
|
|
load: function (to) {
|
|
return webapi.library_podcasts()
|
|
},
|
|
|
|
set: function (vm, response) {
|
|
vm.albums = response.data
|
|
}
|
|
}
|
|
|
|
export default {
|
|
name: 'PagePodcasts',
|
|
mixins: [ LoadDataBeforeEnterMixin(albumsData) ],
|
|
components: { ContentWithHeading, ListItemAlbum, ModalDialogAlbum },
|
|
|
|
data () {
|
|
return {
|
|
albums: {},
|
|
|
|
show_details_modal: false,
|
|
selected_album: {}
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
open_album: function (album) {
|
|
this.$router.push({ path: '/podcasts/' + album.id })
|
|
},
|
|
|
|
open_dialog: function (album) {
|
|
this.selected_album = album
|
|
this.show_details_modal = true
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
</style>
|