See #50: pagination, search and ordering on artist browsing

This commit is contained in:
Eliot Berriot 2017-12-17 19:42:58 +01:00
parent 860b6b1e1f
commit 04c70116c3
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
8 changed files with 124 additions and 20 deletions

View file

@ -54,7 +54,17 @@ export default new Router({
component: Library,
children: [
{ path: '', component: LibraryHome },
{ path: 'artists/', name: 'library.artists.browse', component: LibraryArtists },
{
path: 'artists/',
name: 'library.artists.browse',
component: LibraryArtists,
props: (route) => ({
defaultOrdering: route.query.ordering,
defaultQuery: route.query.query,
defaultPaginateBy: route.query.paginateBy,
defaultPage: route.query.page
})
},
{ path: 'artists/:id', name: 'library.artists.detail', component: LibraryArtist, props: true },
{ path: 'albums/:id', name: 'library.albums.detail', component: LibraryAlbum, props: true },
{ path: 'tracks/:id', name: 'library.tracks.detail', component: LibraryTrack, props: true },