From f66dff3504fbb43eb6c628e92d50644870772501 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Wed, 21 Mar 2018 11:58:53 +0100 Subject: [PATCH] Added playlist list in library --- front/src/components/library/Library.vue | 1 + front/src/components/playlists/Card.vue | 40 +++++ front/src/components/playlists/CardList.vue | 34 +++++ front/src/components/playlists/Form.vue | 5 +- front/src/router/index.js | 12 ++ front/src/views/playlists/Detail.vue | 2 +- front/src/views/playlists/List.vue | 158 ++++++++++++++++++++ 7 files changed, 250 insertions(+), 2 deletions(-) create mode 100644 front/src/components/playlists/Card.vue create mode 100644 front/src/components/playlists/CardList.vue create mode 100644 front/src/views/playlists/List.vue diff --git a/front/src/components/library/Library.vue b/front/src/components/library/Library.vue index c20922127..161d4519b 100644 --- a/front/src/components/library/Library.vue +++ b/front/src/components/library/Library.vue @@ -4,6 +4,7 @@ Browse Artists Radios + Playlists +
+ + +
- diff --git a/front/src/router/index.js b/front/src/router/index.js index 7cffb6f99..802844461 100644 --- a/front/src/router/index.js +++ b/front/src/router/index.js @@ -22,6 +22,7 @@ import BatchList from '@/components/library/import/BatchList' import BatchDetail from '@/components/library/import/BatchDetail' import RequestsList from '@/components/requests/RequestsList' import PlaylistDetail from '@/views/playlists/Detail' +import PlaylistList from '@/views/playlists/List' import Favorites from '@/components/favorites/List' Vue.use(Router) @@ -110,6 +111,17 @@ export default new Router({ }, { path: 'radios/build', name: 'library.radios.build', component: RadioBuilder, props: true }, { path: 'radios/build/:id', name: 'library.radios.edit', component: RadioBuilder, props: true }, + { + path: 'playlists/', + name: 'library.playlists.browse', + component: PlaylistList, + props: (route) => ({ + defaultOrdering: route.query.ordering, + defaultQuery: route.query.query, + defaultPaginateBy: route.query.paginateBy, + defaultPage: route.query.page + }) + }, { path: 'playlists/:id', name: 'library.playlists.detail', diff --git a/front/src/views/playlists/Detail.vue b/front/src/views/playlists/Detail.vue index 1f3caa494..52c38b618 100644 --- a/front/src/views/playlists/Detail.vue +++ b/front/src/views/playlists/Detail.vue @@ -34,7 +34,7 @@ -
+
diff --git a/front/src/views/playlists/List.vue b/front/src/views/playlists/List.vue new file mode 100644 index 000000000..fc5dcbe54 --- /dev/null +++ b/front/src/views/playlists/List.vue @@ -0,0 +1,158 @@ + + + + + +