Merge branch 'broken-favorites' into 'develop'
Fixed broken pagination on favorites See merge request funkwhale/funkwhale!1046
This commit is contained in:
commit
ecc3ed3ac3
|
@ -92,18 +92,12 @@ export default {
|
|||
Pagination
|
||||
},
|
||||
data() {
|
||||
let defaultOrdering = this.getOrderingFromString(
|
||||
this.defaultOrdering || "-creation_date"
|
||||
)
|
||||
return {
|
||||
results: null,
|
||||
isLoading: false,
|
||||
nextLink: null,
|
||||
previousLink: null,
|
||||
page: parseInt(this.defaultPage),
|
||||
paginateBy: parseInt(this.defaultPaginateBy || 25),
|
||||
orderingDirection: defaultOrdering.direction || "+",
|
||||
ordering: defaultOrdering.field,
|
||||
orderingOptions: [
|
||||
["creation_date", "creation_date"],
|
||||
["title", "track_title"],
|
||||
|
@ -117,6 +111,7 @@ export default {
|
|||
this.$router.push({name: 'login', query: {next: this.$router.currentRoute.fullPath}})
|
||||
}
|
||||
this.fetchFavorites(FAVORITES_URL)
|
||||
|
||||
},
|
||||
mounted() {
|
||||
$(".ui.dropdown").dropdown()
|
||||
|
@ -140,6 +135,7 @@ export default {
|
|||
ordering: this.getOrderingAsString()
|
||||
}
|
||||
})
|
||||
this.fetchFavorites(FAVORITES_URL)
|
||||
},
|
||||
fetchFavorites(url) {
|
||||
var self = this
|
||||
|
|
|
@ -87,6 +87,11 @@ export default {
|
|||
orderingDirection: "-",
|
||||
ordering: "creation_date",
|
||||
},
|
||||
"favorites": {
|
||||
paginateBy: 50,
|
||||
orderingDirection: "-",
|
||||
ordering: "creation_date",
|
||||
},
|
||||
},
|
||||
serviceWorker: {
|
||||
refreshing: false,
|
||||
|
|
Loading…
Reference in New Issue