mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-28 14:17:19 +02:00
UI updates
This commit is contained in:
@@ -123,7 +123,13 @@ export default {
|
||||
}
|
||||
return cat
|
||||
})
|
||||
this.shelves = this.shelves.concat(categories)
|
||||
// Put continue listening shelf first
|
||||
var continueListeningShelf = categories.find((c) => c.id == 'continue-listening')
|
||||
if (continueListeningShelf) {
|
||||
this.shelves = [continueListeningShelf, ...this.shelves]
|
||||
console.log(this.shelves)
|
||||
}
|
||||
this.shelves = this.shelves.concat(categories.filter((c) => c.id != 'continue-listening'))
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
|
||||
@@ -240,14 +240,17 @@ export default {
|
||||
if (value) {
|
||||
this.resettingProgress = true
|
||||
if (this.isLocal) {
|
||||
// TODO: If connected to server also sync with server
|
||||
await this.$db.removeLocalMediaProgress(this.libraryItemId)
|
||||
this.$store.commit('globals/removeLocalMediaProgress', this.libraryItemId)
|
||||
} else {
|
||||
var progressId = this.userItemProgress.id
|
||||
await this.$axios
|
||||
.$delete(`/api/me/progress/${this.libraryItemId}`)
|
||||
.then(() => {
|
||||
console.log('Progress reset complete')
|
||||
this.$toast.success(`Your progress was reset`)
|
||||
this.$store.commit('user/removeMediaProgress', progressId)
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Progress reset failed', error)
|
||||
|
||||
Reference in New Issue
Block a user