diff --git a/api/funkwhale_api/music/views.py b/api/funkwhale_api/music/views.py index 5bfefc29b..532942e2e 100644 --- a/api/funkwhale_api/music/views.py +++ b/api/funkwhale_api/music/views.py @@ -95,7 +95,12 @@ class TrackViewSet(TagViewSetMixin, SearchMixin, viewsets.ReadOnlyModelViewSet): serializer_class = serializers.TrackSerializerNested permission_classes = [ConditionalAuthentication] search_fields = ['title', 'artist__name'] - ordering_fields = ('creation_date',) + ordering_fields = ( + 'creation_date', + 'title', + 'album__title', + 'artist__name', + ) def get_queryset(self): queryset = super().get_queryset() diff --git a/front/src/components/favorites/List.vue b/front/src/components/favorites/List.vue index 63c3ba79d..91efd7290 100644 --- a/front/src/components/favorites/List.vue +++ b/front/src/components/favorites/List.vue @@ -9,9 +9,36 @@ {{ favoriteTracks.count }} favorites -
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
diff --git a/front/src/components/mixins/Pagination.vue b/front/src/components/mixins/Pagination.vue new file mode 100644 index 000000000..532faaaa3 --- /dev/null +++ b/front/src/components/mixins/Pagination.vue @@ -0,0 +1,8 @@ + diff --git a/front/src/router/index.js b/front/src/router/index.js index f6653e73d..7db5da6ba 100644 --- a/front/src/router/index.js +++ b/front/src/router/index.js @@ -47,7 +47,11 @@ export default new Router({ }, { path: '/favorites', - component: Favorites + component: Favorites, + props: (route) => ({ + defaultOrdering: route.query.ordering, + defaultPage: route.query.page + }) }, { path: '/library',