diff --git a/front/src/components/audio/track/Row.vue b/front/src/components/audio/track/Row.vue
index 88ad1db0d..221a61b41 100644
--- a/front/src/components/audio/track/Row.vue
+++ b/front/src/components/audio/track/Row.vue
@@ -201,7 +201,7 @@ const hover = ref(false)
class="meta right floated column"
>
diff --git a/front/src/components/audio/track/Table.vue b/front/src/components/audio/track/Table.vue
index 9d3e2b0ac..1b143f58b 100644
--- a/front/src/components/audio/track/Table.vue
+++ b/front/src/components/audio/track/Table.vue
@@ -274,5 +274,6 @@ const updatePage = (page: number) => {
diff --git a/front/src/components/favorites/List.vue b/front/src/components/favorites/List.vue
index 1b0d14635..2ffd903ba 100644
--- a/front/src/components/favorites/List.vue
+++ b/front/src/components/favorites/List.vue
@@ -18,6 +18,7 @@ import Header from '~/components/ui/Header.vue'
import Spacer from '~/components/ui/Spacer.vue'
import Link from '~/components/ui/Link.vue'
import Alert from '~/components/ui/Alert.vue'
+import Pagination from '~/components/ui/Pagination.vue'
import Loader from '~/components/ui/Loader.vue'
import useSharedLabels from '~/composables/locale/useSharedLabels'
@@ -62,15 +63,15 @@ const fetchFavorites = async () => {
isLoading.value = true
const params = {
- favorites: 'true',
page: page.value,
page_size: paginateBy.value,
- ordering: orderingString.value
+ ordering: orderingString.value,
+ scope: store.state.auth.fullUsername
}
const measureLoading = logger.time('Loading user favorites')
try {
- const response = await axios.get('tracks/', { params })
+ const response = await axios.get('favorites/tracks/', { params })
results.length = 0
results.push(...response.data.results)
@@ -90,8 +91,14 @@ const fetchFavorites = async () => {
}
}
-watch(page, fetchFavorites)
-fetchFavorites()
+onMounted(() => {
+ fetchFavorites()
+})
+
+watch([() => paginateBy, page],
+ () => fetchFavorites(),
+ { deep: true }
+)
onOrderingUpdate(() => {
page.value = 1
@@ -107,12 +114,8 @@ const paginateOptions = computed(() => sortedUniq([12, 25, 50, paginateBy.value]
-
@@ -123,7 +126,7 @@ const paginateOptions = computed(() => sortedUniq([12, 25, 50, paginateBy.value]
-
+
sortedUniq([12, 25, 50, paginateBy.value]
:class="['ui', { 'loading': isLoading }, 'form']"
>
-
-
+
+
{{ t('components.favorites.List.ordering.label') }}
@@ -158,12 +153,7 @@ const paginateOptions = computed(() => sortedUniq([12, 25, 50, paginateBy.value]
-
+
{{ t('components.favorites.List.ordering.direction.label') }}
@@ -180,12 +170,7 @@ const paginateOptions = computed(() => sortedUniq([12, 25, 50, paginateBy.value]
-
+
{{ t('components.favorites.List.pagination.results') }}
@@ -204,6 +189,12 @@ const paginateOptions = computed(() => sortedUniq([12, 25, 50, paginateBy.value]
+
sortedUniq([12, 25, 50, paginateBy.value]
:tracks="results"
/>
-
-
+
{{ t('components.favorites.List.empty.noFavorites') }}
-
+